quantlab.portfolio.config.LedoitWolfEstimatorConfig#
- class quantlab.portfolio.config.LedoitWolfEstimatorConfig(lookback_bars, max_stale_bars=5)[source]#
Bases:
FrozenConfigConfig of
LedoitWolfEstimator: a shrunk sample covariance of trailing returns.Examples
>>> cfg = LedoitWolfEstimatorConfig(lookback_bars=252) >>> cfg.lookback_bars, cfg.max_stale_bars (252, 5)
- lookback_bars#
Bars of trailing one-bar returns the covariance is estimated from; at least 2. A symbol needs a finite return on every one of them.
- max_stale_bars = 5#
Largest staleness (bars since the symbol’s last real price) a symbol may have at the bar and still be covered; a halt no longer than this stays in the estimate, flat returns and then its gap.