Methodology
How the model is built
No black box, no LLM, no hidden assumptions. Gradient-boosted trees on past-only features, validated walk-forward across 16 markets.
1. Is this an LLM?
No. We deliberately don't use large language models for the model itself.
LLMs hallucinate confidently, are non-deterministic (same input → different output), are expensive at scale, and have no theoretical basis for predicting price movement.
Instead we use XGBoost — a gradient-boosted decision tree ensemble — on technical indicators plus a small set of macro and cross-asset features. The output is deterministic: the same input always yields the same result.
2. What features does the model see?
All features are computed from past-only data. There is no look-ahead leakage.
• Price-based: returns over multiple lookbacks (1d, 5d, 20d), z-scores, distance from moving averages • Volume: relative volume vs N-day median, on-balance volume • Volatility: ATR, realized volatility, Bollinger Band position • Momentum: RSI, MACD, rate-of-change • Microstructure: range/body ratios, gap features, intraday high-low spread • Calendar: day-of-week, day-of-month seasonality • Macro and cross-asset: VIX, the 10-year US Treasury yield, the US dollar index, gold and oil returns, and rolling correlation with the S&P 500 and NASDAQ
The exact set is in backend/agents/statistical.py and backend/agents/external_features.py. We do not use fundamental data, analyst targets, or news scores in the model.
3. How is it validated?
Walk-forward TimeSeriesSplit cross-validation, not random K-fold. Random K-fold would shuffle the time order and inadvertently let the model train on future data — the #1 silent mistake in financial ML.
Specifically: we train on the oldest N% of data, test on the next chunk, then expand the training window forward. Every test point is data the model has never seen.
4. What does the product show?
Charts and technical indicators — no forecasts, price targets or buy/sell signals.
5. Where does it fail?
Fails predictably on: • Earnings-day gaps — technical features can't anticipate fundamentals • Halted or suspended stocks — no recent data • First-day IPOs — no history at all • Black swan events (COVID-style shocks, war, regulatory shutdowns) • Very thin / illiquid micro-caps — noise dominates
6. Why not LSTM or Transformers?
Three reasons.
First, tabular financial features are XGBoost's home turf. The deep-learning vs gradient-boosting gap on small tabular data is well-documented: typically 1-2% in either direction, with XGBoost winning more often than not.
Second, Render's free-tier 512MB RAM ceiling won't fit TensorFlow, and we'd rather keep running costs low than pay for more.
Third, determinism and auditability. Tree models make it easier to inspect which features matter. Neural networks are harder to explain in a way a user can verify.
7. How does news sentiment work?
We use a deterministic lexicon scorer based on the Loughran-McDonald financial dictionary, plus our own multi-word phrase list. Each headline is scored ±1 and aggregated.
We explicitly do not use LLM-based sentiment. LLMs give different scores for the same headline on different calls, occasionally mark obviously negative news as positive when wrapped in ambiguous language, and are slow and expensive at scale.
A lexicon-based score isn't perfect — but it's reproducible, and we can show you exactly which words triggered the score. News sentiment scores are no longer shown in the product, and they do not feed into the model.
8. How often does the model retrain?
The models are pre-trained and pooled: the daily horizons (1d / 3d / 7d) and the long horizons (1mo / 3mo / 6mo) each load a model trained across many tickers in a market, rather than training a fresh model on every request.
On each request we:
1. Pull the latest OHLCV for the ticker 2. Compute features 3. Load the pre-trained model for that market and horizon
The pooled models are retrained offline, not on every request. The model's forward output is never shown in the product.
9. What is the prediction format?
The model is trained to produce a point estimate and directional read for each horizon, but those forward per-stock outputs are not surfaced in the product. What you see is the technical indicators the model trains on.
10. Is this financial advice?
No. Research only. Not financial advice. Past patterns do not predict future results. You can lose money.
AI-system transparency
Required by EU AI Act Art 13 / Art 50 and GDPR Art 13(2)(f)
- Model class
- Gradient-boosted decision trees (XGBoost) + a thin technical- analysis voting layer. No large language model is used anywhere in the model. Sentiment scoring on news headlines uses a deterministic finance lexicon (Loughran-McDonald), not an LLM either.
- Training data
- Daily-bar OHLCV from yfinance (Yahoo Finance) for ~165 tickers across 16 markets, covering 2010-01-01 to the current trading day. We use only public, end-of-day market data; we do not train on user accounts, watchlists, or any personal information.
- Features
- Past-only technical indicators (RSI 14, MACD, SMA 20/50/200, ATR 14, return autocorrelations, volume z-scores) plus the target's own lagged returns, and a small set of macro and cross-asset features (VIX, 10-year US Treasury yield, US dollar index, gold and oil returns, rolling correlation with the S&P 500 and NASDAQ). No fundamental data.
- Validation
- Walk-forward cross-validation with an embargoed test window (model trained on data up to day t, evaluated ont+1 onwards; no future leakage).
- Retraining cadence
- The pooled models are retrained monthly by a scheduled workflow that rolls the training window forward. The dashboard loads the most recent saved model at request time; the forward output is not displayed.
- Known limitations & biases
- Data quality is materially lower on low-volume emerging markets (especially Vietnam —
.VNlistings) where yfinance coverage is patchy and bid-ask spreads are wide. - Models trained on historical regimes may underperform during structural shocks (e.g. COVID-2020, rate-cycle inflexions).
- The model does not account for corporate actions, fundamental shocks, regulatory events, or news beyond what is already priced into the technical signal at training time.
- Data quality is materially lower on low-volume emerging markets (especially Vietnam —
- No automated decisions
- We do not produce automated decisions with legal or similarly significant effects within the meaning of GDPR Article 22. The user retains full discretion over every investment decision.