You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I see that max_sharpe uses a default risk-free rate of 0.02. If I use
max_sharpe(risk_free_rate=0.0)
the problem goes away. I think the package should use a default risk-free rate of 0.0. Users could either set the risk-free rate themselves or pass expected excess returns.
Beliavsky
changed the title
Large round-off error
Use of 0.02 default risk-free rate can surprise users
Apr 28, 2024
The output of
is
When I compute the tangent portfolio using numpy directly and normalize the sum of the absolute values to 1, I get weights of
[0.5, 0.5]
With calculations being done in double precision, I am surprised that the round-off error from pypfopt is so large.
Thanks for the project.
The text was updated successfully, but these errors were encountered: