backtest-plots: Portfolio backtesting plots

backtest-plotsR Documentation

Portfolio backtesting plots

Description

Creates and displays plots of cumulative assets returns, of portfolio weights, of rebalanced weights, of drawdowns and of a report summary for backtesting.

Usage

   



backtestPlot(object, which="all", labels=TRUE, legend=TRUE, at=NULL, 
  format=NULL, cex=0.6, font=1, family="mono")

backtestAssetsPlot(object, labels=TRUE, legend=TRUE, at=NULL, format=NULL)
backtestWeightsPlot(object, labels=TRUE, legend=TRUE, at=NULL, format=NULL)
backtestRebalancePlot(object, labels=TRUE, legend=TRUE, at=NULL, format=NULL)
backtestPortfolioPlot(object, labels=TRUE, legend=TRUE, at=NULL, format=NULL)
backtestDrawdownPlot(object, labels=TRUE, legend=TRUE, at=NULL, format=NULL)
backtestReportPlot(object, cex=0.6, font=1, family="mono")

Arguments

object

a list, returned from running the function portfolioSmoothing.

which

an integer or string value. If the argument is an integer then it specifies which backtest plot should be displayed. If the argument take the character value all, which is the default, then all 6 available backtest plots will be displayed.

labels

a logical flag, determining if the graph should be labeled automatically. This is the default case labels=TRUE. If set to FALSE then the graph will be displayed undecorated and the user can it decorate by himself.

legend

a logical flag, determining if to the graph a legend should be added. This is the default case labels=TRUE. If set to FALSE then the graph will be displayed undecorated and the user can it decorate by himself.

at

if NULL the time-axis ticks will be selected automatically. If at is a vector of timeData character formatted dates then the axis ticks ar taken from this vector.

format

if NULL the time-axis ticks are labeled automatically. If format is a POSIX format string, tthen the label formats are taken from this string.

cex, font, family

font size, font and font family specification for the report.

Details

These backtest plot summarises the results obtained from portfolio backtesting.

The function backtestAssetsPlot displays the set of possible assets to construct a portfolio.

The function backtestWeightsPlot displays the recommended weights for investment.

The function backtestRebalancePlot displays the weight changes over time for individual assets and for the portfolio.

The function backtestPortfolioPlot displays the daily, benchmark and portfolio series of a portfolio backtest.

The function backtestDrawdownPlot displays the daily drawdowns for the benchmark and the portfolio.

The function backtestReportPlot summarises the results from a portfolio backtest.

References

W\"urtz, D., Chalabi, Y., Chen W., Ellis A. (2009); Portfolio Optimization with R/Rmetrics, Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.


fPortfolio documentation built on April 25, 2023, 9:11 a.m.