I am confused what is the right input to pass to EfficientSemivariance.
The documentation says Instead of passing in a covariance matrix, you should past in a dataframe of historical/simulated returns (this can be constructed from your price dataframe using the helper method expected_returns.returns_from_prices())
But, the example code uses mu = expected_returns.mean_historical_returns(df) as the first argument to EfficientSemivariance.
By my understanding, expected_returns.returns_from_prices() returns daily percentage change using prices.pct_change() but expected_returns.mean_historical_returns(df) returns annualized returns by default.
I am confused what is the right input to pass to
EfficientSemivariance
.The documentation says
Instead of passing in a covariance matrix, you should past in a dataframe of historical/simulated returns (this can be constructed from your price dataframe using the helper method expected_returns.returns_from_prices())
But, the example code uses
mu = expected_returns.mean_historical_returns(df)
as the first argument toEfficientSemivariance
.By my understanding,
expected_returns.returns_from_prices()
returns daily percentage change usingprices.pct_change()
butexpected_returns.mean_historical_returns(df)
returns annualized returns by default.Please help! What is the correct input?