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