Files
Jhonathan Abreu 0a9dc2c71c QCAlgorithm's OptionChain() api refactor (#8334)
* Fix pandas converter to handle list of data with different symbols

* Properly convert list of data into dataframe

Take into consideration data for multiple symbols in the same list

* Cleanup

* Index dataframes by symbol object instead of SID string

* Add symbol equality operator to compare against object

* Exclude "ID" from option chain dataframe

* Minor fix

* Add greeks columns directly in option chain dataframe.

Also add pass-through properties for greek values in OptionUniverse

* Some cleanup

* Minor fix

* Add new QCAlgorithm.OptionChains() method

- Use OptionChains as output
- Add DataFrame to OptionChain and OptionChains
- Rename Greeks classes
- Add ISymbolProvider for classes that have a symbol (IBaseData, OptionContract)

* Unify QCAlgorithmOptionChain API

Also refactor OptionContract to handle: (1) Actual market data and option price model data, and (2) OptionUniverse data

* Pass symbol properties to OptionUniverse option chain from algorithm

* Format OptionContract for dataframe

* Minor fix

* Add multiple option chains api regression algorithms and other minor changes

* Address peer review

Add NullGreeks class: keep ModeledGreeks as internal as possible

* Minor fix and add PandasConverter unit tests

* Peer review: Non-thread-safe Lazy for Python

* Handle Greeks unwrapping by PandasData

* PandasData cleanup

* Add data and other minor changes

* Unit test fix

* Update Pythonnet to 2.0.39

* Cleanup

* PandasData handling children class members

Address peer review

* Fix: indexing symbol conversion in pandas mapper

* Fix pandas mapper to convert string keys to symbol only when necessary

* Cleanup

* Cleanup

* Add PandasColumn python class to handle proper indexing

This allows propery hash and equality between Symbols, C# strings and Python strings

* Minor fixes

* Symbol cache improvements

* Minor fix for cache miss

* Revert PandasMapper reserved names and improvements

* Minor fix

* Revert reserved names

* Minor fix for Symbol equality operators

---------

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
2024-10-04 12:26:15 -04:00
..
2021-05-06 17:23:51 -03:00
2024-07-10 14:17:27 -03:00
2015-10-28 10:46:23 -04:00
2021-05-06 17:23:51 -03:00

alt tag Lean Data ToolBox

Slack Chat

Lean Home | Documentation | Download Lean

Introduction

Lean Engine is an open-source algorithmic trading engine built for easy strategy research, backtesting and live trading. We integrate with common data providers and brokerages so you can quickly deploy algorithmic trading strategies.

The ToolBox project is a command line program which wraps over 15 tools.

Usage

Each tool requires a different set of parameters, the only required argument is '--app=', which defines the target tool and is case insensitive.

Help information is available using the '--help' parameter.

Example: --app=RandomDataGenerator --tickers=SPY,AAPL --resolution=Daily --from-date=yyyyMMdd-HH:mm:ss --to-date=yyyyMMdd-HH:mm:ss

Available downloaders

  • '--app='
    • GDAXDownloader or GDAXDL
    • IBDownloader or IBDL
    • BitfinexDownloader or BFXDL
  • '--from-date=yyyyMMdd-HH:mm:ss' required
  • '--tickers=SPY,AAPL,etc' required
  • '--resolution=Tick/Second/Minute/Hour/Daily/All' required. Case sensitive. Not all downloaders support all resolutions, send empty for more information.
  • '--to-date=yyyyMMdd-HH:mm:ss' optional. If not provided 'DateTime.UtcNow' will be used

Available Converters

  • '--app='
    • AlgoSeekFuturesConverter or ASFC
      • '--date=yyyyMMdd' reference date.
    • AlgoSeekOptionsConverter or ASOC
      • '--date=yyyyMMdd' reference date.
    • KaikoDataConverter or KDC
      • '--market=' the exchange the data represents.
      • '--tick-type=Quote/Trade' the tick type being processed. Case insensitive.
      • '--source-dir=' path to the raw Kaiko data.
    • QuantQuoteConverter or QQC
      • '--source-dir=' directory where your QuantQuote order is extracted.
      • '--destination-dir=' directory where Lean Data is located "Lean/Data".
      • '--resolution=' resolution of the QuantQuote data.

Other tools

  • '--app='
    • CoarseUniverseGenerator or CUG