QuantRocket 1.6.0 is now available. All users are encouraged to update to the latest version. See how to update.
Highlights
- Support for machine learning strategies using walk-forward optimization. See the usage guide.
- Forward-looking earnings announcements dates from Wall Street Horizon, via IB. See the usage guide.
API changes
This release introduces a breaking API change for Moonshot strategies that rely on the MASTER_FIELDS
parameter to access securities master data in the body of their strategy. However, reverting to the old behavior is simple. See below for more details.
- The
master_fields
parameter forget_historical_prices
is deprecated. Instead, if you need securities master fields aligned to prices, please make a separate call to the newly added functionget_securities_reindexed_like
(see usage guide). This API change is motivated by performance considerations: querying numeric fields (like prices) and string fields (like symbols, exchanges, etc.) in the same query forces Pandas to load all the fields, including numeric ones, as the object dtype rather than float or integer, resulting in slower loads and higher memory consumption. This problem is avoided by loading numeric and non-numeric fields in two separate queries. - Related to the above change, the
Moonshot.MASTER_FIELDS
parameter now defaults toNone
whereas previously it defaulted to["Currency", "Multiplier", "PriceMagnifier", "PrimaryExchange", "SecType", "Symbol", "Timezone"]
. If you were accessing any of these master fields in the body of your Moonshot strategy, you will receive aKeyError
. The preferred solution is to update your code to useget_securities_reindexed_like
(see usage guide). Alternatively, to preserve the old behavior, setMASTER_FIELDS
manually:
class MyStrategy(Moonshot):
MASTER_FIELDS = ["Currency", "Multiplier", "PriceMagnifier", "PrimaryExchange", "SecType", "Symbol", "Timezone"]
Documentation
- new sections explaining the fundamentals query cache and the Moonshot cache
- new section on creating custom JupyterLab kernels
Complete 1.6.0 release notes
quantrocket/fundamental:1.6.0
- Forward-looking earnings announcements dates from Wall Street Horizon, via IB. See the usage guide.
- a new
force
parameter forcollect_reuters_estimates
andcollect_reuters_financials
forces fundamentals to be queried for all specified securities even if they were collected recently. (The default behavior is to skip securities that were updated in the last 12 hours.) Also available for the new functioncollect_wsh_earnings_dates
.
quantrocket/history:1.6.0
- support for sharding intraday databases by year. See the usage guide.
- fix improper database index to yield faster query performance for Sharadar databases
quantrocket/jupyter:1.6.0
- update to quantrocket-client 1.6.4
- new function:
get_securities_reindexed_like
. See usage guide. - a new
ffill
parameter forget_reuters_estimates_reindexed_like
allows disabling forward-filling if you only want the estimate/actual populated on the date it was first available. (Forward-filling is enabled by default.) See the API reference. - a new
shift
parameter forget_reuters_estimates_reindexed_like
allows disabling the shifting of estimates and actuals by one period (enabled by default). Shifting is intended to prevent lookahead bias, but some announcements occur before the market open so shifting is overly cautious in those cases. See the API reference.
- new function:
quantrocket/master:1.6.0
- add environment variable
IB_WEB
which can be used to override the IB website base URL used for collecting listings. Can be used to point directly to an IB subsidiary website. See community post for background. To override the URL, create or edit your docker-compose.override.yml file and add the following override for the master service:
version: '2.4'
services:
master:
environment:
- IB_WEB=https://www.interactivebrokers.co.uk
quantrocket/moonshot:1.6.0
- Support for machine learning strategies using walk-forward optimization
- update to moonshot 1.6.2
- support machine learning strategies with new
MoonshotML
class
- support machine learning strategies with new