plot.backtest_result: Plot Backtest Results

View source: R/backtesting.R

plot.backtest_resultR Documentation

Plot Backtest Results

Description

S3 plot method for visualizing backtest performance.

Usage

## S3 method for class 'backtest_result'
plot(x, type = "performance", ...)

Arguments

x

backtest_result object

type

Plot type: "performance", "drawdown", "weights", or "all"

...

Additional plotting parameters

Value

NULL (creates plot)

Examples

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")

PortfolioTesteR documentation built on Nov. 5, 2025, 5:23 p.m.