quantlab.portfolio.approximate.estimate_all#
- quantlab.portfolio.approximate.estimate_all(estimator, panel, volatility=None)[source]#
Estimate the covariance of one-bar returns at every bar of a decision panel.
- Parameters:
- estimatorCovarianceEstimator
The rule’s covariance estimator, a
LedoitWolfEstimatoror aFactorRiskStoreEstimator(implementationhas checked it).- panelDecisionPanel
The bars’ decision inputs, their valuation prices (Ledoit-Wolf) or the risk model’s exposures and estimate rows (factor risk) included.
- volatilitynp.ndarray, optional
[bars, symbols]one-bar volatilities in place of the historical ones (Ledoit-Wolf only); a symbol without a finite positive one is not covered.
- Returns:
- LowRankCovariance
- Raises:
- ValueError
If a factor risk panel has no exposures, or no estimate row at a bar (the message names the first such bar and the store’s range).
Examples
With
riskaLedoitWolfEstimatorover 20 bars andpanela decision panel of 2 bars overAAA,BBBandCCC, CCC listed too late for the window:>>> estimate_all(risk, panel).covered array([[ True, True, False], [ True, True, False]])