tensortrade.rewards.reward_strategy module

class tensortrade.rewards.reward_strategy.RewardStrategy[source]

Bases: object

property exchange

The exchange being used by the current trading environment. Setting the exchange causes the strategy to reset.

Return type

InstrumentExchange

abstract get_reward(current_step, trade)[source]
Parameters
  • current_step (int) – The environment’s current timestep.

  • trade (Trade) – The trade executed and filled this timestep.

Return type

float

Returns

A float corresponding to the benefit earned by the action taken this timestep.

reset()[source]

Optionally implementable method for resetting stateful strategies.