1model.pt
2model_config.json
3feature_schema.json
4normalization_stats.npz
5universe.json
6data_contract.json
7metrics_summary.json
8manifest.json
9superpnl_full_feature_tcn_15m_top20_20260430.tar.gz
1model = full_feature_tcn
2bar_size = 1m
3lookback = 256
4horizons = [5m, 15m]
5recommended_horizon = 15m
6recommended_horizon_index = 1
7bar_dim = 6
8feature_dim = 33
9hidden_dim = 64
1bar: [batch, 256, 6]
2features: [batch, 256, 33]
1pred_ret[:, 1] -> pred_ret_15m
2sigmoid(pos_logit[:, 1]) -> pos_score_15m
3score_bps = pred_ret_15m * 10000
1hf download Shadowell/SuperPnL \
2 --local-dir /opt/bitpro/artifacts/superpnl \
3 --exclude "*.tar.gz"
1from huggingface_hub import snapshot_download
2
3model_dir = snapshot_download(
4 repo_id="Shadowell/SuperPnL",
5 local_dir="/opt/bitpro/artifacts/superpnl",
6 ignore_patterns=["*.tar.gz"],
7)
1import json
2from pathlib import Path
3
4import numpy as np
5import torch
6
7from superpnl.model import SuperPnLModel
8
9model_dir = Path("/opt/bitpro/artifacts/superpnl")
10
11config = json.loads((model_dir / "model_config.json").read_text())
12stats = np.load(model_dir / "normalization_stats.npz")
13checkpoint = torch.load(model_dir / "model.pt", map_location="cpu")
14
15model = SuperPnLModel(
16 bar_dim=config["bar_dim"],
17 feature_dim=config["feature_dim"],
18 num_horizons=config["num_horizons"],
19 hidden_dim=config["hidden_dim"],
20 dropout=config["dropout"],
21 use_features=True,
22)
23model.load_state_dict(checkpoint["model"])
24model.eval()
1fixed_fee_bps = 0
2fixed_slippage_bps = 0
3threshold_bps = 0
1BitPro 实时 1min K线
2 ↓
3SuperPnL feature builder
4 ↓
5SuperPnL model inference
6 ↓
7pred_ret_15m / pos_score_15m
8 ↓
9低换手策略层
10 ↓
11BitPro broker / execution