Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By quantskillsGPL-3.0In 1 marketplace
Monitors northbound flows, margin trading, and futures conditions with multiple risk signals.
Claude hands work to one, or you mention it with @.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A-share 北向资金 + 融资融券 + 股指期货全景监控系统。每日自动采集沪深港通资金流向、两融数据和股指期货数据,通过 25 个信号检测器 和 4 个共振/背离模式,配合 LLM 宏观研判(DeepSeek/Claude),生成综合情绪评分日报(12 节 Markdown + JSON)。
# 克隆仓库
cd D:\python\PandaAI\Pandaai_skill_02
# 安装依赖
pip install -r requirements.txt
# 配置环境变量
cp .env.example .env
# 编辑 .env 填入 Pandadata 凭证:
# DEFAULT_USERNAME=86xxxxxxxxxxx
# DEFAULT_PASSWORD=your_password
# LLM API Key (可选,无 Key 时使用规则引擎备选)
# ANTHROPIC_API_KEY=sk-xxx # Claude
# ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic # DeepSeek
# 默认运行(最新交易日,使用缓存)
python run.py
# 指定日期
python run.py --date 20260630
# 强制拉取最新数据(跳过缓存)
python run.py --date 20260630 --no-cache
# 精简模式(LLM 150-200字摘要)
python run.py --summary
# 自定义 TOP-N 数量 + 详细日志
python run.py --top-n 30 --verbose
# 清理缓存(删除30天前的数据)
python run.py --cleanup-cache 30
output/
2026-07-02/
panorama_monitor_20260702.md # Markdown 日报(12节)
panorama_monitor_20260702.json # JSON 结构化数据
cache/
YYYYMMDD/ # 每日缓存
nb_flow_history.parquet # 北向流向累积历史
sw_industry_mapping.parquet # 申万行业分类缓存(30天)
shenwan_backup.parquet # 申万离线备份(永不过期)
core/
__init__.py
_types.py # SignalResult 数据类型 + 信号衰减函数
cache.py # 日期分区 Parquet 缓存 + 离线备份
data_fetcher.py # 多源数据采集(Pandadata + AKShare + HKEX)
flow_accumulator.py # 北向流向日度历史累积器
northbound.py # 北向资金 7 信号检测器(合并 flow_trend + flow_direction_trend)
margin.py # 融资融券 7 信号检测器(含极端区间检测)
futures.py # 股指期货 3 信号检测器
price_volume.py # 量价确认 2 信号
microstructure.py # 微观结构 7 信号
resonance.py # 4 共振/背离模式
scorer.py # 综合评分 0-100 + 风险评级 + 行业中性排名
pipeline.py # PanoramaPipeline 编排器
backtest.py # 历史 IC 回测框架
reporter.py # Markdown(12节) + JSON 报告生成
llm/
analyst.py # LLMAnalyst: DeepSeek/Claude API + 重试 + 规则引擎备选
dashboard/
app.py # Streamlit 仪表盘
mcp_server.py # MCP Server (stdio + SSE)
run.py # CLI 入口
config.json # 全部阈值和权重配置
tests/ # 540 个测试用例 (101 个测试类)
conftest.py # 共享 fixtures
test_northbound.py # 北向检测器测试
test_margin.py # 融资检测器测试
test_futures.py # 期货检测器测试
test_price_volume.py # 量价检测器测试
test_microstructure.py # 微观结构测试
test_resonance.py # 共振分析测试
test_scorer.py # 评分器测试
test_reporter.py # 报告生成测试
test_pipeline.py # 管线集成测试
test_analyst.py # LLM 分析测试
test_backtest.py # 回测测试
test_cache.py # 缓存测试
test_flow_accumulator.py # 流向累积器测试
test_data_fetcher.py # 数据采集测试
# 运行全部 540 个测试
python -m pytest tests/ -q
# 按模块
python -m pytest tests/test_northbound.py -q
python -m pytest tests/test_margin.py -q
# 带覆盖率
python -m pytest tests/ --cov=core --cov-report=term-missing
config.json 中可调整所有阈值和权重:
| 配置项 | 默认值 | 说明 |
|---|---|---|
northbound.consecutive_days_threshold | 3 | 连续流入/流出天数阈值 |
northbound.anomaly_zscore_threshold | 2.0 | 单日异常 Z-score 阈值 |
margin.buy_ratio_hot | 0.10 | 融资买入比活跃线 |
margin.buy_ratio_dangerous | 0.15 | 融资买入比危险线 |
margin.extreme_percentile | 95 | 极端过热分位数 |
margin.ice_point_percentile | 5 | 极端冰点分位数 |
futures.basis_threshold | 0.3 | 基差方向阈值 |
futures.oi_change_threshold | 2.0 | 持仓量变化阈值 |
scoring.northbound_weight | 0.18 | 北向资金权重(2026-07 由 0.35 重校准) |
scoring.margin_weight | 0.38 | 融资融券权重 |
scoring.futures_weight | 0.20 | 股指期货权重 |
scoring.pv_weight | 0.08 | 量价确认权重 |
scoring.micro_weight | 0.16 | 微观结构权重(2026-07 由 0.05 重校准) |
llm.timeout | 120.0 | LLM API 超时(秒) |
llm.max_retries | 2 | HTTP 级别重试 |
llm.llm_retries | 3 | 指数退避 LLM 重试 |
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
northbound-margin-monitor@quantskills is listed by quantskills/registry — review the source before installing
npx claudepluginhub quantskills/registry --plugin northbound-margin-monitorPlugins from other owners that cover similar ground