- For backtesting the algorithm thread will sequentially process pending
order requests
- Adding new non blocking `BusyCollection`
- Updating `UpdateOrderRegressionAlgorithm` that suffered of a race
condition: it supposed `OnOrderEvent` would be called after the call to
`Transactions.AddOrder()` was finished
- Updated IB fee model to support option exercise
- Added support for splits for options. Not tested on real data yet.
- Added option exercise functionality for long positions. Unit Tests. Not tested on real data yet.
- Added option assignment functionality for short positions. Assignment event. Unit Tests.
- Added basic option assignment simulator for backtesting brokerage. Simulates assignments for deep ITM short positions close to expiration. Unit Tests.
This is a fairly large change. We now have a BacktestingBrokerage (and PaperTradingBrokerage) which is consumed by the transaction handlers. We've also tested the BrokerageTransactionHandler. The IBrokerage interface has been through through and implemented. We've also added a spacial BacktestingTransactionHandler to delegate order filling to the BacktestingBrokerage implementation via the BacktestingBrokerage.Scan method. Much of this is a code shuffle to bring live trading and backtesting transaction handling into a similar pattern.
IBBrokerage now implements new IBrokerage interface
Adds IBBrokerage tests
Created IBGatewayRunner to manage the IB gateway/TWS start/stop
Cleaned up ITransactionHandler interface, removed some duplication