This commit is contained in:
robertmartin8
2020-09-26 19:32:08 +01:00
parent 0757096aed
commit f6600f8f9b

View File

@@ -227,7 +227,7 @@ def _pair_exp_cov(X, Y, span=180):
# Exponentially weight the covariation and take the mean
if span < 10:
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):