Skip to content

Yang8823/SwinTST

Repository files navigation

A Hierarchical Shifted-Window Time Series Transformer for Stock Market Index Price Forecasting

This is the official PyTorch implementation of A Hierarchical Shifted-Window Time Series Transformer for Stock Market Index Price Forecasting. A latex-formatted version of the paper is available here which is recommended as it has better formatting.

architecture architecture

Main Results

result

Get Started

  1. Install Python>=3.8, PyTorch 2.3.1+cu118
  2. Download data. You can obtain a portion of benchmarks from [Autoformer] or [Informer]. For some of the other datasets, do request access from the author though email.
  3. Train the model. We provide the experiment scripts of all benchmarks under the folder ./scripts. You can reproduce the experiment results by running the following shell code separately:
bash ./script_ett.sh
bash ./script_exchange.sh
bash ./script_illness.sh
bash ./script_index.sh
  1. The SwinTST backbone pytorch code is at:
./models/Proposed_SwinTST.py
./layers/Proposed_SwinTST_Backbone.py

Citation

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

@inproceedings{tan2025hierarchical,
  title={A Hierarchical Shifted-Window Time Series Transformer for Stock Market Index Price Forecasting},
  author={Tan, Yee Yang and Tan, Chye Cheah},
  booktitle={2025 IEEE 9th International Conference on Software Engineering \& Computer Systems (ICSECS)},
  pages={382--387},
  year={2025},
  organization={IEEE}
}

Acknowledgement

We appreciate the following github repos a lot for their valuable code base or datasets:

https://github.com/thuml/Autoformer

https://github.com/zhouhaoyi/Informer2020

https://github.com/MAZiqing/FEDformer

https://github.com/yuqinie98/PatchTST

https://github.com/ts-kim/RevIN

https://github.com/microsoft/Swin-Transformer

About

[ICSECS 2025] A Hierarchical Shifted-Window Time Series Transformer for Stock Market Index Price Forecasting

Topics

Resources

Stars

Watchers

Forks

Contributors