ExecutionMode#

tradeexecutor.strategy.execution_context.ExecutionMode class.

class ExecutionMode[source]#

Bases: Enum

Different execution modes the strategy engine can hvae.

__init__()#

Methods

is_live_trading()

Are we trading with real money or paper money real time?

Attributes

real_trading

We are live trading with real assets

paper_trading

We are live trading with mock assets TODO: This mode is not yet supported

backtesting

We are backtesting

data_preload

We are loading and caching datasets before a backtesting session can begin.

real_trading = 'real_trading'#

We are live trading with real assets

paper_trading = 'paper_trading'#

We are live trading with mock assets TODO: This mode is not yet supported

backtesting = 'backtesting'#

We are backtesting

data_preload = 'data_preload'#

We are loading and caching datasets before a backtesting session can begin. We call create_trading_universe() and assume tradingstrategy.client.Client class is set to a such state it can display nice progress bar when loading data in a Jupyter notebook.

is_live_trading()[source]#

Are we trading with real money or paper money real time?

Return type

bool