Official implementation for:
DGDNN: Decoupled graph diffusion neural network for stock movement prediction. 16th International Conference on Agents and Artificial Intelligence.
Since the old tickers might be delisted, the old data on Dropbox is missing due to storage shortage.
We encourage experimentation with freshly fetched financial data. This repository can now build graph datasets from freshly fetched market data.
By default, the training CLI fetches the current S&P 500 constituents from Wikipedia at runtime, normalizes the symbols for Yahoo Finance, downloads OHLCV data with yfinance, and trains on all current S&P 500 tickers unless a ticker subset is provided.
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txtInstall the PyTorch build appropriate for your hardware if the default torch
package is not the one you need.
Run a small S&P 500 subset:
.\.venv\Scripts\python.exe -m Train_Eval.next_day_movement_prediction `
--tickers AAPL,MSFT,NVDA,AMZN,GOOGL `
--start 2023-01-01 `
--end 2024-12-31 `
--epochs 1Run the default current S&P 500 universe by omitting --tickers:
.\.venv\Scripts\python.exe -m Train_Eval.next_day_movement_prediction `
--start 2023-01-01 `
--end 2024-12-31Downloaded CSVs are written to data/raw/; serialized graph tensors are written
to data/graphs/. These generated artifacts are ignored by git.
- Default market: current S&P 500 constituents from Wikipedia.
- Default ticker set: all current S&P 500 constituents in table order.
- Requested tickers: validated against the current S&P 500 table.
- Yahoo symbols: normalized automatically, for example
BRK.BbecomesBRK-B. - Missing CSVs: downloaded automatically unless
--no-downloadis set. - Unavailable Yahoo data: reported clearly; use
--drop-failed-downloadsto continue after failed downloads.
The CLI downloads a small lookback buffer automatically.
Yahoo Finance availability can change over time and may be rate-limited. Current S&P 500 constituents introduce survivorship bias for historical backtests because the ticker universe is selected at run time, not as-of the historical date.
Serialized graph .pt files are trusted local artifacts produced by this repo.
Do not load graph caches from untrusted sources.