Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
基于神经网络的通用股票预测模型 A general stock prediction model based on neural networks
| Date | Stars |
|---|---|
| 2026-07-24 | 373 |
| 2026-07-25 | 374 |
| 2026-07-28 | 374 |
| 2026-07-30 | 374 |
| 2026-07-31 | 375 |
| 2026-08-05 | 376 |
| 2026-08-06 | 376 |
Today
— stars today
This week
+2 stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.53%/day
# stock_prediction A PyTorch-based stock price prediction project covering the full workflow from data collection, preprocessing, model training, to inference. The project focuses on multi-scale hybrid models (TemporalHybridNet) and PTFT + Variational SSM combinations. ## Features - **Market Data Collection**: Supports tushare, akshare, and yfinance as data sources. - **Data Preprocessing**: Aggregates daily CSVs into `pkl_handle/train.pkl`, supports repeated loading. - **Feature Engineering**: Automatically generates log returns, differences, macro/industry/sentiment exogenous variables, supports per-symbol normalization and stock embedding. - **Model Training**: Unified entry, supports LSTM, Transformer, TemporalHybridNet, PTFT_VSSM, Diffusion, Graph, etc., with built-in trainer and early stopping. - **Inference**: Consistent feature processing and embedding as in training, outputs prediction charts and metrics. - **Evaluation Metrics**: Automatically collects RMSE, MAPE, quantile coverage, VaR, CVaR, etc., and saves results to `output/metrics_*.json`. - **Technical Indicators**: Built-in MACD, KDJ, DMI, ATR, and more. ## Normalization Parameters - When saving models, writes `*_norm_params*.json` (includes mean_list, std_list, show_list, name_list). - If global mean/std is missing, automatically computes from `pkl_handle/train.pkl`. - test()/predict() will load the corresponding norm_params file before loading weights to ensure consistent denormalization. ## Quick Start ```bash conda activate stock_prediction pip install -r requirements.txt python scripts/train.py --mode train --model ptft_vssm --pkl 1 --epoch 2 python scripts/predict.py --model ptft_vssm --test_code 000001 ``` For first-time use, run: ```bash python scripts/getdata.py --api akshare --code 000001.SZ python scripts/data_preprocess.py --pklname train.pkl ``` ## Directory Structure ``` project-root/ ├─ src/stock_prediction/ # Core code ├─ scripts/ # CLI scripts ├─ tests/ # Test cases ├─ docs/ # Documentation ├─ models/ # Trained models ├─ stock_daily/ # Raw market data ├─ pkl_handle/ # Preprocessed queues └─ CHANGELOG.md # Change log ``` ## Supported Models | Argument | Structure | Scenario | | -------------- | -------------------------------- | ----------------------- | | lstm | 3-layer LSTM | Baseline | | attention_lstm | LSTM + Attention | Key time segments | | bilstm | Bidirectional LSTM | Enhanced context | | tcn | Temporal Convolutional Network | Local patterns | | multibranch | Dual-branch LSTM | Multi-feature families | | transformer | Custom Transformer | Long sequences | | cnnlstm | CNN + LSTM + Attention | Multi-step prediction | | hybrid | Conv/GRU + PTFT/VSSM/Diff/Graph | Multimodal fusion | | ptft_vssm | PTFT + Variational SSM | Probabilistic forecast | | diffusion | DiffusionForecaster | Scenario generation | | graph | GraphTemporalModel | Multi-asset modeling | ## Common Commands ```bash python scripts/getdata.py --api akshare --code 000001.SZ python scripts/data_preprocess.py --pklname train.pkl python scripts/train.py --mode train --model transformer --epoch 2 python scripts/predict.py --model transformer --test_code 000001 --predict_days 3 pytest -q ``` ## Testing & Quality - pytest covers feature engineering, regime adaptation, stock embedding, etc. - Run `pytest -q` before commit; use ruff/black/mypy as needed. ## Documentation Index - docs/system_design.md: Architecture & decisions - docs/model_strategy.md: Model design & recommendations - docs/user_guide.md: CLI/module usage - docs/maintenance.md: Struct
Excerpt of 9,032 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:049ab8696f53607a, topic:deep-learning
matched fp:049ab8696f53607a, topic:transformer
matched fp:049ab8696f53607a, topic:nlp