* Create generic writing for LeanDataWriter, + notes on todos * Make Options Daily/Hourly data store by year * Refactor Generic Write * Permit hour and daily resolutions for options * Refactor writer to merge when needed with other files * Cleanup redundancies, run write tasks in parallel * Make needed classes/vars available * Update tests to reflect new naming convention for daily hourly options data * Add Byte[] overloads for ZipData functions in compression * Implemented Store() for ZipDataCacheProvider * Have LeanDataWriter use a DataCacheProvider * ZipDataCacheProvider cleanup * ZipDataCacheProvider tweaks, doesn't support storing non-zips * Test adjustments * Update LeanDataWriter to use Write instead of SaveDailyHourly/SaveMinuteSecond * Implement tests to verify DownloadAndSave behavior * Nit cleanup on DownloadAndSave tests * Fix for options daily/hourly underlying equity subscription read * Add daily/hourly options data and regressions * Add missing open interest for hourly * Fix writing of OpenInterest Daily/Hourly data * Update data * Fix Date typo in regression * Use daily algorithm to test delisting * Revisions part 1 * Expand test for DataCacheProviders; refactor DiskDataCacheProvider * nit - test adjustments * ZipDataCacheProvider test setup refactor * Adjust multithreaded read/write test; fixes for ZipDataCacheProvider * Move DiskDataCacheProvider to its own file and add write test * Remove _appendToZips; always overwrite entry or create zip * Add mapping regression for daily options * nit - add license to regression * Fix Tick write case where more than one data point for a DateTime * Fix data issue * Address review * Tweaks for tests * Stop Store() early if no entry name is given
LEAN Data Formats / Options
QuantConnect hosts options data provided by AlgoSeek. The data contains quotes, trades, and open interest data. You can explore options data on our website at https://www.quantconnect.com/data/tree/option/
The data are stored as compressed ZIP files, each containing multiple CSV entries, varying on the option style, e.g. call/put, strike price, and expiration date.
Options data can be used with the following Resolutions:
- Minute
The markets we currently support are:
- USA
tickType in this documentation can refer to one of the following:
- trade
- quote
- openinterest
Minute File Format
Minute files are located in the option / market / resolution / symbol folder.
The zip files have the filename format: YYYYMMDD_tickType_optionType.zip. The CSV file contained within has the filename format: YYYYMMDD_symbol_resolution_tickType_optionType_optionStyle_decicentStrikePrice_symbolExpirationDate(YYYYMMDD).csv
Minute trade schema and example data is as follows:
| Time | Open | High | Low | Close | Volume |
|---|---|---|---|---|---|
| 63271000 | 120800 | 125600 | 120800 | 125000 | 404 |
- Time - Milliseconds since midnight
- Open - Opening price as deci-cents
- High - High price as deci-cents
- Low - Low price as deci-cents
- Close - Closing price as deci-cents
- Volume - Total contracts traded
Minute quote schema and example data is as follows:
| Time | Bid Open | Bid High | Bid Low | Bid Close | Last Bid Size | Ask Open | Ask High | Ask Low | Ask Close | Last Ask Size |
|---|---|---|---|---|---|---|---|---|---|---|
| 10920000 | 120800 | 125600 | 120800 | 125000 | 10 | 120900 | 126800 | 120900 | 137000 | 100 |
- Time - Milliseconds since midnight
- Bid Open - Opening price for the best bid as deci-cents
- Bid High - Highest recorded bid price as deci-cents
- Bid Low - Lowest recorded bid price as deci-cents
- Bid Close - Closing price for the best bid as deci-cents
- Last Bid Size - Size of best bid at close
- Ask Open - Opening price for the best ask as deci-cents
- Ask High - Highest recorded ask price as deci-cents
- Ask Low - Lowest recorded ask price as deci-cents
- Ask Close - Closing price for the best ask as deci-cents
- Last Ask Size - Size of best ask at close
Divide prices by 10,000 to convert deci-cents to dollars
Minute open interest schema and example data is as follows:
| Time | Open Interest |
|---|---|
| 50280000 | 102 |
- Time - Milliseconds since midnight
- Open Interest - outstanding contracts
