Apologies in advance for the (possibly?) poor terminology as I'm a bit of a novice in the field. I was torn whether to ask this on stackoverflow or here, so hope its the right place.
Anyway, my problem is I'm trying to efficiently calculate the best weights for a portfolio of assets that will maximize the sharpe ratio (or similar measure of risk adjusted returns) of the portfolio as a whole, where portfolio returns are unknown, non-normal and dependent on each other, but simulated by a seperate function.
The processing chain is as follows:
- Simulate returns from portfolio (I already have this part; assume that the simulation uses a VAR Copula Garch model incorporating all assets in the portfolio, though how it arrives at the simulation is not important for this question, just that the asset returns are not independent but can be simulated.)
- Calculate weights for each asset that will maximize some risk/return measure (e.g. sharpe ratio) of the whole portfolio
- Repeat above until stable points are found (e.g. each 'simulation' is very noisy by itself/far from the average over all simulations).
I thought of doing this the brute force way via monte carlo simulation, but thought it best to seek expert advise first. So my question is essentially:
- How would you recommend I go about doing the above in R.
- Are there any packages, algorithms or resources you would recommend I use/look into for this task? Goal is to have a proof of concept up asap, and if the ideas show practical utility to delve deeper into the theory and better methods.
The easier it is to get setup the better; ideal would be recommendation on a flexible/efficient optimization framework allowing constraint specification (e.g. can have negative weights; must not have above 20%, must not be below 2% (else %0 weighted) etc... Yes, it would be nice if it also included a free lunch ;-) )
Thank you for taking the time to read this, and any thoughts or comments you have in advance!