Backtest Framework
Define a backtest strategy using a backtestStrategy
object.
backtestStrategy
objects contain properties
specific to a trading strategy, such as the rebalance frequency,
transaction costs, management and performance fees, and a rebalance
function. The rebalance function implements the core logic of the
strategy and is used by backtestEngine
during the backtest to allow the strategy
to change its asset allocation and to make trades.
Objects
backtestStrategy | Create backtestStrategy object to define portfolio allocation
strategy (Since R2020b) |
backtestEngine | Create backtestEngine object to backtest strategies and
analyze results (Since R2020b) |
Functions
runBacktest | Run backtest on one or more strategies (Since R2020b) |
equityCurve | Plot equity curves of strategies (Since R2021a) |
summary | Generate summary table of backtest results (Since R2020b) |
Topics
- Backtest Investment Strategies Using Financial Toolbox
Perform backtesting of portfolio strategies using a backtesting framework.
- Backtest Investment Strategies with Trading Signals
This example shows how to perform backtesting of portfolio strategies that incorporate investment signals in their trading strategy.
- Backtest Using Risk-Based Equity Indexation
This example shows how to use backtesting with a risk parity or equal risk contribution strategy rebalanced approximately every month as a risk-based indexation.
- Backtest Strategies Using Deep Learning
Construct trading strategies using a deep learning model and then backtest the strategies using the Financial Toolbox™ backtesting framework.
- Backtest with Brinson Attribution to Evaluate Portfolio Performance
This example shows how to compute Brinson attribution using the output of the MATLAB® backtest framework.