This commit is contained in:
qq564020069
2026-07-15 09:13:25 +08:00
parent 939da46a01
commit 66d0ab0c8a
4 changed files with 47 additions and 48 deletions
+3 -2
View File
@@ -94,8 +94,9 @@ AlphaMaster/
- 复制 `.env.example` 为 `.env` 填写 MT5 等凭证(`.env` 已 gitignore)
```bash
pip install -r requirements.txt
# 可选可视化等:pip install -r requirements-optional.txt
python -m pip install -r requirements.txt
# TradingView 若上面 git 行失败,可单独装:
# python -m pip install git+https://github.com/rongardF/tvdatafeed.git
```
---
+1 -1
View File
@@ -1,7 +1,7 @@
"""
backtest_viz/chart.py — K 线图 + 出入场标注 + PnL 子图
依赖 matplotlib(项目 requirements-optional.txt 里有)。
依赖 matplotlib(见 requirements.txt)。
在 matplotlib 无法显示 GUI 时自动切换到 Agg 后端,直接保存为 PNG/HTML。
"""
from __future__ import annotations
+4 -14
View File
@@ -1,14 +1,4 @@
# AlphaGPT - Optional Dependencies
# These are only needed for experimental/research scripts:
# - times.py (Chinese stock market backtesting)
# - lord/experiment.py (LoRD regularization experiments)
# Data & Visualization for Research Scripts
matplotlib>=3.7.0
seaborn>=0.12.0
# Chinese Stock Market Data (for times.py only)
tushare>=1.2.89
# Tongdaxin realtime quotes (Web UI data source)
pytdx>=1.72
# Deprecated: all packages now live in requirements.txt.
# Kept so old deploy docs still work:
# python -m pip install -r requirements-optional.txt
-r requirements.txt
+39 -31
View File
@@ -1,40 +1,48 @@
# AlphaGPT MT5 - Python Dependencies
# Python 3.10+ required (recommended: 3.11)
# AlphaMaster - Full Dependencies
# Python 3.10+ required (recommended: 3.11 / 3.13)
#
# Installation:
# pip3 install -r requirements.txt
# # Or use: pip install -r requirements.txt (if pip points to Python 3)
# Install everything (Chinese Windows tip: use python -m pip):
# python -m pip install -r requirements.txt
# TradingView source also needs git available for the tvdatafeed line below.
# python -m pip install "git+https://github.com/rongardF/tvdatafeed.git"
# ===== Core Dependencies (Required for main pipeline) =====
# ===== Deep Learning & Numerical =====
torch>=2.0.0
numpy>=1.24.0
scipy>=1.10.0
# Deep Learning & Numerical Computing
torch>=2.0.0 # PyTorch for model training and inference
numpy>=1.24.0 # Numerical operations
# ===== Data Processing =====
pandas>=2.0.0
pyarrow>=14.0.0
# Data Processing
pandas>=2.0.0 # Data manipulation and analysis
# ===== Charts / Visualization =====
matplotlib>=3.7.0
seaborn>=0.12.0
# MT5 Trading Platform
MetaTrader5>=5.0.45 # MetaTrader 5 Python API for data and order execution
# ===== Trading Platforms / Market Data =====
MetaTrader5>=5.0.45
tushare>=1.2.89
pytdx>=1.72
requests>=2.31.0
# TradingView (tvDatafeed) — install via git if the VCS line fails on your network:
# python -m pip install git+https://github.com/rongardF/tvdatafeed.git
tvdatafeed @ git+https://github.com/rongardF/tvdatafeed.git
# Environment & Configuration
python-dotenv>=1.0.0 # Load .env files
# Logging & Progress
loguru>=0.7.0 # Structured logging
tqdm>=4.66.0 # Progress bars
# Training Web UI
# ===== Web UI =====
fastapi>=0.110.0
uvicorn[standard]>=0.27.0
python-multipart>=0.0.9 # FastAPI UploadFile 隐含依赖
pyarrow>=14.0.0 # pandas 读写 Parquet 必需引擎
python-multipart>=0.0.9
pydantic>=2.0.0
# ===== Optional Dependencies (For experimental scripts) =====
# See requirements-optional.txt for:
# - matplotlib, seaborn (for lord/experiment.py visualization)
# - tushare (for times.py Chinese stock market data)
#
# Install tip (Chinese Windows): prefer
# python -m pip install -r requirements.txt
# over bare `pip` (avoids pip-shim GBK encoding issues).
# ===== Auth / Crypto helpers (WorkBuddy token decrypt on Windows) =====
cryptography>=41.0.0
# ===== Environment & Logging =====
python-dotenv>=1.0.0
loguru>=0.7.0
tqdm>=4.66.0
# ===== Tests / E2E tooling =====
pytest>=7.0.0
hypothesis>=6.0.0
playwright>=1.40.0