BacktestSyncModel#

tradeexecutor.backtest.backtest_sync.BacktestSyncModel Python class in Trading Strategy framework.

class BacktestSyncModel[source]#

Bases: SyncModel

Backtest sync model.

Simulate deposit events to the backtest wallet.

__init__(wallet, initial_deposit_amount)[source]#
Parameters:

Methods

__init__(wallet, initial_deposit_amount)

create_transaction_builder()

Creates a transaction builder instance to make trades against this asset management model.

get_hot_wallet()

Get the vault address we are using.

get_vault_address()

Get the vault address we are using.

sync_initial(state)

Set u[ initial sync details.

sync_treasury(strategy_cycle_ts, state[, ...])

Apply the balance sync before each strategy cycle.

__init__(wallet, initial_deposit_amount)[source]#
Parameters:
sync_initial(state)[source]#

Set u[ initial sync details.

Parameters:

state (State) –

sync_treasury(strategy_cycle_ts, state, supported_reserves=None)[source]#

Apply the balance sync before each strategy cycle.

Warning

Old legacy code with wrong return signature compared to the parent class

Parameters:
create_transaction_builder()[source]#

Creates a transaction builder instance to make trades against this asset management model.

Only needed when trades are being executed.

Returns:

Depending on the asset management mode.

Return type:

None