Train_TCN/- TCN model training scripts and resultsRetrival/- Retrieval scripts and outputsDiffusion/- Diffusion model scripts, configs, and outputsdataset/- Datasets for training and evaluation
The workflow is organized into three main stages:
Train Temporal Convolutional Network (TCN) models to generate embeddings for stocks.
Run training:
cd Train_TCN
python train_tcn_all.py # For all stocks
python train_tcn_industry.py # For industry-specific
python train_tcn_only.py # For single stock- Model weights and embeddings will be saved in
Train_TCN/results/.
Use the trained TCN models to generate retrieval features for downstream tasks.
Run retrieval:
cd Retrival
python retri_all.py # For all stocks
python retri_industry.py # For industry-specific
python retri_only.py # For single stock- Retrieval outputs will be saved in the corresponding folders (e.g.,
Retrival/AMZN_k_n_all/).
Feed the retrieval outputs into the diffusion models for final forecasting.
Run diffusion forecasting:
cd Diffusion
python exe_stock_forecasting_all.py # For all stocks
python exe_stock_forecasting_industry.py # For industry-specific
python exe_stock_forecasting_only.py # For single stock