In this tutorial, you'll run your first backtest using one of Stratify's template strategies. No coding required - just follow these steps and you'll be analyzing trading strategies in minutes.
Time required: 5-10 minutes
Prerequisites: A Stratify account (sign up for free at localhost:3000/register)
First, navigate to the backtesting feature in your Stratify app:
Stratify provides 4 ready-to-use template strategies. You'll find them automatically loaded in the Strategies tab:
Buys when RSI is oversold (below 30) and the short moving average crosses above the long moving average. Sells when RSI is overbought (above 70) or the moving averages cross downward.
Best for: Trending markets • Risk: 2% stop loss, 5% take profit
Buys when price touches the lower Bollinger Band and RSI confirms oversold conditions. Sells when price returns to the middle or upper band.
Best for: Range-bound markets • Risk: 3% stop loss, 4% take profit
Buys when price breaks above the 20-day high with volume 1.5x above average. Uses a trailing stop to capture extended trends.
Best for: Explosive moves • Risk: 2.5% stop loss, 6% take profit, 1% trailing stop
Combines social media sentiment analysis with RSI indicators. Trades when high positive sentiment >0.6 aligns with technical signals.
Best for: News-driven stocks • Risk: 3% stop loss, 5% take profit
Tip: For your first backtest, we recommend starting with the Momentum - RSI & MA Crossover strategy. It's straightforward, widely used, and performs well in trending markets.
Now let's test the Momentum strategy on historical data:
Symbol
Enter AAPL (Apple) - A stable, liquid stock perfect for testing
Date Range
Start: 2024-01-01
End: 2024-12-31
(A full year gives you enough data to see how the strategy performs)
Timeframe
Keep the default 1d (daily bars)
Initial Capital
Keep the default $100,000
Commission & Slippage
Keep defaults (0.1% each) - These represent real-world trading costs
What's happening now: Stratify is loading historical price data for AAPL from 2024, applying the Momentum strategy rules to every trading day, simulating all buy and sell orders, tracking your positions, and calculating performance metrics.
Your backtest will complete in a few seconds. Here's how to interpret the results:
The overall profit or loss as a percentage. If you started with $100,000 and ended with $108,000, your total return is +8.0%.
Good: Positive returns • Great: Above 10% annually
Number of complete buy-sell cycles. More trades mean more opportunities but also more commissions.
Watch out: Too many trades (>100/year) can eat up profits with commissions
Percentage of trades that made money. A 60% win rate means 6 out of 10 trades were profitable.
Good: Above 50% • Note: High win rate doesn't guarantee profits if losses are larger than wins
The largest peak-to-trough decline. If your account went from $110,000 down to $95,000, the max drawdown is 13.6%.
Lower is better: Below 20% is good • Important: Can you emotionally handle this loss?
Risk-adjusted returns. It measures how much return you're getting per unit of risk. Higher is better.
Below 1.0: Not great • 1.0-2.0: Good • Above 2.0: Excellent
Pro Tip: Don't focus only on total return. A strategy with 50% return but 40% max drawdown is riskier than one with 30% return and 10% drawdown. Look at the complete picture.
The real power of backtesting comes from comparing different approaches. Let's compare all 4 template strategies:
The comparison view shows all strategies side-by-side. Look for:
Key Insight: Different strategies work better in different conditions. Momentum works in trends, Mean Reversion works in ranges, Breakout catches explosions, and Sentiment captures news-driven moves.
Congratulations! You've run your first backtest. Now you can:
Try other symbols like MSFT, TSLA, SPY, or QQQ. Some strategies work better on different stocks.
Test on 2020-2023 to include bear markets. Does your strategy survive tough times?
Test all 4 strategies at once with the "Bulk Test Multiple Strategies" button.
Clone a template and modify it, or build one from scratch.
Now that you know how to backtest, learn how to create and customize your own trading strategies.
Build Your First Strategy→