rmetrics portfolio backtesting limitations question
I found the problem with the truncation of the asset list -- R only allows 500 characters in a formula. My next step is to copy, rename and modify the original portfolioBacktest function to add another parameter, a vector of strings which are the asset names. Can I just execute the code for the new function in the GUI and thereby make it available to my script? If I can figure out how to do that, perhaps I can fix the windowing function to allow shorter window sizes and no smoothing of weights (our strategies are very short term so rebalancing smoothness is not an issue). Thank you, Andrew
tradenet wrote:
I have been working with the portfolioBacktesting function in Rmetrics and it seems to be a very powerful and useful function. There seems to be some limitations/bugs that seriously limits the utility of the function and I was hoping someone has found workarounds: 1.) If I specify a large number of assets, say 50, in the formula, e.g. SPX ~ asset1 + asset2....+asset50 then it seems only the first 29 assets are used in the analysis. ncol(backtestPortfolios$weights) always returns 29 and assets near the end of the list get nonzero weights if I move their names to the beginning of the formula string, otherwise those assets do not appear in the results. Is there a way to NOT compare results to a benchmark? I'd like to just supply a timeseries of asset returns for a date range and run the analysis using all assets in the timeseries as portfolio candidates. BTW, if anyone knows an easy way to dump out the weights to a file I'd appreciate the insight 2.) the 12m window horizon seems to be the only one that works: setWindowsHorizon(backtestBT)<-"12m" works, but <-"3m" yields an error message. I thought this might have to do with the lambda smoothing, so I set the smoothing to "1m" and still no go 3.) does anyone know how to turn smoothing completely off? I would like to see the raw, unsmoothed weights 4.) is there anyway to plot the results without performing weight smoothing -- I don't want to have to do smoothing to look at all the great plots and results. Rmetrics is great stuff, so close to being beyond perfect! I am very grateful to the developers and the community. Warm regards, Andrew
View this message in context: http://www.nabble.com/rmetrics-portfolio-backtesting-limitations-question-tp24417340p24428274.html Sent from the Rmetrics mailing list archive at Nabble.com.