Algorithmic Trading System
A LightGBM cascade turning years of market data into a long-only book — with a monitoring console, and an obsession with not fooling myself.
The biggest thing I've built: a long-only equity strategy driven by a cascade of LightGBM models (with a fine-tuned FinBERT in the stack) trained to predict return over SPY across ~1000 names, a portfolio and risk layer tested across many configurations, and a full web console for monitoring and control. It runs end to end on paper trading, deployed on Hetzner. Built entirely solo. I keep it to architecture and method — no published results or edge claims until it's properly validated.
Commercial project — selected details only. Architecture and results are shown; proprietary code and data are not.
What it is
The largest project I’ve built: a long-only equity strategy driven by a cascade of machine-learning models, wrapped in a portfolio and risk layer, and run through a full monitoring console with paper-trading execution. It’s a commercial project and deliberately unfinished in one specific sense — I don’t make live-performance claims yet — so this describes the architecture and the method rather than specifics or numbers. I built all of it myself; the only outside input was the occasional pointer on where to look or what to try.
The models — a cascade, not one big model
The core isn’t a single model but several that consume each other’s predictions — a cascade of LightGBM models whose out-of-fold outputs feed into a final ranking, rather than one big model doing everything. A fine-tuned FinBERT is part of the stack as well. I’ll stay vague on exactly which models play which role; the point is that the structure — which models feed which — was chosen from around a hundred experiments, because the interactions mattered more than any single component.
Two design choices worth calling out: the target is return over SPY, not raw return (the models rank how much a name should beat the market, so the signal isn’t just “everything goes up in a bull market”), and the data spans ~1000 names over about a decade of daily history. Outputs are quantile forecasts (downside / median / upside), not point estimates.
Not fooling myself
Most of the real work was evaluation, not modelling — and it’s the part I’m proudest of, because it’s where quant projects usually lie to themselves:
- Leakage discipline and training–serving parity. Research runs use out-of-fold predictions so the meta-model never sees the future, and the live path is frozen so it reproduces exactly the numbers it saw in training. A lot of the work was closing the places where that could silently break.
- A proxy Sharpe on the upper quantile. A long-only top-N book only ever trades the top names, so I selected and compared models by a Sharpe-like score computed on the upper quantile rather than by overall accuracy. A model that’s mediocre on average but excellent at ranking the top is exactly what this strategy wants.
- Honest benchmarks and honest verdicts. Comparing against a volatility-matched baseline, watching risk-adjusted rather than raw numbers, and refusing to conclude anything before a proper out-of-sample holdout. I’ve talked myself out of “it works” more than once after a promising result turned out to be an artifact.
I’m intentionally not putting performance figures here — no numbers until it’s validated end to end.
Portfolio & risk
On top of the rankings sits a portfolio layer, and I backtested it across a lot of configurations rather than trusting one (~200): position sizing methods, top-N concentration, stop variants, volatility targeting, rebalance cadence, and how to blend the 10- and 30-day signals — each measured layer by layer to see what it actually contributes. I also tested long-short and market-neutral constructions, not just long-only; the short side didn’t hold up (shorting laggards fails when even the laggards drift upward in a bull market), so the book I settled on is long-only. One recurring lesson: a “safety” layer can quietly cost more than it saves, and you only catch that by measuring each layer in isolation. (No numbers here on purpose.)
The console
A system that (eventually) trades real money shouldn’t be a black box, so I built a monitoring console (FastAPI + React) with one firm rule: it never places orders itself. It writes intent files that the orchestrator executes in its own windows, on a two-phase trading day — prepare after the close, execute at the open. Each account has an autonomy level, from fully manual (nothing happens without me) to hands-off, so the human sits in the loop exactly as much as I want. It also carries on-site backtesting, a strategy-parameter registry, full run history, and wire logs of every broker call.
Where it is now
Everything runs end to end and is paper-trading for validation, deployed on a Hetzner server. It is not live with real money — by design, until a proper holdout and a demo-reconciliation phase are done. The point of the project was never a single number; it’s a complete, honestly-evaluated, solo-built quant system from raw data to (paper) execution — with enough rigor around it to know what it does and doesn’t do.