Skip to main content
AI Market Summary
Loading market intelligence...

Algorithm Performance Backtest

Out-of-sample predictions on 4,000+ stocks demonstrating real predictive power

Total Predictions
Unique Stocks
Spearman IC
Directional Accuracy
Top 20 Long-Short
Top 20 Long-Only
Test Period
Predicted vs Actual Stock Returns
Loading backtest data...
Preparing to fetch data

Strategy Performance

Simulated returns from Top 20 stock selection strategies, rebalanced each period

Cumulative Returns (Equity Curve)

Period Returns by Strategy

Long vs Short Portfolio Returns

Strategy Drawdown

Methodology

Out-of-Sample Testing

This backtest displays predictions made on data the model has never seen during training. The model was trained on data prior to September 2022, and these predictions are from January 2024 onwards—ensuring a complete separation between training and test data.

During development, we split the historical data into train, validation, and test sets with proper embargo periods to prevent any data leakage. The validation set is used to tune hyperparameters and select the best model configuration without touching the test set. Once optimal parameters are determined through validation, the final production model is trained on the complete history of available data. This ensures top performance with an always up-to-date model.

Prediction Horizons

Toggle between 1-month and 3-month forward returns. The 1-month predictions forecast stock returns over the next 30 days, while 3-month predictions forecast returns over 90 days. Both demonstrate the model's ability to identify market-beating opportunities.

Reading the Chart

Each point represents a single prediction. The X-axis shows what the model predicted, and the Y-axis shows what actually happened. The green regression line shows the actual relationship between predictions and outcomes - a positive slope indicates predictive power.

Key Statistics

Spearman IC (Information Coefficient) measures how well the ranking of predicted returns matches the ranking of actual returns. Directional accuracy shows how often the model correctly predicts whether a stock will go up or down. Higher values indicate better predictive performance.

Replicate This Strategy

The strategy performance shown above can be replicated using our platform. Here's how it works:

  1. Select your horizon: Choose 1-month or 3-month predictions depending on your investment timeframe.
  2. Build your long portfolio: Select the top 20 stocks with the highest predicted returns. These are your 'buy' positions, each weighted at 5% of your portfolio.
  3. Build your short portfolio (optional): Select the bottom 20 stocks with the lowest predicted returns. These are your 'sell short' positions for a long-short strategy.
  4. Rebalance periodically: For 1-month predictions, rebalance monthly. For 3-month predictions, rebalance quarterly. This ensures your portfolio always holds the most promising stocks.

Quick Links:
View Top Predictions (Long) — Find the best buying opportunities
View Bottom Predictions (Short) — Find potential short-selling candidates
Portfolio Optimizer — Create diversified, risk-optimized portfolios from your selections

Performance Statistics

Metric Value Description
Total Predictions Loading... Number of individual stock predictions in test period
Unique Tickers Loading... Number of different stocks with predictions
Spearman IC Loading... Rank correlation between predicted and actual returns (Information Coefficient)
Mean Absolute Error Loading... Average prediction error magnitude
Directional Accuracy Loading... Percentage of predictions with correct sign (up/down)
Top 20 Long-Short Return Loading... Cumulative return from longing top 20 and shorting bottom 20 predictions each period
Top 20 Long-Only Return Loading... Cumulative return from longing top 20 predictions each period
Test Period Start Loading... First prediction date in test set
Test Period End Loading... Last prediction date in test set

Understanding Quantitative Finance: A Primer

The intersection of machine learning and finance represents one of the most intellectually demanding domains in modern quantitative research. Below, we provide a concise overview of the theoretical foundations underlying algorithmic trading systems.

Financial Machine Learning

The Prediction Problem

Unlike traditional ML applications, financial markets exhibit several unique characteristics that make prediction exceptionally challenging:

  • Low Signal-to-Noise Ratio: Asset returns contain predominantly noise, with predictive signals often explaining less than 5% of variance. A Spearman IC of 5-10% is considered excellent in practice.
  • Non-Stationarity: Market dynamics evolve over time. Relationships that held in one regime may reverse in another, requiring adaptive models and careful validation.
  • Adversarial Nature: Markets are competitive—profitable signals attract capital until arbitraged away. This 'alpha decay' means models require continuous research and refinement.

Cross-Validation in Finance

Standard k-fold cross-validation is inappropriate for time-series data due to temporal dependencies. We employ:

  • Purged Cross-Validation: Eliminating samples near the train-test boundary to prevent information leakage from overlapping prediction horizons.
  • Embargo Periods: Adding buffer zones between training and testing periods, typically equal to the prediction horizon length.
  • Combinatorial Purged CV: Testing multiple train/test combinations while maintaining temporal integrity, providing robust out-of-sample estimates.

Feature Engineering

Raw price data must be transformed into stationary, predictive features. Common transformations include returns (arithmetic and logarithmic), z-scores, percentile ranks, and technical indicators. The choice of feature scaling and normalization significantly impacts model performance.

Financial Risk Management

Fundamental Risk Measures

Professional portfolio management requires rigorous risk quantification:

  • Volatility (σ): The standard deviation of returns, typically annualized by multiplying by √252 for daily data. Measures total risk but doesn't distinguish between upside and downside.
  • Maximum Drawdown: The largest peak-to-trough decline in portfolio value. Critical for understanding worst-case scenarios and investor psychology—a 50% drawdown requires a 100% gain to recover.
  • Value at Risk (VaR): The maximum expected loss over a given time horizon at a specified confidence level (e.g., 95% VaR). Widely used but criticized for not capturing tail risk.
  • Conditional VaR (Expected Shortfall): The expected loss given that losses exceed VaR. Addresses VaR's limitations by quantifying the severity of tail events.

The Sharpe Ratio

Defined as (Rp - Rf) / σp, the Sharpe ratio measures risk-adjusted returns—excess return per unit of volatility. A Sharpe ratio above 1.0 is generally considered good, above 2.0 is excellent. However, be cautious: Sharpe ratios can be artificially inflated by illiquidity, leverage, or short sample periods.

Systematic vs. Idiosyncratic Risk

Total risk decomposes into market risk (β × market movements) and company-specific risk. The Capital Asset Pricing Model (CAPM) suggests only systematic risk is compensated, as idiosyncratic risk can be diversified away. Modern factor models extend this to multiple risk factors (size, value, momentum, quality).

Portfolio Construction

Modern Portfolio Theory

Harry Markowitz's seminal work (1952) established that portfolio risk is not simply the weighted average of individual asset risks—correlations matter. Two assets with imperfect correlation (ρ < 1) combine to produce a portfolio with lower risk than either asset alone.

The Efficient Frontier

For any given return target, there exists a portfolio with minimum variance. The set of all such portfolios forms the efficient frontier—rational investors should only hold portfolios on this frontier. Points below the frontier are suboptimal (same risk, lower return), while points above are unattainable.

Optimization Challenges

Mean-variance optimization is notoriously sensitive to input estimates:

  • Estimation Error: Expected returns are difficult to estimate accurately. Small errors in inputs can lead to dramatically different optimal portfolios.
  • Concentration Risk: Unconstrained optimization often produces extreme positions. Practical implementations impose position limits and sector constraints.
  • Regularization: Techniques like shrinkage estimators, Black-Litterman, and robust optimization help stabilize portfolio weights.

Equal-Weight vs. Optimized

The 1/N (equal-weight) portfolio often outperforms optimized portfolios out-of-sample due to estimation error. Our backtest uses equal 5% weights as a robust baseline. For enhanced portfolios, our optimizer applies constraints and regularization to improve real-world performance.

Long-Short Equity Strategies

Market Neutrality

A dollar-neutral long-short portfolio (equal long and short exposure) has zero net market exposure. This isolates the 'alpha' from stock selection while hedging market risk. The strategy profits when long positions outperform short positions, regardless of market direction.

Sources of Return

Long-short returns decompose into:

  • Long Alpha: Outperformance of long positions versus the market.
  • Short Alpha: Underperformance of short positions versus the market (we profit when shorts decline).
  • Short Rebate: Interest earned on short sale proceeds (reduced by borrowing costs in practice).

Practical Considerations

Real-world implementation involves transaction costs (commissions, bid-ask spreads), market impact (moving prices against you), short-selling constraints (locate requirements, borrowing costs), and capacity limits. These frictions reduce realized returns from theoretical backtests.

Rebalancing Frequency

More frequent rebalancing captures alpha faster but incurs higher transaction costs. The optimal frequency balances signal decay against trading costs. For return predictions, monthly or quarterly rebalancing typically offers a favorable trade-off.

Factor Investing

What Are Factors?

Factors are systematic sources of return that explain why certain stocks outperform others over time. Unlike stock-picking based on individual company analysis, factor investing targets broad, persistent characteristics shared by groups of securities. Academic research has identified numerous factors, though only a handful have proven robust across markets and time periods.

The Classic Factors

  • Market (β): Exposure to the overall equity market. The original factor from CAPM—stocks with higher beta move more with the market and historically earn higher returns (with higher risk).
  • Size (SMB): Small-cap stocks tend to outperform large-cap stocks. Fama and French (1993) documented this 'small minus big' premium, though it has weakened in recent decades.
  • Value (HML): Stocks with low price-to-book ratios outperform growth stocks over time. This 'high minus low' factor reflects buying cheap assets and selling expensive ones.
  • Momentum (UMD): Stocks that performed well over the past 3-12 months tend to continue outperforming. Jegadeesh and Titman (1993) documented this 'up minus down' effect across markets.
  • Quality (QMJ): Companies with high profitability, stable earnings, and low leverage outperform. Asness et al. (2019) formalized this 'quality minus junk' factor.
  • Low Volatility: Paradoxically, low-risk stocks often deliver higher risk-adjusted returns than high-risk stocks, contradicting basic CAPM predictions.

Factor Models

Multi-factor models decompose returns into systematic components:

  • Fama-French 3-Factor: Market + Size + Value. Explains ~90% of diversified portfolio returns.
  • Carhart 4-Factor: Adds Momentum to the Fama-French model.
  • Fama-French 5-Factor: Adds Profitability and Investment factors, though Momentum remains significant.

Factor Timing vs. Factor Exposure

Static factor exposure (always tilting toward value, momentum, etc.) has historically rewarded patient investors. Factor timing—dynamically adjusting factor weights—is far more difficult. Factors can underperform for years before reverting, and timing signals are notoriously unreliable. Most practitioners recommend diversified, consistent factor exposure rather than tactical allocation.

Machine Learning and Factors

Our prediction model implicitly captures factor exposures through its features. By learning patterns from fundamental data, price momentum, and market conditions, the model identifies stocks likely to outperform—effectively combining multiple factors in a data-driven way. This approach can discover non-linear factor interactions that traditional linear models miss.

Important Disclaimer

Past performance does not guarantee future results. The backtest results shown here are based on historical data and may not be indicative of future performance. Stock market investments involve risk, including the potential loss of principal. The predictions shown are for informational purposes only and should not be considered as financial advice. Always consult with a qualified financial advisor before making investment decisions.

My Portfolio

Investment Dashboard

Loading your portfolio...