

Rebalancing can be done in a standard Amibroker backtest but the result is usually a ‘forced’ rebalance where positions are completely closed and then re-entered at the intended size. Rebalance open positions to a target size This is most efficiently programmed with a CBT rather than built-in Amibroker functions. Volatility-weighted position sizing is a good example where trade size can be adjusted based on portfolio or trade volatility. Many advanced position sizing methods require knowledge of the symbols which will actually be entered on a given bar/day and/or which symbols already have open positions. Such a task can only be done effectively with use of the CBT and this is covered in session 4 of the Amibroker CBT Intensive course. It may also require ongoing rebalancing and the use of additional margin. To create a hedge position effectively, it’s necessary to be able to calculate the value of all open positions on a bar-by-bar basis and have a method to initiate a hedge on a chosen symbol with a position size appropriate to the size of those open positions. This way your backtest will never enter trades that would not have been possible due to real-life portfolio constraints. Having a way to limit the number of orders each day is a task best suited to the CBT as it provides complete control over orders, signals and equity. Therefore you need to have a method to limit the number of ‘orders’ each day. Enter trades using a limit price while respecting capital limitationsīacktesting limit orders can be problematic in a portfolio simulation where you don’t know how many orders will be filled in advance. This is useful for many tasks, for example, if you wanted to limit the number of open trades per sector at any given time. The CBT provides the ability to modify signals before they are processed in the backtest. This can give you visual insight into the effectiveness of your strategy. Or you could chart performance against buy and hold or random. Using the CBT to store backtest data also means that you can produce custom charts and graphics that can allow a more detailed visualization of your strategy performance.įor example, you could chart how certain metrics like Sharpe ratio or profit factor evolve over time. Store data that can be used in custom Report Charts Once again, this gives further insight into your backtesting and analysis. For example, you could include metrics such as top 5 drawdowns, T-Test or look at performance versus a random simulation.Īlmost anything you can think of can be calculated and then shown in the Amibroker backtest report. Just as you can use the CBT to add metrics to the trade list, you can also add portfolio level metrics to the backtest report. Add custom portfolio (aggregate) metrics to the standard AmiBroker backtest report With more metrics you can gain greater insight into the performance of individual trades. The edge ratio measures how edge of a trading signal evolves over time. For example, you could include in-trade metrics such as correlation, volatility or edge ratio.

However, it’s possible to create many more metrics with use of the high-level CBT. The standard Amibroker trade list offers a handful of useful metrics such as signal date, % profit and position size etc. You can add custom trade metrics to the standard AmiBroker trade list

Here are 13 reasons why you should consider learning the Amibroker CBT: 1. This opens up a whole world of possibilities from creating custom metrics and charts to advanced trade processing, position sizing and Amibroker portfolio backtesting. In other words, you can create your very own backtesting environment. The Amibroker CBT can be difficult to grasp at first but it offers the ability to take complete control of the backtesting process.
AMIBROKER FILE EXAMPLES HOW TO
This class teaches you how to use the Amibroker custom backtester (CBT). This week we published another new course to Marwood Research called Amibroker CBT Intensive.
