Skip to content

Financial Time Series Benchmark (FinTSB): A Comprehensive and Practical Benchmark for Financial Time Series Forecasting

License

Notifications You must be signed in to change notification settings

TongjiFinLab/FinTSB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4c64b86 Β· Mar 10, 2025

History

13 Commits
Feb 24, 2025
Feb 22, 2025
Feb 22, 2025
Feb 24, 2025
Dec 15, 2024
Dec 15, 2024
Mar 10, 2025
Feb 22, 2025
Feb 24, 2025
Feb 22, 2025

Repository files navigation

FinTSB: A Comprehensive and Practical Benchmark for Financial Time Series Forecasting

πŸ“° News

🚩 Updates (2025-02-27) Initial version available on arXiv FinTSB.

🚩 Updates (2025-02-24) First version of the FinTSB code released.

🌟 Overview

FinTSB is a comprehensive and practical financial time series benchmark. Our goal is to address the three systemic limitations in the evaluation of the Financial Time Series Forecasting field.
➊ Failure to account for the full spectrum of stock movement patterns observed in dynamic financial markets (Diversity Gap).
βž‹ The absence of unified assessment protocols undermines the validity of cross-study performance comparisons (Standardization Deficit).
➌ Neglect of critical market structure factors, resulting in inflated performance metrics that lack practical applicability (Real-World Mismatch).

πŸ›  Prerequisites

Ensure you are using Python 3.10.16 and install the necessary dependencies by running:

pip install -r requirements.txt

πŸ“Š Prepare Datastes

Begin by downloading the required datasets. All datasets are conveniently available at https://quantapi.eastmoney.com/. After downloading the data, you should preprocess it as outlined in our paper (We will open source it as soon as the camera-ready version of the paper is published). Finally, create a separate folder named ./data and neatly organize all the CSV files as shown below:

FinTSB
└── extreme
    └── dataset_1.pkl
    └── dataset_2.pkl
    └── dataset_3.pkl
    └── dataset_4.pkl
    └── dataset_5.pkl
└── fall
    └── dataset_1.pkl
    └── dataset_2.pkl
    └── dataset_3.pkl
    └── dataset_4.pkl
    └── dataset_5.pkl
└── fluctuation
    └── dataset_1.pkl
    └── dataset_2.pkl
    └── dataset_3.pkl
    └── dataset_4.pkl
    └── dataset_5.pkl
└── rise
    └── dataset_1.pkl
    └── dataset_2.pkl
    └── dataset_3.pkl
    └── dataset_4.pkl
    └── dataset_5.pkl

πŸ’» Training Pipline

The pipeline of FinTSB includes the Data layer, Training layer, Backtesting layer, and Feedback layer, as shown in the figure below.

All configs are located in ./configs. For instance, to train the LSTM model using the FinTSB dataset, simply run:

python train.py --config_file configs/config_lstm.yaml

After training:

  • Your trained model will be safely stored in ./output/model.bin.
  • Numerical results in .csv format and .pkl format can be found in ./output/backtest_result.csv and ./output/pred.pkl.
  • A comprehensive summary of quantitative metrics is accessible in ./output/backtest_report.txt.
  • A visualization is available in ./output/xxx.jpg.

πŸ“š Citation

If you find this repo useful, please consider citing our paper as follows:

@article{hu2025fintsb,
  title={FinTSB: A Comprehensive and Practical Benchmark for Financial Time Series Forecasting}, 
  author={Yifan Hu and Yuante Li and Peiyuan Liu and Yuxia Zhu and Naiqi Li and Tao Dai and Shu-tao Xia and Dawei Cheng and Changjun Jiang},
  journal={arXiv preprint arXiv:2502.18834},
  year={2025},
}

@article{hu2025finmamba,
  title={FinMamba: Market-Aware Graph Enhanced Multi-Level Mamba for Stock Movement Prediction}, 
  author={Hu, Yifan and Liu, Peiyuan and Li, Yuante and Cheng, Dawei and Li, Naiqi and Dai, Tao and Bao, Jigang and Xia Shu-Tao},
  journal={arXiv preprint arXiv:2502.06707},
  year={2025}
}

@article{hu2025timefilter,
  title={TimeFilter: Patch-Specific Spatial-Temporal Graph Filtration for Time Series Forecasting},
  author={Hu, Yifan and Zhang, Guibin and Liu, Peiyuan and Lan, Disen and Li, Naiqi and Cheng, Dawei and Dai, Tao and Xia, Shu-Tao and Pan, Shirui},
  journal={arXiv preprint arXiv:2501.13041},
  year={2025}
}

@inproceedings{hu2025adaptive,
  title={Adaptive Multi-Scale Decomposition Framework for Time Series Forecasting},
  author={Hu, Yifan and Liu, Peiyuan and Zhu, Peng and Cheng, Dawei and Dai, Tao},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  year={2025}
}

@inproceedings{bian2024multi,
  title={Multi-patch prediction: adapting language models for time series representation learning},
  author={Bian, Yuxuan and Ju, Xuan and Li, Jiangtong and Xu, Zhijian and Cheng, Dawei and Xu, Qiang},
  booktitle={Forty-first International Conference on Machine Learning},
  year={2024}
}

πŸ™ Acknowledgement

Special thanks to the following repositories for their invaluable code and datasets:

πŸ“© Contact

If you have any questions, please contact huyf0122@gmail.com or submit an issue.

About

Financial Time Series Benchmark (FinTSB): A Comprehensive and Practical Benchmark for Financial Time Series Forecasting

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages