QuantRocket 2.8.0 Release Notes

QuantRocket 2.8.0 is now available. This release introduces Apple Silicon support, numerous Zipline enhancements, Sharadar enhancements, margin requirements data, and other enhancements. See how to update .

Highlights

  • Apple Silicon support: Mac users can now run QuantRocket natively on M1 Macs. Follow the standard installation steps, and Docker will automatically install the appropriate QuantRocket containers based on your system architecture. (Interactive Brokers customers: please note that IB Gateway runs under emulation on M1 Macs, not natively, as explained more fully in the installation tutorial.)
  • Parameter scans for Zipline: this previously Moonshot-only feature for optimizing strategies is now available for Zipline. See the usage guide.
  • Multi-worker parameter scans: both Moonshot and Zipline now offer built-in concurrency for parameter scans, allowing you to cut down scan time by testing multiple parameters simultaneously. See the Moonshot or Zipline usage guide.
  • Dry runs for Zipline live trading: optionally write your strategy's orders to file instead of sending orders to the blotter for live execution. Dry runs are useful for troubleshooting, validation, and executing orders manually outside QuantRocket. See the usage guide.
  • Query previous fiscal periods when using get_sharadar_fundamentals_reindexed_like or when using Sharadar fundamentals in Pipeline. This makes it easy to compare current and previous periods and calculate changes in fundamental metrics over time. See the fundamentals section or Zipline section of the usage guide.
  • Native Sharadar bundle: ingest a prefabricated Sharadar bundle (like the US stock bundle) without having to collect a history database and ingest from there. The new Sharadar bundle supports stocks and ETFs in a single bundle (unlike the Sharadar history database). See the usage guide.
  • Modify Zipline strategy parameters on-the-fly when running backtests. This Moonshot-inspired feature, which allows you to test different parameters without editing your algo files, is now available for Zipline. See the usage guide.
  • Set the bundle and data frequency for your Zipline strategy directly in the algorithm file instead of having to specify them each time you backtest or trade. See the usage guide.
  • Margin requirements data from Interactive Brokers, covering stocks with special margin requirements, with history back to 2018. See the usage guide.
  • Support for sending "what-if" orders to Interactive Brokers. What-if orders allow you to check the margin impact and estimated commission of an order without executing the order (similar to the Order Preview window in Trader Workstation). See the usage guide.

Documentation

  • A new section of the Zipline usage guide outlines a design pattern for re-using code when running multiple variants of a strategy (such as one variant for large cap stocks and another for mid cap stocks). No more copying and pasting the same code into multiple files. (Note for users who don't plan to update to version 2.8.0 immediately: although this design pattern is based on standard characteristics of Python rather than being a feature built into QuantRocket, it should not be used with earlier versions of QuantRocket, as QuantRocket's method of periodically reloading Zipline workers has been tweaked in version 2.8.0 to ensure the design pattern works as intended.)
  • New example code in the Zipline usage guide shows how to plot the performance of a portfolio of Zipline strategies using Moonchart.

API Changes

  • This release includes updated versions of Python, pandas, numpy, and other libraries. Although the version number changes are relatively minimal, package updates always have the potential to cause breakages in your code if you interact with those libraries directly. Users should carefully test their algorithms after updating. The version changes of the major packages are shown below:

    • Python 3.8 -> Python 3.9
    • pandas 1.2 -> pandas 1.3
    • numpy 1.19 -> numpy 1.21
  • The previous method name for constructing a moonchart parameter scan tear sheet, ParamscanTearsheet.from_moonshot_csv(...), has been renamed to ParamscanTearsheet.from_csv(...), since parameter scan CSVs can now come from Moonshot or Zipline. The previous method name is still available but will raise a deprecation warning.

quantrocket/blotter:2.8.0

  • support for sending "what-if" orders to Interactive Brokers. What-if orders allow you to check the margin impact and estimated commission of an order without executing the order (similar to the Order Preview window in Trader Workstation). See the usage guide.
  • support for filtering order status queries by datetime (previously when a datetime was passed, the time component was ignored and results were filtered by date)

quantrocket-client:2.8.0

  • query previous fiscal periods using the new period_offset parameter for get_sharadar_fundamentals_reindexed_like. This makes it easy to compare current and previous periods and calculate changes in fundamental metrics over time. See the usage guide.

quantrocket/fundamental:2.8.0

  • margin requirements data from Interactive Brokers, covering stocks with special margin requirements, with history back to 2018. See the usage guide.

quantrocket/jupyter:2.8.0

  • update to JupyterLab 3.4.3

quantrocket/moonshot:2.8.0

  • Concurrency in parameter scans: speed up parameter scans by running them with multiple workers. See the usage guide.

quantrocket/postgres:2.8.0

  • update to TimescaleDB 2.8.0

quantrocket/zipline:2.8.0

  • parameter scans: optimize your strategy by testing and comparing different parameter values. Built-in concurrency allows you to cut down scan time by testing multiple parameters simultaneously. See the usage guide.
  • dry runs for Zipline live trading: write your strategy's orders to file instead of sending orders to the blotter for live execution. Dry runs are useful for troubleshooting, validation, and executing orders manually outside QuantRocket. See the usage guide.
  • query previous fiscal periods using the period_offset parameter for Sharadar fundamentals in Pipeline. This makes it easy to compare current and previous periods and calculate changes in fundamental metrics over time. See the usage guide.
  • native Sharadar bundle: ingest a prefabricated Sharadar bundle (like the US stock bundle) without having to collect a history database and ingest from there. The new Sharadar bundle supports stocks and ETFs in a single bundle (unlike the Sharadar history database). See the usage guide.
  • modify strategy parameters on-the-fly when running backtests. See the usage guide.
  • support for setting the bundle and data frequency for your strategy directly in the algorithm file. See the usage guide.
  • support for creating a bundle from multiple history databases or real-time aggregate databases, as long as all source databases have the same bar size and fields. See the Usage Guide.
  • run custom code before a bundle loads, such as registering a custom calendar. See the usage guide.
  • fix an issue where context variables set inside scheduled functions weren't persisted to file in live trading. See related forum post.
1 Like