PROJECT / 04 PYTHON · ML · DL · STREAMLIT · FORECASTING · FINANCE
ZEPHYR — MULTI-MODEL EQUITY FORECASTING PLATFORM

Modular experiments. Honest evaluation.

Zephyr is a modular Streamlit dashboard that runs baselines, classical machine learning, and deep learning models against chronological holdouts across a curated universe of US, UK, European, and Australian equities. It adds split-conformal prediction intervals, model persistence, backtesting with costs and slippage, SHAP explainability, hyperparameter tuning, an experiment registry, a multi-ticker portfolio view with risk metrics, and a Scenario Lab for Monte Carlo, regime, and shock analysis.

DOMAIN Equity Forecasting
CORE Chronological Model Comparison
MODELS Baselines · Tree Models · LSTM/GRU · Prophet
STACK Python · Streamlit · Plotly · scikit-learn · TensorFlow · yfinance
04 FORECAST
ML DL TS
METHODS / VALIDATION / DASHBOARD PORTFOLIO EXPLORE
01

Can rigorous, leakage-free comparison reveal whether model complexity improves short-horizon equity forecasts over simple baselines?

Most forecasting projects stop at a single model. Real insight comes from disciplined comparison under identical conditions.

Classical tree-based models, gradient boosting methods, structural regressors like Prophet, and recurrent networks each capture different structures in price data. Without a consistent evaluation framework it is impossible to know whether added complexity actually improves forecasts.

Zephyr was built to run multiple complementary model families under the same chronological conditions, measure them against strong naïve baselines, and surface the results through an interactive dashboard with uncertainty quantification, backtesting, explainability, and scenario analysis.

THESIS

A transparent, modular, leakage-free multi-model pipeline with prediction intervals, backtesting, and scenario analysis reveals whether model complexity delivers real gains over simple baselines on short-horizon equity returns.

02

Market prices, engineered technical features, and a curated global universe.

The system focuses on high-quality daily OHLCV data and features that respect the flow of time.
01

Price History

Daily OHLCV data across US, UK, European, and Australian listings forms the foundation of every experiment. Data fetched via yfinance from Yahoo Finance.

02

Technical Features

Returns and lags, moving averages (SMA/EMA), rolling volatility, momentum, candle shape (range, body, shadows), volume ratios, and longer-range high/low distances — all constructed without future information.

03

No Leakage Design

Every feature uses only data available at prediction time. Targets are strictly shifted forward by the selected horizon (1/3/5 trading days) to prevent look-ahead bias. A horizon-sized gap separates train and test partitions.

04

Curated Universe

Configured ticker set spanning United States (AAPL, MSFT, NVDA, JPM), United Kingdom (AZN.L, SHEL.L, HSBA.L), Europe (ASML.AS, SAP.DE, NESN.SW), and Australia (CBA.AX, BHP.AX, CSL.AX).

DATA VIEW

Multiple model families trained and evaluated on the same chronological splits using identical feature sets, baselines, and a configurable 1-, 3-, or 5-trading-day horizon.

FORECAST MODELS 0 baselines · tree · sequence · prophet
DASHBOARD TABS 6 overview · models & eval · ai forecast · portfolio · research · scenario lab
VALIDATION Chronological holdout · walk-forward · expanding window
REGIONS 4 US · UK · Europe · Australia
03

From raw prices to comparable model forecasts with uncertainty and risk context.

01

Market Data

Yahoo Finance quotes and daily OHLCV via yfinance; data quality reporting.

02

Feature Engineering

Returns, lags, moving averages, volatility, momentum, candle shape, volume — leakage-free.

03

Model Families

Naive baselines, Random Forest, Extra Trees, HistGradientBoosting, XGBoost, LightGBM, Prophet, LSTM, GRU.

04

Chronological Evaluation

Ordered train/test split with horizon gap; optional walk-forward; MAE, RMSE, directional accuracy.

05

Six-Tab Dashboard

Overview · Models & Evaluation · AI Forecast · Portfolio · Research · Scenario Lab.

FETCHOHLCV
CLEANQUALITY
ENGINEERFEATURES
TARGETHORIZON
SPLITCHRONO
TRAIN12 MODELS
EVALUATEFAIR
VIEWDASHBOARD
01

Model Diversity

Baselines, six tree-based/gradient-boosting/structural regressors, and two sequence models evaluated side-by-side under identical conditions and feature sets.

02

Leakage-Free Design

All features use only past information. Targets shifted forward by horizon. Train/test gap prevents label overlap. Walk-forward validation available.

03

Uncertainty & Risk

Split-conformal prediction intervals on AI Forecast. Backtesting with costs, slippage, stop-loss. Portfolio risk: Sharpe, max drawdown, VaR.

04

Explainability & Tuning

Permutation importance (always) and optional SHAP for global/local attributions. RandomizedSearchCV over time-series folds. JSONL experiment registry.

05

Scenario Lab

Monte Carlo fan charts, first-passage target/stop probabilities, volatility regime maps, and interactive shock what-if recovery analysis.

06

Persistence & Caching

Trained classical ML models saved to artifacts/models/ and reused across sessions. Session-state caching of supervised datasets per (ticker, horizon, window).

04

Six focused tabs from data inspection to scenario analysis.

Illustration of observed historical values, an example forecast window, and a baseline for comparison.
Conceptual project illustration; the plotted curves are not actual forecast data.

Each tab answers a specific research question.

01 OVERVIEW

Latest quote, daily change, volume, day range, exchange, region, data age. Expandable Data & Features section with OHLCV history, quality summary, missing-value handling, and CSV download.

02 MODELS & EVALUATION

Segmented sub-nav: Classical ML · Neural Networks · Evaluation. Candlestick chart, feature preview, model comparison table, LSTM/GRU training curves, walk-forward validation. Models: baselines, RF, Extra Trees, HistGradientBoosting, XGBoost, LightGBM, Prophet, LSTM, GRU.

03 AI FORECAST

Holdout metrics for selected model, calibrated split-conformal prediction interval on chart, illustrative horizon return and implied price. Trained classical ML models persisted to artifacts/models/ and reused across sessions.

04 PORTFOLIO

Multi-ticker correlation matrix, normalized equal-weight performance, equal-weight portfolio risk summary (mean return, Sharpe, max drawdown, VaR), and per-ticker fundamentals (market cap, P/E, dividend yield, beta, 52-week range).

05 RESEARCH

Four sub-tabs: Explainability (permutation importance + optional SHAP), Hyperparameter Tuning (RandomizedSearchCV over time-series CV), Backtest (signals → equity curve, costs, slippage, stop-loss, stride mode), Experiments Registry (browsable JSONL runs).

06 SCENARIO LAB

Monte Carlo fan chart from historical return distribution or GBM fit. First-passage probability for target/stop levels. Volatility regime map (rolling quantile labels). Interactive shock what-if with historical recovery time estimates.

05

What disciplined multi-model comparison with uncertainty reveals.

Complexity does not automatically win.

When models are evaluated fairly against strong baselines using chronological splits with a horizon gap, the advantage of more sophisticated algorithms is often smaller than expected. Prediction intervals quantify uncertainty; backtesting adds execution realism; scenario analysis maps descriptive possibilities.

01 MULTI-MODEL COVERAGE

Baselines, six classical ML estimators (including Prophet), and two sequence models run on the same feature set and time splits with identical preprocessing.

02 STRONG BASELINES

NaiveLastClose (zero return) and NaiveLastReturn (repeat last observed return) provide clear reference points for measuring real improvement on the selected horizon.

03 UNCERTAINTY QUANTIFICATION

Split-conformal prediction intervals calibrated on the chronological holdout display a band around the point forecast with empirical coverage reporting.

04 EXECUTION REALISM

Backtest engine applies transaction costs (bps), slippage, position sizing, and optional stop-loss. Non-overlapping stride mode reduces horizon overlap approximation.

05 EXPLAINABILITY & TUNING

Permutation importance always available; SHAP optional. RandomizedSearchCV over time-series folds. Append-only JSONL experiment registry for reproducibility.

06 PORTFOLIO & SCENARIO CONTEXT

Multi-ticker correlation, equal-weight risk metrics, and fundamentals. Scenario Lab provides descriptive Monte Carlo, regime, and shock tools — not predictions.

06

Where the forecasting system remains constrained.

01

Upstream Data Dependency

Market data fetched via yfinance from Yahoo Finance. Availability, coverage, timestamps, adjustment behavior, and delays are externally controlled. Responses can be incomplete, revised, or temporarily unavailable.

02

Narrow Input Scope

Models use only OHLCV-derived technical features and a direct cumulative return target. No fundamentals, macro variables, order-book data, or news sentiment in the forecast models (sentiment helpers removed from current dashboard).

03

Horizon Estimate ≠ Daily Path

The 1/3/5-day horizon estimates cumulative close-to-close return. The AI Forecast screen does not recursively generate a daily prediction path. Selecting 3 or 5 days does not produce a validated multi-day forecast sequence.

04

Prediction Intervals Are Approximate

Split-conformal bands are finite-sample approximate and can degrade under distribution shift, regime change, or non-exchangeable data. A band on a chart is not a calibrated confidence statement about the future.

05

Backtest Is Simulation, Not Trading

Historical signal simulation with costs, slippage, and stop-loss. Overlapping-horizon treatment is an approximation (stride mode reduces this). Not live paper trading, not a profitability guarantee.

06

Scenario Lab Is Descriptive

Monte Carlo resamples historical returns; cannot anticipate regime change, news, or structural breaks. First-passage probabilities derived from simulated paths. Volatility regimes are descriptive rolling quantiles, not predictive. Shock recovery times estimated from historical analogues.

07

Model Persistence Is a Cache

Trained models saved to artifacts/models/ via joblib. No versioning, lineage, drift monitoring, or production governance. Retrain when observation window or settings change.

08

No Investment Guidance

Forecasts may be inaccurate, stale, or misleading. This is an educational research system, not a trading bot or financial advice. Do your own research and consult a qualified professional where appropriate.

IMPORTANT

This platform is an educational and research system. It is not a trading bot and does not constitute financial advice.

07

Where the forecasting stack can evolve.

01
REGIME AWARENESS

Detect and adapt to market regimes.

Introduce regime detection so model selection and feature sets can shift when volatility or correlation structure changes. Move from descriptive volatility regimes to predictive regime models.

02
RICHER FEATURES

Alternative data and cross-sectional signals.

Explore additional technical, fundamental, and cross-sectional features while maintaining strict leakage control. Incorporate fundamentals as model inputs, not just Portfolio display.

03
RECURSIVE FORECASTING

Validated multi-step prediction paths.

Implement recursive or direct multi-horizon forecasting for the 3/5-day selections so the AI Forecast screen produces a genuine daily path with calibrated intervals at each step.

04
PORTFOLIO OPTIMIZATION

From equal-weight to constructed portfolios.

Extend the evaluation framework toward ranking, position sizing, and simple portfolio construction logic across the universe with risk constraints.

05
LIVE MONITORING

Paper-trading and ongoing tracking.

Connect the forecasting pipeline to a paper-trading environment so model behaviour can be monitored over time with drift detection and performance attribution.

06
PRODUCTION HARDENING

Authentication, caching, deployment.

Add authentication, persistent caching, model versioning, experiment tracking with MLflow or similar, and containerized deployment for multi-user access.

The project started with individual models. It became an exercise in honest, time-aware evaluation with uncertainty, execution realism, and scenario context.

Running multiple model families under identical chronological conditions, against strong baselines, with leakage-free features, prediction intervals, backtesting, explainability, and scenario analysis produces clearer insight than chasing the single highest back-test score.

01 DIVERSITY

Different model families capture different structures in price data. Compare them fairly.

02 DISCIPLINE

Chronological validation, horizon gaps, and strong baselines keep claims honest.

03 UNCERTAINTY

Conformal intervals, backtest costs, and descriptive scenarios make uncertainty visible.

04 TRANSPARENCY

An interactive dashboard makes model behaviour, feature importance, and experiments inspectable.

05 REPRODUCIBILITY

Persisted models, cached datasets, JSONL registry, and seeded configuration support re-running.

06 ITERATION

The modular stack is designed to absorb better models, richer data, and deeper evaluation.

Explore the platform.

Source code, live demo, and documentation.