Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →A-share portfolio analysis covering concentration, sector and style exposure, risk metrics, return attribution, and rebalancing suggestions.
Use this skill ↓55% 41%−14 ptsof test cases passed
Passed 9 of 22 test cases with the skill, and 12 of 22 without it.
3 of 3 safety checks passed
SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"
# 各持仓股行情
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE1],[CODE2],[CODE3],...
# 各持仓股财务指标
python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]
# 各持仓股K线(组合收益计算)
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [起始日期]
# 大盘指数(基准对比)
python "$SCRIPTS/cn_stock_data.py" kline --code SH000300 --freq daily --start [起始日期]
# 北向资金(外资对持仓的态度)
python "$SCRIPTS/cn_stock_data.py" north_flow
Step 1: 持仓信息确认
收集用户持仓信息:
| 代码 | 名称 | 持仓数量(股) | 成本价(元) | 买入日期 |
|---|
如果用户只给出股票代码和大致比例,也可以基于比例分析。
Step 2: 持仓快照
通过 cn-stock-data quote 获取最新行情,计算:
| 代码 | 名称 | 现价 | 成本价 | 持仓市值(元) | 占比(%) | 盈亏(%) | 盈亏额(元) |
|---|
汇总:总市值、总盈亏、加权平均收益率
Step 3: 组合特征分析
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.