make_counter_trade#
API documentation for tradeexecutor.state.repair.make_counter_trade Python function.
- make_counter_trade(portfolio, p, t)[source]#
Make a virtual trade that fixes the total balances of a position and unwinds the broken trade.
- Parameters:
portfolio (Portfolio) –
p (TradingPosition) –
t (TradeExecution) –
- Return type: