← Projects
data project complete May 9, 2026

HERMES-IC+: a time-series modeling project

#time-series#quantitative-modeling#machine-learning#model-evaluation
Original Figure 1 from the HERMES-IC+ project report showing the full hierarchical architecture
Project focus

A project exploring minute-level return prediction with causal OHLCV features, specialized experts, and purged out-of-fold model fusion.

Why I worked on it

Practice time-series feature engineering and validation while learning how leakage and distribution shift can affect a model.

Tools

Python, LightGBM, Purged OOF, Feature Engineering, Model Ensembling

What I wanted to learn

I used HERMES-IC+ to explore a time-series problem with a strict information boundary. The task involved one-minute return prediction across 30 anonymous, high-volatility datasets, with outputs for two horizons, Ret5 and Ret60. Evaluation was divided by dataset, horizon, and normal or extreme regime, so an acceptable overall average could still hide poor performance in individual cells.

This made the project a useful exercise in starting from the evaluation design rather than choosing an algorithm first. I treated each dataset-horizon-regime combination as something that needed to be checked separately, then built a model that could combine information across them.

A second learning goal was avoiding look-ahead leakage. At inference time, the model could use only the OHLCV history available up to the current row. That requirement shaped the feature pipeline, validation design, fusion layer, and output checks.

How I structured the model

Original Figure 1 from the HERMES-IC+ project report showing the full-chain hierarchical architecture

The original architecture shows the complete prediction chain. Historical OHLCV enters at the bottom, passes through causal features and specialized experts, and reaches the Ret5 and Ret60 outputs through an out-of-fold-trained fusion layer.

The architecture has four functional layers:

  1. Historical input. Every inference feature is computed from current or earlier OHLCV observations. Return labels and regime labels are training-only information.
  2. Causal feature construction. The system builds a 463-dimensional representation from lagged returns, candlestick state, multi-scale rolling windows, volatility, liquidity shocks, position relationships, and path-order terms.
  3. Specialized prediction. Fourteen tabular experts represent different horizons, score cells, target transformations, volatility normalizations, and market regimes. An event-gating model estimates a soft regime probability instead of reading the true future-defined regime label.
  4. Out-of-fold fusion. Static expert weights, event-adaptive allocation, and dataset-local adapters are learned from purged out-of-fold predictions. Parameters are frozen before inference, and the final layer enforces finite outputs.

The separation is intentional. Feature extraction determines what information exists; experts determine which views of that information are useful; fusion determines how their predictions should interact. Keeping these responsibilities distinct makes leakage audits and ablation tests easier to interpret.

Feature engineering from OHLCV

The feature set is deliberately tabular. It includes multi-scale summaries of recent price and volume behavior rather than an unrestricted sequence model. Rolling features use backward-looking windows, and lagged terms point only into the past. The same ordered feature definition is applied to every anonymous dataset.

Several groups capture different aspects of market behavior:

  • lagged Ret5- and Ret60-style price changes computed from OHLCV rather than supplied labels;
  • candlestick body, range, wick, gap, and relative-position descriptors;
  • rolling means, dispersion, rank, trend, and path roughness across multiple windows;
  • volatility and liquidity proxies based on range, turnover, and volume shocks;
  • decomposed short- and long-horizon components that help experts specialize.

The purpose of the 463-dimensional design is not to claim that every feature is individually important. It is to provide a fixed, auditable vocabulary from which different experts can learn complementary behavior.

Why I used multiple experts

A single LightGBM model is a useful reference, but it must compromise across horizons, regimes, and heterogeneous datasets. HERMES-IC+ instead trains a pool of experts using different target transformations and sample-weighting schemes. Some experts emphasize normal periods, some emphasize extreme periods, and others focus on rank, volatility-normalized returns, or decomposed horizons.

The fusion stage is the main leakage-sensitive component. If it were trained on predictions produced by models that had already seen the same rows, it could learn an unrealistically clean combination. The project therefore uses purged expanding out-of-fold splits. Each validation block is predicted only by experts fitted on earlier training blocks, with a purge gap between them. Static and dynamic fusion weights are learned from this out-of-fold prediction matrix, not from in-sample fits.

Event adaptation is soft rather than categorical. The gating model estimates the probability of regimes such as normal, extreme, shock, or trend. Those probabilities alter expert weights smoothly, reducing the discontinuity that would come from a hard regime switch.

Original Figure 4 from the HERMES-IC+ project report showing event-gated expert weight dynamics

This explanatory view shows the intended behavior of event-aware fusion: expert allocation changes through a stressed interval instead of remaining fixed or switching abruptly.

What I learned from the evaluation

The report evaluates a lightweight implementation with the first 20,000 rows of each anonymous dataset used as the estimation window. It reports training-window behavior, purged out-of-fold structural comparisons, and a fixed project-level time holdout.

In the out-of-fold comparison, a single LightGBM expert reached a mean information coefficient (IC) of 0.1035 with 36 negative evaluation cells. Static fusion across 14 experts increased mean IC to 0.1885 and reduced the negative-cell count to 16. Event-adaptive fusion reached 0.3715 with 5 negative cells. Within this experiment, the largest improvement came from combining complementary experts and adapting their weights rather than replacing the base learner.

The fixed holdout result was much more modest: mean IC was 0.0065, 51 cells were negative, and the Ret60 mean was 0.0008. The gap between the out-of-fold and holdout results was the most useful lesson for me. It showed how easily a promising model comparison can weaken under time shift and dataset differences.

Original Figure 3 from the HERMES-IC+ project report showing the quantitative backtest tear sheet

The tear sheet groups cumulative behavior, rolling IC, and drawdown for the project-level comparison.

Diagnostics and next improvements

I used feature attribution as a diagnostic. The SHAP view helped me check whether the model relied on volatility, liquidity, lagged return, or path-shape variables and whether those relationships varied across observations.

Original Figure 5 from the HERMES-IC+ project report showing SHAP feature attribution

The SHAP summary visualizes which engineered inputs most strongly influence model predictions and how the direction of influence varies across samples.

The main checks I included were:

  • inference reads only historical OHLCV and parameters fixed during training;
  • rolling statistics and lags never look forward;
  • fusion is fitted on purged out-of-fold predictions;
  • clipping thresholds, adapters, and fusion weights are not re-estimated from the test sequence.

Extreme intervals remain noisy and sparse, and anonymous datasets can differ in ways that a local adapter cannot fully absorb. If I continued the project, I would focus less on adding experts and more on stronger time-based validation, simpler feature groups, and clearer uncertainty estimates. I present HERMES-IC+ as a completed modeling project and a lesson in leakage control, evaluation design, and distribution shift.

Project record

HERMES-IC+ feature and evaluation workflow

View record →
Domain

Quantitative time series

Task

Multi-horizon return prediction

Baseline

Global regression and score-cell-aligned expert comparisons

Next steps

Explore more project work

All projects →