quantlab.backtest.live.ranged_stores#
- quantlab.backtest.live.ranged_stores(backtester)[source]#
Return a run’s ranged stores with a recorded range, the owned and the only read.
The ranged stores declared under
INPUT_FIELDS(walk_store_uses, the labels left out) with a recorded range, by absolute store path, in the walk’s extension order, deepest component path first (a risk model’s exposures factor before its regression store, its regression store before its estimate store): the"owns"uses, which the live day extends, and the"reads"uses (a factor view, a factor pinned to some of a store’s variables), each with the component path and the handle; a key may be in both.- Parameters:
- backtesterBaseBacktester
The run’s backtester, rebuilt from its directory.
- Returns:
- owners, viewsdict
{store: (component path, handle)}each, in extension order.
Examples
With
backtesterrebuilt from a run whose model reads one factor store and whose covariance is aFactorRiskStoreEstimatorof a USE4 model:>>> owners, views = ranged_stores(backtester) >>> [(Path(key).name, path) for key, (path, _) in owners.items()] [('past_ret.zarr', 'model.predictor.factors.0'), ('exposures.zarr', 'constructor.covariance.risk_model.exposures'), ('regression.zarr', 'constructor.covariance.risk_model'), ('estimate.zarr', 'constructor.covariance.risk_model')] >>> views {}