algorithm - Optimize strategy results in R -
i have strategy s results of ws (the weight matrix) %*% rets (the returns of assets strategy trading). clear:
pnl = cumsum(rets %*% ws)
the pnl of strategy need satisfy requirements: - 0 correlation market - min weight each security xl - max weight each security xh - more
assuming have optimizer able satisfy constraints above, input should put optimizer ? if put simple returns, rets, i'm not considering strategy. tried use rets * ws, i.e. securities returns multiplied respective weights of strategy, pnl after optimizer looks worse before optimizer. right way ? advice appreciated.
second question: far used optimizer portfolioanalytics "deoptim" algorithm (super slow) , parma (much better, still bit slow , doesn't give documentation constraints need). used fportfolio years ago no great satisfaction. suggestion in r or should move on commercial optimizers ?
thanks everyone!
Comments
Post a Comment