Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
braverock
GitHub Repository: braverock/portfolioanalytics
Path: blob/master/man/backtest.plot.Rd
1433 views
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/backtest.plot.R
\name{backtest.plot}
\alias{backtest.plot}
\title{generate plots of the cumulative returns and drawdown for back-testing}
\usage{
backtest.plot(
  R,
  log_return = FALSE,
  drawdown_on = 1,
  plotType = "both",
  main = NULL,
  colorSet = NULL,
  ltySet = NULL,
  lwdSet = NULL
)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns}

\item{log_return}{arithmetic return or log return, the default is arithmetic return}

\item{drawdown_on}{the plot will shadow the full time period of the maximum drawdown and recovery of the first portfolio.
Use number (e.g. 1, 2, 3) to indicate which portfolio drawdown interval you wish to track, or NULL to not shadow any period.}

\item{plotType}{"cumRet", "drawdown", or the default is both}

\item{main}{users can design title by providing a character of main}

\item{colorSet}{users can design the color by providing a vector of color}

\item{ltySet}{users can design lty by providing a vector of lty}

\item{lwdSet}{users can design lwd by providing a vector of lwd}
}
\description{
generate plots of the cumulative returns and drawdown for back-testing
}
\author{
Peter Carl, Xinran Zhao, Yifu Kang
}