mirror of
https://github.com/robertmartin8/PyPortfolioOpt.git
synced 2022-11-27 18:02:41 +03:00
fixes #192
This commit is contained in:
@@ -227,7 +227,7 @@ def _pair_exp_cov(X, Y, span=180):
|
|||||||
# Exponentially weight the covariation and take the mean
|
# Exponentially weight the covariation and take the mean
|
||||||
if span < 10:
|
if span < 10:
|
||||||
warnings.warn("it is recommended to use a higher span, e.g 30 days")
|
warnings.warn("it is recommended to use a higher span, e.g 30 days")
|
||||||
return covariation.ewm(span=span).mean()[-1]
|
return covariation.ewm(span=span).mean().iloc[-1]
|
||||||
|
|
||||||
|
|
||||||
def exp_cov(prices, returns_data=False, span=180, frequency=252, **kwargs):
|
def exp_cov(prices, returns_data=False, span=180, frequency=252, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user