每日持仓分析

# 每日持仓分析

定义

M.daily_position_analysis.v6(backtest_ds=)

目的

展现每日持仓股票的行业市值分布和top10市值分布

参数

  • 无参数

返回

  • industry_market_value_daily:industry_market_value_daily,每日各行业市值(申万一级)
  • top10_positions:top10_positions,每日的top10持仓股票

返回类型

  • Outputs

工作流截图

示例代码

# m8为回测模块
M3 = M.daily_position_analysis.v6(
    backtest_ds=m8.raw_perf
)

运行结果

[2019-07-16 18:40:59.122217] INFO: bigquant: instruments.v2 开始运行..
[2019-07-16 18:40:59.191497] INFO: bigquant: 命中缓存
[2019-07-16 18:40:59.194939] INFO: bigquant: instruments.v2 运行完成[0.072703s].
[2019-07-16 18:40:59.198204] INFO: bigquant: advanced_auto_labeler.v2 开始运行..
[2019-07-16 18:40:59.253763] INFO: bigquant: 命中缓存
[2019-07-16 18:40:59.255842] INFO: bigquant: advanced_auto_labeler.v2 运行完成[0.057633s].
[2019-07-16 18:40:59.258316] INFO: bigquant: input_features.v1 开始运行..
[2019-07-16 18:40:59.314858] INFO: bigquant: 命中缓存
[2019-07-16 18:40:59.317572] INFO: bigquant: input_features.v1 运行完成[0.059224s].
[2019-07-16 18:40:59.389449] INFO: bigquant: general_feature_extractor.v7 开始运行..
[2019-07-16 18:40:59.641515] INFO: bigquant: 命中缓存
[2019-07-16 18:40:59.646604] INFO: bigquant: general_feature_extractor.v7 运行完成[0.257145s].
[2019-07-16 18:40:59.649391] INFO: bigquant: derived_feature_extractor.v3 开始运行..
[2019-07-16 18:40:59.730222] INFO: bigquant: 命中缓存
[2019-07-16 18:40:59.732785] INFO: bigquant: derived_feature_extractor.v3 运行完成[0.083377s].
[2019-07-16 18:40:59.736872] INFO: bigquant: join.v3 开始运行..
[2019-07-16 18:40:59.822704] INFO: bigquant: 命中缓存
[2019-07-16 18:40:59.826281] INFO: bigquant: join.v3 运行完成[0.089365s].
[2019-07-16 18:40:59.830067] INFO: bigquant: dropnan.v1 开始运行..
[2019-07-16 18:40:59.896461] INFO: bigquant: 命中缓存
[2019-07-16 18:40:59.898950] INFO: bigquant: dropnan.v1 运行完成[0.068863s].
[2019-07-16 18:40:59.902694] INFO: bigquant: stock_ranker_train.v5 开始运行..
[2019-07-16 18:41:00.051663] INFO: bigquant: 命中缓存
[2019-07-16 18:41:00.602747] INFO: bigquant: stock_ranker_train.v5 运行完成[0.700023s].
[2019-07-16 18:41:00.606770] INFO: bigquant: instruments.v2 开始运行..
[2019-07-16 18:41:00.662580] INFO: bigquant: 命中缓存
[2019-07-16 18:41:00.665208] INFO: bigquant: instruments.v2 运行完成[0.058417s].
[2019-07-16 18:41:00.756004] INFO: bigquant: general_feature_extractor.v7 开始运行..
[2019-07-16 18:41:00.817735] INFO: bigquant: 命中缓存
[2019-07-16 18:41:00.827438] INFO: bigquant: general_feature_extractor.v7 运行完成[0.071423s].
[2019-07-16 18:41:00.830937] INFO: bigquant: derived_feature_extractor.v3 开始运行..
[2019-07-16 18:41:00.913129] INFO: bigquant: 命中缓存
[2019-07-16 18:41:00.915756] INFO: bigquant: derived_feature_extractor.v3 运行完成[0.084798s].
[2019-07-16 18:41:00.918932] INFO: bigquant: dropnan.v1 开始运行..
[2019-07-16 18:41:00.989722] INFO: bigquant: 命中缓存
[2019-07-16 18:41:00.994672] INFO: bigquant: dropnan.v1 运行完成[0.075713s].
[2019-07-16 18:41:00.998630] INFO: bigquant: stock_ranker_predict.v5 开始运行..
[2019-07-16 18:41:01.053166] INFO: bigquant: 命中缓存
[2019-07-16 18:41:01.056203] INFO: bigquant: stock_ranker_predict.v5 运行完成[0.057554s].
[2019-07-16 18:41:01.335825] INFO: bigquant: backtest.v8 开始运行..
[2019-07-16 18:41:01.495029] INFO: bigquant: 命中缓存
[2019-07-16 18:41:04.336108] INFO: bigquant: backtest.v8 运行完成[3.000284s].
[2019-07-16 18:41:04.340283] INFO: bigquant: daily_position_analysis.v6 开始运行..
[2019-07-16 18:41:04.460958] INFO: bigquant: 命中缓存
[2019-07-16 18:41:04.913150] INFO: bigquant: daily_position_analysis.v6 运行完成[0.572818s].

输出图表

交互式图表,按申万一级行业分类展现持仓股票在各行业的市值分布。不同颜色代表不同行业,移动鼠标可见具体市值。

交互式图表,展现持仓数量前10的个股市值。


更多应用,可参见BigQuant平台【量化分析】模块中的绩效归因模板策略