PyPortfolioOpt icon indicating copy to clipboard operation
PyPortfolioOpt copied to clipboard

What is the right input to EfficientSemivariance?

Open codemaniac opened this issue 1 year ago • 0 comments

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.

Please help! What is the correct input?

codemaniac avatar May 19 '24 05:05 codemaniac