← Research

Market microstructure research

Nasdaq Closing Auction Forecasting

A leakage-safe study of whether information available before the close can improve forecasts of the final Nasdaq closing-cross price.

PythonPandas / NumPyscikit-learnXGBoostJupyter

The research question

The closing auction concentrates liquidity and determines the official closing price for many workflows. The project asks whether observable pre-close auction state—indicative prices, imbalance, paired volume, and quoted liquidity—contains incremental information about the eventual closing-cross price.

Design constraint: the research is organized around fixed time-to-close horizons so each feature vector uses only information that would have been available at that moment.

Target and features

For each pre-close observation, the target is the final closing-cross displacement relative to the contemporaneous bid-ask midpoint, expressed in basis points so errors remain comparable across securities with different price levels.

Features include Near-, Far-, and Reference-price displacement; signed imbalance normalized by ADV and contemporaneous auction size; paired volume; spread; top-of-book imbalance; and intraday price context.

Evaluation design

The modeling sample is restricted to six fixed horizons: 120, 60, 30, 10, 5, and 1 seconds before the close. Dates are split chronologically into training, validation, and final test periods.

Model complexity is introduced gradually: market-price baselines first, then ordinary linear regression, Ridge, and XGBoost. The final test set is not used for feature selection, hyperparameter tuning, or architecture decisions.

What the project demonstrates

  • Market-microstructure feature engineering around auction state.
  • Stock-day target construction and snapshot-level data-quality auditing.
  • Chronological validation rather than random row splits.
  • Validation-first model selection with a frozen final holdout.
  • Robustness checks by trading date and held-out error distribution.

This repository is a public portfolio adaptation of a larger private research exercise. It contains my code and methodology while excluding original task materials, source-data links, the dataset, and private dataset-specific outputs.

Inspect the repository ↗