tensortrade.env.generic.components.stopper module

class tensortrade.env.generic.components.stopper.Stopper[source]

Bases: tensortrade.core.component.Component, tensortrade.core.base.TimeIndexed

A component for determining if the environment satisfies a defined stopping criteria.

registered_name = 'stopper'
reset() → None[source]

Resets the stopper.

stop(env: TradingEnv) → bool[source]

Computes if the environment satisfies the defined stopping criteria.

Parameters:env (TradingEnv) – The trading environment.
Returns:bool – If the environment should stop or continue.