Spaces:
Sleeping
Sleeping
|
Download README.md from zbgool/quant-engine: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/spaces/zbgool/quant-engine/resolve/main/README.md
- Command line
-
hf download hf://spaces/zbgool/quant-engine/README.md
-
curl -L -o README.md https://huggingface.co/spaces/zbgool/quant-engine/resolve/main/README.md
1.03 kB
| title: AI Quant Factor Backtest Engine | |
| emoji: 📈 | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: docker | |
| app_port: 7860 | |
| pinned: false | |
| # AI 量化因子回测引擎 | |
| FastAPI 回测服务,支持从 Cloudflare R2 加载 parquet 格式 K 线数据,使用 DuckDB 进行高速查询。 | |
| ## 环境变量配置 | |
| 在 HuggingFace Spaces 的 Settings → Repository secrets 中配置: | |
| | 变量 | 说明 | | |
| |------|------| | |
| | `DATA_SOURCE` | 数据源:`r2` / `local` / `supabase` | | |
| | `R2_ACCOUNT_ID` | Cloudflare R2 Account ID | | |
| | `R2_ACCESS_KEY_ID` | R2 Access Key ID | | |
| | `R2_SECRET_ACCESS_KEY` | R2 Secret Access Key | | |
| | `R2_BUCKET_NAME` | R2 Bucket 名称 | | |
| | `R2_PREFIX` | R2 文件前缀(默认 `kline/`) | | |
| | `DATA_REFRESH_TIMES` | 数据自动刷新时间点,如 `18:00,22:00`(默认 `18:00`,空字符串关闭) | | |
| | `SUPABASE_URL` | Supabase URL(可选,用于写回结果) | | |
| | `SUPABASE_KEY` | Supabase Service Key(可选) | | |
| ## API 端点 | |
| - `GET /health` - 健康检查 | |
| - `POST /backtest` - 运行因子回测 | |