plotDrawdowns {Strategy} | R Documentation |
Plot Strategy Drawdowns
Description
Plots drawdowns of the performance of an object of class Strategy
.
Usage
plotDrawdowns(object, from = NULL, until = NULL, which = NULL,
of = "portfolio", type = "relative", include.costs = TRUE,
use.backtest = FALSE, returnValues = FALSE, ...)
## S4 method for signature 'Strategy'
plotDrawdowns(object, from = NULL, until = NULL,
which = NULL, of = c("portfolio", "assets"), type = c("relative",
"absolute"), include.costs = TRUE, use.backtest = FALSE,
returnValues = FALSE, ...)
Arguments
object |
An object of class |
from |
The date in character format |
until |
The date in character format |
which |
Names or number of assets that should be included in performance. If a portfolio performance from only a subset of the assets is calculated, the weights are scaled accordingly. |
of |
Performance to be extracted from assets separately or the portfolio performance. |
type |
If the |
include.costs |
If |
use.backtest |
If |
returnValues |
If |
... |
Further arguments that can be passed to the underlying plot()-function. |
Examples
##Not run:
# MA(200)-Strategy
params <- list(k=200)
myStrat.MA <- Strategy(assets=assets, strat="MA", strat.params=params)
# Plot MA(200)-Strategy drawdowns
plotDrawdowns(myStrat.MA, from="2015-01-01", until="2015-12-31")
# Plot backtested MA(200)-Strategy drawdowns
# plotDrawdowns(myStrat.MA, from="2015-01-01", until="2015-12-31", use.backtest=TRUE)
##End(Not run)