Description Usage Arguments Examples
Plots drawdowns of the performance of an object of class Strategy
.
1 2 3 4 5 6 7 8 9 | 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, ...)
|
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. |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ##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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.