tensortrade.env.utils.observation_history module

class tensortrade.env.utils.observation_history.ObservationHistory(window_size: int)[source]

Bases: object

Stores observations from a given episode of the environment.

Parameters:

window_size (int) – The amount of observations to keep stored before discarding them.

window_size

The amount of observations to keep stored before discarding them.

Type:

int

rows

The rows of observations that are used as the environment observation at each step of an episode.

Type:

pd.DataFrame

observe() array[source]

Gets the observation at a given step in an episode

Returns:

np.array – The current observation of the environment.

push(row: Dict) None[source]

Stores an observation.

Parameters:

row (Dict) – The new observation to store.

reset() None[source]

Resets the observation history