Replication Materials for Article: Two-Time-Scale Transfer Learning for Market-by-Order Micro-Return Forecasting
收藏资源简介:
This archive contains the replication artifacts, including experimental logs, output data, and the synthetic dataset, for the paper "Two-Time-Scale Transfer Learning for Market-by-Order Micro-Return Forecasting". Paper Abstract Deep Learning models face a critical "simulation-to-reality" gap when applied to high frequency financial data. Deep learning models often fail to capture the non-stationary dynamics of live markets, requiring computationally expensive recalibrations. This work introduces the Two-Time-Scale Transfer Learning (TTSTL) framework, a hybrid model architecture that combines the flexibility of deep learning models with the parsimony and calibration ease of time series regression models. The TTSTL architecture mimics the hippocampus-neocortex interaction in the human brain by coupling a high-capacity deep learning "backbone" with a lightweight, adaptive time series regression "adapter." The backbone, utilizing a CNN-LSTM network, extracts complex, non-linear feature interactions from event-driven limit order book data, while the adapter—implemented as a Hybrid ARMAX-GARCH-DeepLOB model—integrates these features into a statistical framework for micro-return forecasting. Experiments are conducted on synthetic and Intel (INTC) market-by-order data. Results demonstrate that the TTSTL framework significantly outperforms standalone deep learning baselines in terms of accuracy (RelMAE), while enabling volatility modeling and formal probabilistic forecasting. Usage This dataset facilitates the reproduction of the results presented in the paper. The code required to process this data and run the experiments is hosted on GitHub. Repositories Main Codebase (Models & Experiments):https://github.com/judmejiabe/ttstl_repoContains the TTSTL framework implementation, experimental scripts, and analysis tools. Data Pipeline (Generation & Processing):https://github.com/judmejiabe/evolving-microstructural-toolkit-dataContains the scripts for generating the synthetic data and processing the real market data. Installation Instructions Clone the Main Codebase repository. Follow the installation instructions in the README.md file (local install or Docker). Download this Zenodo dataset. For Synthetic Data: Unzip the Recorded_Synthetic_Data contents into the data.nosync/Recorded_Synthetic_Data directory at the root of the Data Pipeline repository structure if you wish to run the generation scripts, or configure the paths in the Main Codebase to point to the extracted files. For Logs and Outputs: The logs/ and outputs/ directories in this archive directly correspond to the directory structure generated by the experiments in the Main Codebase. You can place them in the root of the cloned ttstl_repo to analyze the results without re-running the heavy computations. Files Included 1. Logs Directory (logs/) Contains execution logs for pretraining, experiments, and tests. cnn_lstm_pretraining_future_20260120_110456.log: Log of the CNN-LSTM feature extractor pretraining on May 2024 INTC data. Captures training loss, validation loss, and model checkpointing for the "future returns" prediction task. market_data_experiments_future_20251203_152025.log: Log of the main market data experiments. Records the Orchestrator's progress through recursive forecasting windows (backbone bars, stacks, adapter bars) and performance metrics for the future returns task. synthetic_study_20251114_154826.log: Log of the synthetic study experiments. Details the execution of 28 configurations (combinations of update rules and covariate sets) on synthetic LOB data. 2. Outputs Directory (outputs/) Contains data products, trained models, and analysis results. Analysis Results Market Data Analysis (outputs/analysis_market_data_experiment_results/): sequential_boxplot_*.png: Visualization of performance metrics (MAE, RMSE) over time across recursive updates. *_aggregate_*.png: Boxplots showing the distribution of covariates (OFI, VIX) and their statistics. comparison_stacked_by_pair.csv: Aggregated performance metrics comparing the TTSTL model against baselines. Synthetic Study Analysis (outputs/analysis_synthetic_data_experiment_results/): Contains tables showing the relative performance ranking of different update methods and RelMAE plots across simulation scenarios. Pretrained Models Artifacts for the pretrained CNN-LSTM feature extractor used in the market data experiments (outputs/cnn_lstm_pretraining_market_data/): *.pth: PyTorch model weights. *_scaler.pkl: Serialized StandardScaler fitted on the pretraining data. *_bounds.json: JSON file containing winsorization bounds. *_metadata.json: Metadata describing the training configuration. *_training_history.csv: CSV log of training and validation loss per epoch. Experiment Runs Raw outputs from the recursive market data experiments (outputs/runs_market_data_experiments/) and synthetic study (outputs/runs_synthetic_study/). Organized hierarchically by Date, Configuration, Backbone Bar, Stack, and Adapter. config.yaml: Configuration snapshot for the specific run. performance.parquet: Detailed frame-by-frame performance metrics (MAE, MSE, R2). forecasts.parquet: Time-series of predicted vs. actual micro-returns. model_state.pth: Snapshots of the adapter model state (if saved). 3. Recorded Synthetic Data (data/Recorded_Synthetic_Data/) The raw event-driven and physical time-driven synthetic LOB data used for the controlled study. *_event_driven_recorded_lob_*.parquet: Event-driven snapshots used for model training/updates. *_physical_time_driven_recorded_data_*.parquet: Physical time snapshots used for calculating micro-returns (targets). Citation If you use this dataset or code in your research, please cite the working paper: @article{mejiabecerra2026twotimescale, title = {Two-Time-Scale Transfer Learning for Market-by-Order Micro-Return Forecasting}, author = {Mejia Becerra, Juan Diego and Peters, Gareth W. and Hu, Ruimeng}, year = {2026}, journal = {SSRN Electronic Journal}, doi = {10.2139/ssrn.6424798}, url = {https://ssrn.com/abstract=6424798} }



