Strategies & Backtesting
At the core of Gilito AI is a powerful engine that defines, tests, and ranks trading strategies at massive scale. This page explains what strategies are, how backtesting works, the different strategy families available, and how the Gilito Score measures strategy quality.
What is a Trading Strategy?
A trading strategy is a specific, rule-based approach to deciding when to buy and sell a financial asset. Every strategy in Gilito is defined by three components:
- Technical indicators — Mathematical calculations applied to price and volume data (e.g., Simple Moving Average, Relative Strength Index, MACD)
- Parameters — The specific settings for each indicator, such as lookback periods, thresholds, and multipliers (e.g., a 20-day SMA vs. a 50-day SMA)
- Entry and exit rules — The conditions that trigger buying (entry) and selling (exit) based on indicator readings (e.g., buy when the short SMA crosses above the long SMA)
By combining different indicators, parameters, and rules, Gilito generates millions of unique strategy variations for every asset. Each variation is tested independently to find which combinations work best under different market conditions.
What is Backtesting?
Backtesting is the process of testing a trading strategy against historical price data to see how it would have performed in the past. Instead of risking real money to find out if a strategy works, backtesting simulates trades using actual historical prices.
When Gilito backtests a strategy on an asset, it walks through the historical daily price data bar by bar, applying the strategy's entry and exit rules exactly as they would have been triggered in real time. The result is a complete simulated trading history including every trade, its profit or loss, and aggregate performance metrics.
How Gilito Backtests at Scale
Gilito doesn't just test a handful of strategies. The platform evaluates over 2 million strategy combinations per asset per day, across every asset in every supported market. This is possible thanks to a high-performance backtesting engine built in Rust that runs on dedicated hardware optimized for parallel computation.
- After daily price data is updated, the backtesting engine receives the full price history for each asset
- It generates the complete strategy space — every valid combination of indicators, parameters, and rules
- Each strategy is backtested independently against the asset's price history using parallel processing
- Performance metrics are calculated for every strategy and the results are scored and ranked
- Top strategies are stored and used to generate signals and rankings
Strategy Families
Gilito organizes its strategies into six broad families, each representing a different approach to reading the market. By testing across all families, Gilito ensures that its recommendations are robust and not biased toward a single trading style.
These strategies use two moving averages of different periods (e.g., a fast 10-day and a slow 50-day). A buy signal is generated when the fast average crosses above the slow average, indicating upward momentum. A sell signal occurs on the opposite crossover. Gilito tests combinations of SMA (Simple Moving Average) and EMA (Exponential Moving Average) with many different period lengths.
Momentum strategies use indicators like RSI (Relative Strength Index) and Rate of Change to identify when an asset is gaining or losing strength. They aim to buy assets with strong upward momentum and sell when momentum fades. Different RSI thresholds and lookback periods create thousands of variations.
These strategies bet that prices tend to return to their average over time. They use indicators like Bollinger Bands to detect when an asset is significantly overbought or oversold relative to its historical average. Buy signals trigger when price is abnormally low, sell signals when price is abnormally high.
Trend-following strategies attempt to identify and ride sustained price movements. They use indicators like MACD (Moving Average Convergence Divergence) and ADX (Average Directional Index) to confirm that a strong trend exists before entering a position, and exit when the trend weakens.
Volatility breakout strategies look for moments when price breaks out of a period of low volatility, often signaling the start of a major move. They use Bollinger Band width, ATR (Average True Range), and price channel breakouts to time entries and exits.
The most sophisticated family, multi-indicator strategies combine signals from two or more indicators simultaneously. For example, a strategy might require both a moving average crossover AND an RSI confirmation before entering a trade. These strategies tend to generate fewer but higher-confidence signals.
The Gilito Score
Not all profitable strategies are equal. A strategy that returns 50% but with massive drawdowns and inconsistent results is far less useful than one that returns 30% with steady, reliable performance. The Gilito Score is a composite metric from 0 to 100 that captures the overall quality of a strategy, not just its raw returns.
What the Gilito Score Measures
The Gilito Score is calculated from five key performance metrics, each weighted to reflect what matters most for practical trading decisions:
- Total Return — The overall profit or loss generated by the strategy over the backtesting period. Higher returns contribute to a higher score.
- Sharpe Ratio — A measure of risk-adjusted return. It compares the strategy's excess return to its volatility. A higher Sharpe ratio means the strategy earned more return per unit of risk taken.
- Win Rate — The percentage of trades that were profitable. While a high win rate alone doesn't guarantee a good strategy (if losses are much larger than wins), it is a useful component of the overall score.
- Maximum Drawdown — The largest peak-to-trough decline experienced during the backtesting period. Strategies with smaller maximum drawdowns score higher because they expose you to less downside risk.
- Consistency — How steady and predictable the strategy's returns are over time. A strategy that performs well across different market conditions scores higher than one that only works in specific environments.
Strategy Parameters
Each strategy is defined by a set of parameters that control how its indicators behave and when trades are triggered. Understanding these parameters helps you interpret why a strategy performs the way it does.
Common Parameters
- Indicator type — Which technical indicator the strategy uses (e.g.,
SMA,EMA,RSI,MACD,Bollinger Bands) - Lookback period — The number of days of historical data the indicator uses for its calculation (e.g., a 20-day moving average looks back 20 trading days)
- Thresholds — The levels at which buy or sell signals are triggered (e.g., RSI below 30 for oversold, above 70 for overbought)
- Multipliers — Scaling factors for indicators like Bollinger Bands (e.g., 2x standard deviation bands)
- Signal periods — For indicators like MACD, the period used for the signal line smoothing
Was this article helpful?
Still need help?
Browse these resources or use the chat widget in the bottom-right corner.