I Analyzed 100,000 Backtests to Find the ‘Best’ Trading Indicator. The Answer Was Not What I Expected.
Press enter or click to view image in full size What makes a good indicator – fundamentals, trend, and timingAs the founder of an algorithmic trading platform, I have a unique view into what traders think works versus what actually works. Over the past few years, users on my platform, NexusTrade, have run over 114,000 backtests, creating a massive dataset of real-world trading ideas.
I decided to analyze this data to answer a simple, coveted question: What is the best trading indicator?
Is it the RSI? The MACD? A complex combination of moving averages? I built a data pipeline to process every component from these 100,000+ strategies, segmented them by performance, and ranked them by their median Sharpe ratio.
The result was surprising. The ‘best’ indicator wasn’t a single, magical tool. Instead, the data revealed a powerful truth about how successful strategies are structured:
The most profitable strategies don’t rely on a single ‘best’ indicator. They use a layered approach, combining simple fundamental filters to select what to trade with technical indicators to decide when to trade.
Let’s break down what that means.
Full Disclosure: I’m the founder of NexusTrade, the platform that generated this data. To ensure full transparency, all code used for this analysis is open-source and available on GitHub.
The Indicators of Failure: What the Worst Strategies Have in Common
Before we look at the winners, the losers told a clearer story. The worst-performing strategies consistently misused indicators in three ways:
- Hyper-Short Timeframes: The most common failure was using indicators with extremely short lookback periods, like a 1-Day SMA or a 3-Day EMA. These indicators are pure noise. They generate constant buy/sell signals on meaningless daily fluctuations, causing strategies to get whipsawed and bleed money from transaction costs.
- Signal without Context: Many failed strategies used a single indicator in a vacuum. A rule like Sell when RSI > 70 is naive because an asset can remain “overbought” for months in a strong uptrend. Without a broader trend or volatility context, this simple signal becomes a tool for selling winners far too early.
- Over-Complexity: The most convoluted strategies were often the worst. When you use too many lagging indicators, they often end up confirming each other late, providing no real edge while being impossible to manage.
Press enter or click to view image in full size Complexity vs. Performance: More Rules, Worse Results. Each dot is a strategy component. There is a statistically significant trend: as complexity increases (moving right), Sharpe Ratio tends to fall (moving down). Note how the worst-performing red dots are far more complex than the tightly grouped, simpler green dots.The Anatomy of a Winning Strategy: A Three-Layered Approach
When I analyzed the elite corpus, I found that successful strategies consistently used a hierarchy of tools to make decisions. They didn’t use one indicator as a crystal ball; they used a combination of filters to build a complete “state machine” for the market.
Layer 1: The Fundamental Screen (What to Trade)
This layer is optional but strongly recommended.
The very best strategies often began not with a chart, but with a simple question: “Is this a healthy company worth investing in?”
- Winning Use-Case: A common elite strategy structure involved a monthly rebalancing rule to create a “qualified universe” of stocks where Trailing 12-Month Net Income > 0 and Total Debt / Total Assets < 0.5.
- Why it Works: This fundamental filter acts as a crucial guardrail. It ensures the strategy is only fishing in a pond of profitable, financially stable companies. It systematically removes the risk of buying a “value trap” — a company that looks technically cheap but is fundamentally broken.
Layer 2: The Long-Term Trend Filter (When to Be in the Market)
Once the universe of quality stocks was established, the next question was: “Is now a safe time to be invested in the stock market at all?”
- Winning Use-Case: The single most powerful technical indicator in the dataset was the 200-day Simple Moving Average (SMA), used as a binary trend filter. For example: Only execute buy signals if the SPY Price > 200-Day SPY SMA.
- Why it Works: This rule keeps the strategy in cash or defensive assets during major bear markets. It doesn’t try to predict the bottom; it simply waits for the long-term trend to prove it has turned positive again. This one rule is the single most effective tool for avoiding catastrophic drawdowns.
Layer 3: The Short-Term Timing Signal (When to Enter and Exit)
Only after the fundamental and trend filters were passed did the strategy look at short-term indicators to time the actual buy and sell orders.
Winning Use-Cases:
- Mean Reversion: For broad indexes, Buy when 14-Day RSI < 30 (buy the dip in an uptrend).
- Momentum: For individual growth stocks, Buy when Price > Upper 20-Day Bollinger Band (join a volatility breakout).
- Why it Works: With the first two layers managing the big-picture risk, these short-term indicators become much more reliable. They are no longer being used to predict the entire market, but simply to find high-probability entry points within an already favorable environment.
My Methodology: Finding the Signal in 114,549 Backtests
To get these answers, I built a two-step data pipeline to analyze every strategy ever tested on NexusTrade. You can view the full open-source code here.
Step 1: The Extraction Script (Node.js)
First, a script efficiently queried our database in small batches, avoiding memory overload. For each of the 114,549 backtests, it deconstructed every strategy into its core components: the indicators, conditions, and actions. Crucially, it created two versions of each component: one with specific tickers (e.g., RSI on AAPL) and one without (RSI on Stock), allowing me to analyze what works for a specific asset versus what works in general.
function removeAssetsFromIndicator(indicator) {
const cloned = JSON.parse(JSON.stringify(indicator));
delete cloned.targetAsset;
return cloned;
}
Step 2: The Analysis Script (Python & Polars)
Next, a high-performance Python script took over. It used the Polars library — a tool designed for huge datasets — to process the millions of data points generated in step one.
- Normalization: The script intelligently grouped similar rules together. For instance, RSI > 69.8 and RSI > 70.1 were both normalized to RSI > 70. This ensures we’re analyzing the core idea, not minor variations.
- Performance Calculation: It calculated key risk-adjusted metrics like the Sharpe and Calmar ratios for every single backtest run associated with each component.
# Simplified: Calculating metrics with Polars
df = df.with_columns([
(((1 + pl.col("percentChange") / 100) ** (365 / pl.col("days"))) - 1).alias("cagr"),
(pl.col("cagr") / pl.col("maxDrawdown").abs()).alias("calmar")
])
- Corpus Segmentation: Finally, it aggregated these results to find the median performance for every unique strategy component. From there, I segmented them into performance “corpuses” — from the top 1% elite down to the bottom 10% terrible — allowing me to isolate the DNA of success and failure.
But Are the Patterns Statistically Significant?
To ensure these patterns weren’t just random chance, I performed a standard statistical analysis. I used a Two-Sample T-Test to compare the average performance metrics of the components found in the elite corpus versus those in the terrible corpus for the “strategiesWithoutAssets” category.
The results were definitive.
Press enter or click to view image in full size Distribution of Sharpe Ratios for Elite vs. Terrible Strategies. The data shows a massive, statistically significant gap. Elite strategies (green) are consistently profitable, while terrible strategies (red) consistently lose money. The overlap is virtually nonexistent.The difference in the mean Sharpe Ratio between the two groups yielded a p-value of less than 0.000001. A Cohen’s d test showed a large effect size (d = 0.89), confirming the performance gap is not just real, but substantial.
Translation: There is a less than 1-in-a-million chance that the superior performance of the “elite” strategies is a fluke. The patterns aren’t just anecdotal; they are mathematically robust.
Conclusion: Stop Searching for the Best Indicator, Start Building a State Machine
The data from over 100,000 backtests is unequivocal: there is no single “best” indicator. The quest for one is a fool’s errand that leads to the anti-patterns of failure.
The most successful strategies don’t use indicators to predict the future. They use them to build an intelligent State Machine that asks a series of logical questions before ever placing a trade:
- State 1: Is this a quality asset worth trading? The strategy first uses simple fundamental filters (like positive earnings and low debt) to screen its universe. If the company is fundamentally weak, the machine stops. If it’s strong, it proceeds to the next state.
- State 2: Is the broader market environment favorable? Next, it uses a long-term technical indicator (like the 200-Day SMA on the SPY) to determine if the overall market is in a healthy uptrend. If it’s in a bear market, the machine stays defensive and waits. If the trend is positive, it proceeds.
- State 3: Is there a high-probability entry signal right now? Only after the first two states are confirmed does the strategy look at short-term technical indicators (like RSI or Bollinger Bands) to time the specific entry and exit.
The ‘best’ indicator is simply the right tool for the right question.
This entire analysis was made possible by the powerful backtesting engine and the sheer volume of data generated by users on NexusTrade.
If you want to put these principles into practice, you can use the platform’s AI agent to build your own intelligent state machine without writing a single line of code.
Stop searching for a magic indicator and start building a smarter system that understands market context.