Here I provide a short notebook with calculations to choose the amount of risky investment to reach a goal. Risk is assessed using the usual Expected Shortfall and is not part of the optimisation.
The results are very positive as the simulation does not allow for sudden negative price moves, however the methodology is still interesting.
The above references an opinion and is for information purposes only. It is not intended to be investment advice. Seek a duly licensed professional for investment advice.