tensortrade.env.observers.simple module

class tensortrade.env.observers.simple.SimpleObserver(*args, **kwargs)[source]

Bases: AbstractObserver

A simple observer that allows to observe the data.

This observer just returns the feature data. It is the simplest observer possible.

Parameters:
  • observation_dtype (TypeAlias) – The data type of the observation. Defaults to np.float32.

  • observation_lows (float) – The lowest value of the observation. Defaults to -np.inf.

  • observation_highs (float) – The highest value of the observation. Defaults to np.inf.

has_next() bool[source]

Checks if another observation can be generated.

Returns:

True if another observation can be generated.

Return type:

bool

property observation_space: Space

The observation space of the TradingEnv.

Returns:

The gymnasium observation space of the TradingEnv.

Return type:

Space

observe() ObsType[source]

Observes the environment.

This will return the actual state of the features.

Returns:

The current observation window.

Return type:

ObsType

registered_name = 'simple_observer'