| plot.backtest_result | R Documentation |
S3 plot method for visualizing backtest performance.
## S3 method for class 'backtest_result'
plot(x, type = "performance", ...)
x |
backtest_result object |
type |
Plot type: "performance", "drawdown", "weights", or "all" |
... |
Additional plotting parameters |
NULL (creates plot)
data("sample_prices_weekly")
mom <- calc_momentum(sample_prices_weekly, lookback = 12)
sel <- filter_top_n(mom, n = 10)
W <- weight_equally(sel)
res <- run_backtest(sample_prices_weekly, W)
if (interactive()) plot(res, type = "performance")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.