The above images show an example of strategy performance for the company ‘NABL’ where the 50 day simple moving average is tracked, and the ‘entry’ and ‘exit’ Bollinger bands are given by subtracting 2.1 and 1.1 standard deviation from the moving average, respectively. Over the last two years, the strategy generated 8 trades for a total return of 63% with an average daily return of 1.55%. Conceivably, a watch list of numerous comparably-performing strategies could generate profound results! Yet, the details provide several reasons for caution. First, observe that five of the 8 trade durations are only 2 to 3 days. Implementation of the strategy—where the entries and exits are performed precisely at the daily close prices upon which the strategy is executed, is very challenging adds uncertainty to real strategy performance. Furthermore, with a price history of only two years, small-cap stocks like NABL are more susceptible to regime change that totally negates past observed behaviors. (Recognize too that, in trading, there is a constant battle between making decisions based on time-tested performance versus recent trends—I forget where I read this, but one could have made a fortune—for several centuries— investing in… alchemy!)
Despite these risks, this strategy guided me to make about 30 sales over the course of 6 months with a ‘win’ rate exceeding 80%, including a final, four week return of 20% in May 2023. Over this period, luck both helped and hurt me, but two major issues led to significant losses leading me to refine my approach. First, I disregarded a ‘sell’ signal on an unrealized loss. After several months of success I had became overconfident and averse to losses and the unrealized loss became even more substantial as I was sure I could wait for it to rebound. Second, another position lost significant value that was entered, based on strategy performance over only the past couple years, and the company was particularly sensitive to the rising interest rate environment. After holding these positions for too long, I took the losses and implemented an improved strategy intended to minimize these risks going forward.
The new strategy I developed combines three indicators—a short duration simple moving average, a long duration simple moving average, and relative strength index. Entry/exit signals are generated when two conditions are met: (1) difference between the two moving averages is negative/positive and (2) the RSI prints at a sufficiently low/hi percentile relative to the historical RSI distribution. The four parameters for optimization, therefore, are the two moving average durations, the RSI lookback period, and the RSI oversold/overbought percentile. In a ‘d’oh!’ moment, I also realized that I could significantly scale up the number of backtests, by testing the same downloaded price history for a security with different parameter sets, instead of repeatedly downloading the same price history. Thus, I generated full factorial matrices defining over 700 sets of the four parameters, and then generated results for each company in the S&P500, totalling nearly 400000 10-year backtests (run in ~2 hrs on my 2021 MacBook Pro). To filter the backtest results, I generated a watchlist of the 70 best-performing (daily return, total return) strategies that: (1) executed at least 10 trades over the past 10 years and (2) traded for at least 10 percent of the time (i.e. >365 days out of the 3650 day backtest).