-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Chapter 6: Mean-Variance Optimisation Loss Function #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Anjum48 which chapter is this? |
This is trivially solved by setting them all to negative infinity, so I don't think you meant to say that. It's two counteracting forces: the larger the weights, the larger the first term (return), but also the larger the variance (second term). The lambda parameter is a user specified parameter that is a tradeoff between maximizing the return (the first term) and the second term (the portfolio variance). It's not a regularizer in the traditional regression sense but it is analogous. This is a pretty common formula in finance - it's the lagrangian of a quadratic problem: http://www.actuaries.org/AFIR/Colloquia/Rome2/Cesarone_Scozzari_Tardella.pdf |
@CamDavidsonPilon |
The lambda 𝛌 is often referred to (e.g. here) as the "risk aversion" parameter -- the tradeoff @CamDavidsonPilon mentions. |
If lambda 𝛌 = 1, then the objective function approximates the portfolio's |
There definitely seems to be a minus sign missing. |
Yea it should be |
OK, fix done:#347 for two notebooks. For the record, another good reference, by William Sharpe: |
Fix #277 Ch6 portfolio optimization equation
Hi Cam,
Could you explain how to use (or reference to a source) this loss function:
I'm assuming that the loss function is attempting to minimise the portfolio weights for the 4 stocks (which can be done using scipy optimise etc.), but I'm not sure what the lambda parameter is.
Thanks!
The text was updated successfully, but these errors were encountered: