[R-SIG-Finance] [R-sig-finance] rmetrics portfolio backtesting limitations question

tradenet nodecorum at yahoo.com
Thu Jul 9 22:30:51 CEST 2009

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

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

Rmetrics is great stuff, so close to being beyond perfect!  I am very
grateful to the developers and the community.

Warm regards,

View this message in context: http://www.nabble.com/rmetrics-portfolio-backtesting-limitations-question-tp24417340p24417340.html
Sent from the Rmetrics mailing list archive at Nabble.com.

More information about the R-SIG-Finance mailing list