When running new backtests or modifying existing backtests, you may encounter what appear to be errors. However, the errors are simply a byproduct of the backtester adhering to the backtest inputs, such as capital allocation limits, which may result in situations where no trades are able to open.
For example, this backtest has been created to have minimal starting capital and a high percentage of capital allocation per position.
It may appear that the backtest encountered an error.
Instead, the backtest ran as long as it could with the allocation limits provided. Eventually, the account “blew up” and could no longer enter new positions to test.
Modifying the strategy’s criteria can create a situation where no trades are entered for one scenario.
This particular trade setup could not enter any positions because the parameters are very narrow and do not create an opportunity to open a position to backtest. One of the P/L lines disappears, and it may seem the backtest encountered an error.
However, scrolling down the results page shows that the test did run but was unable to enter any positions based on the blue and green tabs’ capital allocation inputs. The stats are blank.
In this example, it appears that the green line had an error and stopped running near the end of the backtest, while the other two lines continued to enter positions.
However, looking at the backtest details shows that the green P/L line allocated 5% of capital to each position. As trades continued to lose money and SPY’s price increased, it eventually became impossible for the portfolio to enter new positions based on the backtest’s capital restrictions, so it stopped.