Python Library Support – LEAN Release Notes v18.104.22.168
This release adds full python support to enable using common python libraries in your algorithm.It is implemented using the PythonNet library which allows importing C# classes into python and vice versa. The new python algorithms are fully supported in local and cloud trading. There are some minor API adjustments to use the new library but the majority of existing python algorithms should work with no changes. In addition there were numerous bug fixes to make IB re-connection more resilient, and OANDA Brokerage was updated to support v2 accounts.
Download this release from GitHub
- Full native python library support.
- Add support for OANDA v2 accounts.
- Added OrderType Exercise to OrderJsonConverter.
- Added NLogHandler for additional logging capabilities.
- Fix bugs in IEX Data Queue Handler.
- Add SetTradeBuilder to QCAlgorithm API so users can set their own trade builder for statistics.
- Added Volume Share Slippage Model.
- Extend LeanData class to generate forex and cfd QuoteBars.
- Liquidated positions show up tagged with “Liquidated”.
- When backtests drop below $0 equity they are halted.
- Added Hull Moving Average indicator.
- Fetch option chains from the OCC website to speed up launching algorithms.
- Update FXCM Brokerage to return QuoteBars in GetHistory request.
- Fix OANDA Brokerage to return GetHistory requests in the exchange timezone.
- Fix IB timezone issues in GetHistory and Data Queue Handler.
- Prevent setting real-time price when the exchange is closed.
- Fixed bug updating consolidators with tick data.
- Fix futures to use quotes for the universe instead of trades.
- Fix issues with ZB and SGSD30 in market hours database.
- Adjusted RAM limit calculations to be less sensitive to short term spikes.
- Restart IBGateway each night on IB server disconnection.
- Allow field selectors to be used with QuoteBars.
- Removed underlying asset from futures assets.
- Fix issue calculating holdings in CalculateOrderQuantity.
- Added NSE data converter to backtest on data from National Stock Exchange of India.
- Futures expiry date calculated dynamically with date rules.
- Updated to IB API Version 9.73
Thank you to the community contributors in this release Oswaldo, Ray Bohac,Jay-Jay-D, Anshul and Ed Rouwendaal!
LEAN aims to empower investors to invest with confidence by using cutting edge algorithmic trading technology. Through the power of open source we are building the world’s best algorithmic trading platform, capable of accurately modeling global markets to give you insight into your strategy. Your trading algorithms can be seamlessly deployed from backtesting into production with no changes or even moved between brokerages. The LEAN user community reaches over 31,000 quants from all over the world. LEAN supports C#, F#, VB, Java and Python programming languages and can be used in Equity, Forex, CFD, Options and Futures markets. It currently supports live paper trading, or execution by Interactive Brokers, FXCM and OANDA Brokerage.
For more information join the LEAN Community on GitHub.