Install any skill in seconds. Free to start, no credit card required.
Get Started Free →aifinlab/a-share-multifactor-model
A股多因子模型/Barra风格因子分析。当用户说"多因子"、"multifactor"、"Barra"、"因子模型"、"风格因子"、"XX的因子暴露"、"因子收益率"、"风险模型"时触发。基于 cn-stock-data 获取行情和财务数据,构建多因子风险模型,分析因子暴露、因子收益、协方差矩阵。支持研报风格(formal)和快速分析风格(brief)。
Passed 16 of 19 test cases with the skill, and 10 of 19 without it.
and 6 more in the full report
6 fixed12 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
The instructions your model reads when the skill loads.
SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"
# 个股K线(计算动量/波动率因子)
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [日期]
# 实时行情(市值/PE/PB等)
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE1],[CODE2],...
# 财务指标(ROE/营收增速等基本面因子)
python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]
量化计算:
QSCRIPTS="$SKILLS_ROOT/a-share-multifactor-model/scripts"
# 多因子回归
python "$QSCRIPTS/multifactor_builder.py" --returns returns.csv --factors "size,value,momentum" --method ols
根据用户需求选择因子集:
test cases passed, vs 10 / 19 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.