PaperTradeInterface#

class sigtech.framework.strategies.runner.trade_interface.PaperTradeInterface

Example implementation of TradeInterface. See framework/sigtech/framework_tests/strategies/runner/trade_interface_test.py for an example of it’s use

property current_live_orders

Get live orders

property current_model_orders

Get model orders

generate_live_orders()

Generate live orders

map_order_to_broker(orders)

Map internal orders to the format required by the broker

map_broker_to_orders(orders)

Map broker orders to the internal order format

retrieve_historic_order_states()

Retrieve historic orders

save_transaction_history()

Save transaction history

property transaction_history_df

Get transaction history as dataframe

push_aum(aum)

Change the AUM - this changes how the model orders and positions are scaled up to live

push_contract_sizing(contract_sizing)

Update contract sizing information

push_live_orders(broker_order_data)

Update live orders

push_live_positions(pms_positions)

Update live positions

push_model_orders(platform_orders)

Push model orders into the trade interface - called by ObjectRun

push_model_positions(platform_positions)

Push model positions into the trade interface - called by ObjectRun

update_strategy_nav(strategy_nav)

Updates the strategy NAV