File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 11from typing import Optional
22
33from numpy import diag_indices_from , trace
4- from pandas import DataFrame , Series
4+ from pandas import DataFrame , Series , Timestamp
55
66from .risk_model import RiskModel
77from .rolling_factor_risk_model import RollingFactorRiskModel
@@ -143,3 +143,18 @@ def cov(self, volatility: Optional[DataFrame] = None):
143143 )
144144 for date , risk_model in self ._rolling_risk_model .items ()
145145 }
146+
147+ def get (self , date : Timestamp ) -> CovarianceEstimator :
148+ """
149+ Get the covariance estimator for a given date.
150+
151+ Parameters
152+ ----------
153+ date : pd.Timestamp
154+ Date.
155+ """
156+ return CovarianceEstimator (
157+ self ._rolling_risk_model .get (date ),
158+ shrinkage_method = self .shrinkage_method ,
159+ delta = self .delta ,
160+ )
You can’t perform that action at this time.
0 commit comments