Report Generator Tests / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Add dynamic transaction thread pool that grows on demand
* Simplify dynamic worker pool
* Move dynamic thread pool into transaction handler
* Grow transaction threads on demand with order pinning
* Extract order request processing into a dedicated pool
* Move request routing and release into the processing pool
* Address review comments
* Simplify processing pool shutdown and queue lookup
* Fix combo re-routing when a simple order shares its group id
* Process order requests off a single shared worker queue
* Address review comments
* Log when the transaction pool grows a new thread
* Add test for processing many orders quickly
* Fix synchronous processing snapshot
* Address review comments
* Shutdown drain fix. TryExpand start thread without lock. Restore FIFO for non-concurrent live brokerages
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
* Enable concurrency for paper brokerage.
Implement PaperBrokerageTransactionHandler to handle concurrency for live paper trading transaction handler
* Remove PaperTradingBrokerageTransaction handler
Favor existing BacktestingTransactionHandler
* Minor fixes and cleanup
* Minor unit tests fix
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Add 'asynchronous' parameter to trading api
* Add regression algorithms
* More fixes for asynchronous orders
* Fix failing unit tests
* Fix failing unit tests
* Add multiple orders requests in transaction handler
Make each transaction thread handle requests corresponding to the same order
* Refactor order state machine in BrokerageTransactionHandler
Now using a single dictionary to hold orders and their state, either pending for submission, open or closed.
* Revert: remove complete orders from new state machine in BTH
* Add order ticket to new BTH open orders state machine
* Run syn in Backtesting transaction handler for new orders submission
* Remove OpenOrderState.SubmissionPending property
* Add Security to OpenOrderState
* Minor fix
* Cleanup
* Some cleanup in BTH
* Cleanup
* Minor fix
* Minor unit test fix
* Minor fix
* Make Brokerage.ConcurrencyEnable property virtual
* Minor change
* Cleanup
* Add 'asynchronous' parameter to SetHoldings api
* Improve regression algorithms
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Move processing of delistings to Brokerage
* Deal with case that exchange is not open on OptionSymbol.ID.Date
* Refactor solution to use DelistingNotification event
* Adjust some regression expected liquidation time
* Mark some todos on deprecated functions
* Update expected liqudation time for Py regressions
* Update regressions that have been validated
* Use HandlePositionAssigned for assignment orders
* Update regressions
* Update some missed unit tests; remove one that is already covered by regression
* Cleanup deprecated backend functions
* nit - small cleanup adjustment
* Post rebase fix
* Address review
* Minor tweak to py regression
- 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