PEA Pollux
What does a real quant pipeline look like end to end, from raw prices to a trade I'd actually consider?
Why I built it
I built it to learn how a real quant pipeline is put together, end to end (ingestion, storage, signals, risk, reporting), rather than to beat the market. It never places orders: I read the results and decide.
What it does
A decision-support system for my French PEA. Every trading day it scans about 170 Euronext stocks, scores them, runs each candidate through risk checks and sends the few that survive with a position size and limit prices. It never places orders.
Worth a look
- Signals from mean reversion, sector pairs trading, a 3-state HMM market regime and FinBERT sentiment.
- XGBoost with SHAP estimates each trade's odds; a UCB bandit re-weights strategies by regime.
- Streamlit dashboard over a FastAPI service, Discord alerts, and an MCP server to query the portfolio.
Under the hood
Data
Prices from yfinance, fundamentals, AMF insider trades and short positions, ECB rates, RSS headlines. Raw payloads are kept so any run can be replayed.
Storage
Prices in DuckDB, portfolio and audit log in SQLite, Pydantic models and a quality gate that catches outliers and stock splits.
Signals
Mean reversion, sector pairs trading, a 3-state HMM market regime, FinBERT sentiment, and an XGBoost model with SHAP; a UCB bandit re-weights strategies by regime.
Risk checks
A candidate is rejected if any check fails, and the reason is logged: loss limits, drawdown brake, volatility regime, blackout days, Piotroski score, liquidity.
Output
A Streamlit dashboard over a FastAPI service, Discord alerts with ATR-based limit prices, and an MCP server to question the portfolio.