performance {Strategy} | R Documentation |
Get Strategy Performance
Description
Gets the performance of an object of class Strategy
.
Usage
performance(object, of = "portfolio", type = "performance", from = NULL,
until = NULL, which = NULL, use.backtest = FALSE,
include.costs = TRUE)
## S4 method for signature 'Strategy'
performance(object, of = c("portfolio", "assets"),
type = c("performance", "logReturns", "returns"), from = NULL,
until = NULL, which = NULL, use.backtest = FALSE,
include.costs = TRUE)
Arguments
object |
An object of class |
of |
Performance to be extracted from assets separately or the portfolio performance. |
type |
Which type of performance shall be returned. |
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. |
use.backtest |
If |
include.costs |
If |
Examples
## Not run:
# MA(200)-Strategy
params <- list(k=200)
myStrat.MA <- Strategy(assets=assets, strat="MA", strat.params=params)
# Get performance of MA(200)-Strategy
performance(myStrat.MA, from="2015-01-01", until="2015-12-31")
# Get backtest performance of MA(200)-Strategy
# performance(myStrat.MA, from="2015-01-01", until="2015-12-31"
# , use.backtest=TRUE, type="logReturns")
## End(Not run)