Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Quantifies lead-lag relationships and sector transmission among A-share stocks via cross-correlation and Granger causality tests.
Use this skill ↓45% 68%+23 ptsof test cases passed
Passed 15 of 22 test cases with the skill, and 10 of 22 without it.
Which subcommand of cn_stock_data.py should be executed to fetch real-time or latest market snapshot quotes for target stocks before running lead-lag analysis?
The command uses the quote subcommand of cn_stock_data.py.
3 of 3 safety checks passed
SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [日期]
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE]
python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]
计算标的A在t期收益率与标的B在t+k期收益率的相关性(k=-5到+5)
检验A是否Granger因果引起B(或反向)
构建多标的间的领先-滞后关系网络
| 维度 | formal | brief |
|---|---|---|
| 相关矩阵 | 多lag完整矩阵 | 最强领先关系 |
| 因果检验 | Granger检验结果 | 领先/滞后天数 |
| 关系图谱 | 完整网络图 | Top 3领先者 |
| 默认风格:brief。 |
# 调用 skill
result = run_skill({
"param1": "value1",
"param2": "value2"
})
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.