QuantRocket 2.4.0 Release Notes

QuantRocket 2.4.0 is now available. This release includes a number of enhancements related to real-time data, the US Stock dataset, and feature parity with Quantopian. All version 2 users are encouraged to update to the latest version. See how to update.

Highlights

  • There are two new additions to the Code Library:
  • It is now possible to collect real-time data for large universes, such as the entire US stock market, by collecting minute or second aggregate data from Polygon.io instead of full tick data. See the usage guide and the updated configuration guidance for using Polygon.io data with Zipline.
  • There are several new securities master fields for the US Stock dataset:
    • Sector and Industry. See an example record in the usage guide.
    • Primary share. A new field distinguishes primary from secondary share classes for companies with multiple share classes. See the usage guide.
  • You can now query daily data from a minute bundle using the new data_frequency parameter on quantrocket.get_prices and quantrocket.zipline.download_bundle_file. See the usage guide.
  • Users who don’t want to collect the full US Stock minute bundle can ingest only the daily portion of the bundle for use in Zipline, the Pipeline API, and throughout QuantRocket. See the usage guide for a comparison of the different ways to access the US Stock dataset.
  • There are two Python API enhancements for the securities master service:
    • a new convenience function, quantrocket.master.get_securities, queries the securities master database and loads the results into a DataFrame. (Previously, downloading the master file and loading it into a DataFrame were two separate steps.) See the API Reference.
    • The function quantrocket.master.create_universe now accepts a sids parameter that makes it easier to create a universe from a DataFrame without having to write the DataFrame to a CSV. See the API Reference for an example.

Documentation

  • A new section of the usage guide documents how to replicate the QTradableStocksUS universe, a popular Pipeline filter on Quantopian.
  • A detailed note has been added to the docstring for quantrocket.master.download_master_file and quantrocket.master.get_securities explaining how multiple parameters are combined when querying the securities master. See the API Reference.
  • A note has been added to usage guide mentioning that print statements will show up in the detailed logs.

API Changes

  • the function quantrocket.zipline.download_minute_file has been renamed download_bundle_file since it can now be used to download minute or daily data, using the new data_frequency parameter. The old function is still available but will print a deprecation warning.

Sample Data

  • SPY is now included in the free sample data

Complete 2.4.0 release notes

quantrocket/blotter:2.4.0

  • reduce memory usage in PNL calculation when there is a large number of executions

quantrocket/flightlog:2.4.0

  • make quantrocket.flightlog.FlightlogHandler a singleton to prevent users from unintentionally logging duplicate messages in their code

quantrocket/fundamental:2.4.0

  • better error handling when the IBKR API returns invalid XML indicating no Reuters estimates data is available

quantrocket/master:2.4.0

  • add Sector and Industry fields to US Stock dataset. See an example record in the usage guide.
  • add a field to distinguish primary vs secondary share class in the US Stock dataset. See the usage guide.
  • add a new convenience function quantrocket.master.get_securities, which queries the securities master database and loads the results into a DataFrame. (Previously, downloading the master file and loading it into a DataFrame were two separate steps.) See the API Reference.
  • add a sids parameter to quantrocket.master.create_universe to make it easier to create a universe from a DataFrame without having to write the DataFrame to a CSV. See the API Reference for an example.

quantrocket/moonshot:2.4.0

  • add new paramater DB_DATA_FREQUENCY which can used for querying daily data from a Zipline minute bundle. See the API Reference.

quantrocket/postgres:2.4.0

  • changes the default PostgreSQL log level in order to silence the excessively noisy TimescaleDB logging related to aggregate databases seen in previous versions

quantrocket/realtime:2.4.0

quantrocket/zipline:2.4.0

  • support for querying daily data from a minute bundle using the new data_frequency parameter on quantrocket.get_prices and quantrocket.zipline.download_bundle_file. See the usage guide.
  • support for ingesting only the daily portion of the US Stock minute bundle. This is provided as a convenience for users who don’t want to collect the full minute bundle. See the usage guide for a comparison of the different ways to access the US Stock dataset.
  • add new US Stock master fields (usstock_Sector, usstock_Industry, usstock_PrimaryShareSid, and usstock_CIK) to SecuritiesMaster Pipeline dataset
  • roll-up real-time minute data in live trading to support queries for partial day daily data using data.hist(... '1d'). See related forum post.

quantrocket_trading_calendars:2.4.0

@brian super excited about the ability to now collect real-time data for large-universes; this is huge for me as I utilize minute bars for around 2,000 stocks during live trading.

Also, thanks for getting the extended hours trading calendar in place.

Thanks for continually improving the product!