alphasift 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. alphasift/__init__.py +52 -0
  2. alphasift/__main__.py +7 -0
  3. alphasift/audit.py +191 -0
  4. alphasift/candidate_context.py +738 -0
  5. alphasift/cli.py +2797 -0
  6. alphasift/config.py +705 -0
  7. alphasift/context.py +672 -0
  8. alphasift/daily.py +1256 -0
  9. alphasift/daily_brief.py +593 -0
  10. alphasift/daily_report.py +1115 -0
  11. alphasift/daily_report_html.py +1257 -0
  12. alphasift/doctor.py +1123 -0
  13. alphasift/dsa.py +302 -0
  14. alphasift/dsa_adapter.py +178 -0
  15. alphasift/dsa_provider.py +192 -0
  16. alphasift/evaluate.py +2418 -0
  17. alphasift/filter.py +517 -0
  18. alphasift/hotspot.py +1713 -0
  19. alphasift/industry.py +959 -0
  20. alphasift/llm_client.py +349 -0
  21. alphasift/market_digest.py +284 -0
  22. alphasift/market_news.py +446 -0
  23. alphasift/market_regime.py +578 -0
  24. alphasift/markets.py +160 -0
  25. alphasift/mcp.py +720 -0
  26. alphasift/models.py +315 -0
  27. alphasift/normalize.py +113 -0
  28. alphasift/notify.py +2608 -0
  29. alphasift/overview.py +225 -0
  30. alphasift/pack.py +1470 -0
  31. alphasift/pack_features.py +431 -0
  32. alphasift/pattern_replay.py +1449 -0
  33. alphasift/patterns/bottom_volume_yang.yaml +32 -0
  34. alphasift/patterns/box_breakout.yaml +36 -0
  35. alphasift/patterns/double_bottom_breakout.yaml +38 -0
  36. alphasift/patterns/ma20_shrink_pullback.yaml +37 -0
  37. alphasift/patterns/shooting_star_confirm.yaml +49 -0
  38. alphasift/patterns/single_yang_hold.yaml +44 -0
  39. alphasift/patterns/steady_trend_breakout.yaml +39 -0
  40. alphasift/patterns/three_white_soldiers.yaml +72 -0
  41. alphasift/patterns/three_white_soldiers_pullback.yaml +91 -0
  42. alphasift/patterns.py +1233 -0
  43. alphasift/performance_history.py +297 -0
  44. alphasift/pipeline.py +1010 -0
  45. alphasift/post_analysis.py +337 -0
  46. alphasift/ranker.py +990 -0
  47. alphasift/report.py +379 -0
  48. alphasift/result_schema.py +179 -0
  49. alphasift/risk.py +452 -0
  50. alphasift/run_history.py +164 -0
  51. alphasift/scorer.py +597 -0
  52. alphasift/server.py +680 -0
  53. alphasift/snapshot.py +1025 -0
  54. alphasift/snapshot_us.py +280 -0
  55. alphasift/snapshot_yahoo.py +358 -0
  56. alphasift/source_guard.py +70 -0
  57. alphasift/source_history.py +306 -0
  58. alphasift/store.py +294 -0
  59. alphasift/strategies/balanced_alpha.yaml +76 -0
  60. alphasift/strategies/blue_chip_income.yaml +87 -0
  61. alphasift/strategies/capital_heat.yaml +74 -0
  62. alphasift/strategies/dual_low.yaml +80 -0
  63. alphasift/strategies/global_value.yaml +65 -0
  64. alphasift/strategies/low_volatility_quality.yaml +95 -0
  65. alphasift/strategies/momentum_quality.yaml +81 -0
  66. alphasift/strategies/oversold_reversal.yaml +75 -0
  67. alphasift/strategies/quality_value.yaml +80 -0
  68. alphasift/strategies/shrink_pullback.yaml +77 -0
  69. alphasift/strategies/us_momentum_quality.yaml +74 -0
  70. alphasift/strategies/volume_breakout.yaml +78 -0
  71. alphasift/strategy.py +1090 -0
  72. alphasift/strategy_cards.py +424 -0
  73. alphasift/strategy_templates.py +291 -0
  74. alphasift/timeutil.py +38 -0
  75. alphasift/valuation_kr.py +149 -0
  76. alphasift/workbench_ui.py +1051 -0
  77. alphasift-0.3.1.data/data/.env.example +151 -0
  78. alphasift-0.3.1.data/data/LICENSE +184 -0
  79. alphasift-0.3.1.data/data/SKILL.md +190 -0
  80. alphasift-0.3.1.data/data/agents/openai.yaml +7 -0
  81. alphasift-0.3.1.dist-info/METADATA +312 -0
  82. alphasift-0.3.1.dist-info/RECORD +86 -0
  83. alphasift-0.3.1.dist-info/WHEEL +5 -0
  84. alphasift-0.3.1.dist-info/entry_points.txt +2 -0
  85. alphasift-0.3.1.dist-info/licenses/LICENSE +184 -0
  86. alphasift-0.3.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,80 @@
1
+ # 稳健价值策略
2
+ name: quality_value
3
+ display_name: 稳健价值
4
+ description: 中盘 GARP 合理估值与趋势确认,兼顾盈利质量、稳定成交与中期均线支撑
5
+ version: "1.2"
6
+ category: value
7
+ tags: [value, quality, stability, daily_k, dynamic_signal]
8
+ style:
9
+ risk_profile: defensive
10
+ holding_period: watchlist
11
+ execution_style: quality_value
12
+ market_regime: [risk_off, range_bound]
13
+ capital_profile: medium_liquidity
14
+ ui_badge: 稳健
15
+
16
+ screening:
17
+ enabled: true
18
+ market_scope: [cn]
19
+ hard_filters:
20
+ exclude_st: true
21
+ amount_min: 80000000
22
+ pe_ttm_min: 10
23
+ pe_ttm_max: 32
24
+ pb_min: 1.4
25
+ pb_max: 5.5
26
+ market_cap_min: 8000000000
27
+ market_cap_max: 120000000000
28
+ turnover_rate_min: 0.8
29
+ change_pct_min: -3.5
30
+ change_pct_max: 5.0
31
+ price_min: 3
32
+ price_max: 180
33
+ change_60d_min: 0.0
34
+ require_price_above_ma20: true
35
+ tech_weight: 0.30
36
+ factor_weights:
37
+ value: 0.24
38
+ stability: 0.24
39
+ momentum: 0.20
40
+ liquidity: 0.14
41
+ activity: 0.10
42
+ size: 0.04
43
+ reversal: 0.04
44
+ scoring_profile:
45
+ momentum_chase_start_pct: 3.0
46
+ momentum_chase_penalty_slope: 16.0
47
+ activity_ideal_volume_ratio: 1.4
48
+ activity_ideal_turnover_rate: 2.5
49
+ stability_hot_change_pct: 4.5
50
+ stability_high_turnover_rate: 8.0
51
+ stability_high_volume_ratio: 4.0
52
+ risk_profile:
53
+ chase_change_pct: 5.5
54
+ abnormal_volume_ratio: 4.5
55
+ high_turnover_rate: 10.0
56
+ low_llm_confidence: 0.45
57
+ portfolio_profile:
58
+ mode: hard_cap
59
+ max_same_bucket: 1
60
+ concentration_penalty: 4.5
61
+ buckets:
62
+ 金融: [券商, 银行, 保险, 多元金融]
63
+ 基建航运: [建筑施工, 基础建设, 港口航运, 航运, 铁路, 公路, 物流]
64
+ 消费: [白酒, 食品, 家电, 白色家电, 零售, 消费, 酿酒]
65
+ 医药: [医药, 中药, 中药生产, 医疗器械, 生物制品, 化学制药]
66
+ 科技电子: [半导体, 电子元件, 消费电子, 计算机软件, AI算力, 通信设备, 光模块]
67
+ 新能源: [新能源, 光伏, 锂电, 电池, 储能, 输变电设备]
68
+ 周期资源: [钢铁, 煤炭, 有色, 稀有金属, 基本金属, 贵金属, 化工, 石油天然气, 化学原料]
69
+ 公用事业: [电力, 燃气, 水务, 环保, 公用事业]
70
+ scorecard_profile:
71
+ value_quality_value_min: 72.0
72
+ value_quality_stability_min: 68.0
73
+ value_quality_bonus: 2.8
74
+ volume_spike_ratio: 4.0
75
+ ranking_hints: |
76
+ 优先关注:
77
+ 1. 估值合理且不是依赖单日情绪推动的标的
78
+ 2. 成交额足够、涨跌幅不过热,适合后续深度分析
79
+ 3. 兼顾行业地位、现金流质量、分红或经营稳定性线索
80
+ max_output: 5
@@ -0,0 +1,77 @@
1
+ # 缩量回踩选股策略
2
+ name: shrink_pullback
3
+ display_name: 缩量回踩
4
+ description: 上升趋势中缩量回踩均线支撑,趋势延续的入场机会
5
+ version: "1.1"
6
+ category: trend
7
+ tags: [trend, pullback, daily_k]
8
+ style:
9
+ risk_profile: balanced
10
+ holding_period: swing
11
+ execution_style: pullback_continuation
12
+ market_regime: [risk_on, trend]
13
+ capital_profile: medium_liquidity
14
+ ui_badge: 回踩
15
+
16
+ screening:
17
+ enabled: true
18
+ market_scope: [cn]
19
+ hard_filters:
20
+ exclude_st: true
21
+ amount_min: 80000000
22
+ turnover_rate_min: 1.0
23
+ require_ma_bullish: true
24
+ require_price_above_ma20: true
25
+ signal_score_min: 65
26
+ volume_ratio_20d_max: 1.5
27
+ pullback_to_ma20_pct_min: -2.0
28
+ pullback_to_ma20_pct_max: 8.0
29
+ volatility_20d_pct_max: 45.0
30
+ max_drawdown_20d_pct_min: -12.0
31
+ atr_20_pct_max: 6.5
32
+ tech_weight: 0.5
33
+ factor_weights:
34
+ momentum: 0.32
35
+ stability: 0.22
36
+ activity: 0.18
37
+ liquidity: 0.15
38
+ value: 0.08
39
+ reversal: 0.05
40
+ scoring_profile:
41
+ momentum_60d_overheat_pct: 35.0
42
+ momentum_chase_start_pct: 5.0
43
+ momentum_chase_penalty_slope: 14.0
44
+ activity_ideal_volume_ratio: 1.0
45
+ activity_ideal_turnover_rate: 2.5
46
+ activity_high_volume_ratio: 4.5
47
+ stability_hot_change_pct: 5.5
48
+ stability_high_volatility_pct: 40.0
49
+ stability_max_drawdown_floor_pct: -10.0
50
+ stability_high_atr_pct: 5.5
51
+ risk_profile:
52
+ chase_change_pct: 6.5
53
+ abnormal_volume_ratio: 4.5
54
+ high_turnover_rate: 12.0
55
+ weak_signal_score: 60.0
56
+ portfolio_profile:
57
+ mode: hard_cap
58
+ max_same_bucket: 1
59
+ concentration_penalty: 4.5
60
+ buckets:
61
+ 金融: [券商, 银行, 保险, 多元金融]
62
+ 基建航运: [建筑施工, 基础建设, 港口航运, 航运, 铁路, 公路, 物流]
63
+ 消费: [白酒, 食品, 家电, 白色家电, 零售, 消费, 酿酒]
64
+ 医药: [医药, 中药, 中药生产, 医疗器械, 生物制品, 化学制药]
65
+ 科技电子: [半导体, 电子元件, 消费电子, 计算机软件, AI算力, 通信设备, 光模块]
66
+ 新能源: [新能源, 光伏, 锂电, 电池, 储能, 输变电设备]
67
+ 周期资源: [钢铁, 煤炭, 有色, 稀有金属, 基本金属, 贵金属, 化工, 石油天然气, 化学原料]
68
+ 公用事业: [电力, 燃气, 水务, 环保, 公用事业]
69
+ scorecard_profile:
70
+ capital_confirmed_bonus: 1.4
71
+ volume_spike_ratio: 4.5
72
+ ranking_hints: |
73
+ 在满足缩量回踩特征的候选中,优先关注:
74
+ 1. 回调幅度适中、趋势结构未破坏
75
+ 2. 缩量明显,洗盘而非出货
76
+ 3. 近期无重大利空
77
+ max_output: 5
@@ -0,0 +1,74 @@
1
+ # US momentum-quality: a market_scope=[us] adaptation of momentum_quality.yaml
2
+ # for the yfinance-backed US snapshot (see alphasift/snapshot_us.py).
3
+ #
4
+ # Differences from the CN template, and why:
5
+ # - exclude_st: false — there is no ST/delisting-risk name convention in the
6
+ # US market, and the CN filter's "ST" substring match on company names would
7
+ # false-positive on ordinary US names (e.g. "AST SpaceMobile").
8
+ # - No pe_ttm_min/max or pb_min/max hard filters — snapshot_us.py's PE/PB come
9
+ # from a best-effort yfinance .info backfill that many tickers won't have;
10
+ # a hard filter on a mostly-missing column would silently gut the universe.
11
+ # value factor weight is kept low for the same reason.
12
+ # - No theme_heat / topic_alignment factor weight — those depend on CN
13
+ # board/concept-heat enrichment (hotspot.py) that has no US data source yet.
14
+ # - portfolio_profile uses mode: hard_cap (max_same_bucket: 2) without Chinese
15
+ # keyword buckets, grouping directly on the active sector/industry label:
16
+ # Yahoo screener snapshots supply Yahoo's 11 fixed sectors, whereas the
17
+ # per-ticker yfinance fallback supplies fine-grained industry strings, and LLM
18
+ # sector labels take precedence when present (matching global_value.yaml).
19
+ name: us_momentum_quality
20
+ display_name: US Momentum Quality
21
+ description: Trend-confirmation candidates from the yfinance-backed US snapshot, adapted from momentum_quality.yaml
22
+ version: "1.1"
23
+ category: framework
24
+ tags: [momentum, quality, trend, us, llm_friendly]
25
+ style:
26
+ risk_profile: balanced
27
+ holding_period: swing
28
+ execution_style: trend_quality
29
+ market_regime: [risk_on, trend, rotation]
30
+ capital_profile: high_liquidity
31
+ ui_badge: Trend
32
+
33
+ screening:
34
+ enabled: true
35
+ market_scope: [us]
36
+ hard_filters:
37
+ exclude_st: false
38
+ amount_min: 20000000
39
+ market_cap_min: 2000000000
40
+ change_pct_min: -6.0
41
+ change_pct_max: 10.0
42
+ price_min: 5
43
+ tech_weight: 0.55
44
+ factor_weights:
45
+ momentum: 0.34
46
+ value: 0.08
47
+ liquidity: 0.20
48
+ activity: 0.18
49
+ stability: 0.16
50
+ reversal: 0.04
51
+ scoring_profile:
52
+ factor_rank_blend: 1.0
53
+ momentum_chase_start_pct: 6.0
54
+ momentum_chase_penalty_slope: 12.0
55
+ activity_ideal_volume_ratio: 1.8
56
+ activity_ideal_turnover_rate: 1.5
57
+ stability_hot_change_pct: 8.0
58
+ risk_profile:
59
+ chase_change_pct: 9.0
60
+ abnormal_volume_ratio: 5.0
61
+ high_turnover_rate: 8.0
62
+ low_llm_confidence: 0.50
63
+ portfolio_profile:
64
+ mode: hard_cap
65
+ max_same_bucket: 2
66
+ concentration_penalty: 3.0
67
+ ranking_hints: |
68
+ Prefer:
69
+ 1. Candidates with a confirmed trend that have not yet chased into an
70
+ extended/overbought move.
71
+ 2. Liquidity and activity that support the trend without looking like a
72
+ one-day volume spike.
73
+ 3. Avoid over-concentration in a single obvious mega-cap theme.
74
+ max_output: 5
@@ -0,0 +1,78 @@
1
+ # 放量突破选股策略
2
+ name: volume_breakout
3
+ display_name: 放量突破
4
+ description: 成交量放大突破关键阻力位,趋势启动信号
5
+ version: "1.2"
6
+ category: trend
7
+ tags: [momentum, volume, breakout]
8
+ style:
9
+ risk_profile: aggressive
10
+ holding_period: short_term
11
+ execution_style: breakout
12
+ market_regime: [risk_on, trend, high_volume]
13
+ capital_profile: high_liquidity
14
+ ui_badge: 突破
15
+
16
+ screening:
17
+ enabled: true
18
+ market_scope: [cn]
19
+ hard_filters:
20
+ exclude_st: true
21
+ amount_min: 100000000
22
+ turnover_rate_min: 3.0
23
+ volume_ratio_min: 2.0
24
+ change_pct_min: 2.0
25
+ change_pct_max: 9.9
26
+ require_price_above_ma20: true
27
+ signal_score_min: 60
28
+ macd_status_whitelist: [bullish, neutral]
29
+ breakout_20d_pct_min: -1.0
30
+ range_20d_pct_max: 35.0
31
+ volume_ratio_20d_min: 1.3
32
+ body_pct_min: 0.5
33
+ consolidation_days_20d_min: 8
34
+ tech_weight: 0.6
35
+ factor_weights:
36
+ momentum: 0.32
37
+ activity: 0.28
38
+ liquidity: 0.22
39
+ theme_heat: 0.08
40
+ stability: 0.10
41
+ scoring_profile:
42
+ momentum_chase_start_pct: 7.0
43
+ momentum_chase_penalty_slope: 11.0
44
+ activity_ideal_volume_ratio: 3.0
45
+ activity_high_volume_ratio: 9.0
46
+ activity_ideal_turnover_rate: 6.0
47
+ activity_high_turnover_rate: 20.0
48
+ stability_hot_change_pct: 8.8
49
+ risk_profile:
50
+ chase_change_pct: 9.8
51
+ abnormal_volume_ratio: 9.0
52
+ high_turnover_rate: 24.0
53
+ weak_signal_score: 45.0
54
+ portfolio_profile:
55
+ mode: hard_cap
56
+ max_same_bucket: 1
57
+ concentration_penalty: 5.0
58
+ buckets:
59
+ 金融: [券商, 银行, 保险, 多元金融]
60
+ 基建航运: [建筑施工, 基础建设, 港口航运, 航运, 铁路, 公路, 物流]
61
+ 消费: [白酒, 食品, 家电, 白色家电, 零售, 消费, 酿酒]
62
+ 医药: [医药, 中药, 中药生产, 医疗器械, 生物制品, 化学制药]
63
+ 科技电子: [半导体, 电子元件, 消费电子, 计算机软件, AI算力, 通信设备, 光模块]
64
+ 新能源: [新能源, 光伏, 锂电, 电池, 储能, 输变电设备]
65
+ 周期资源: [钢铁, 煤炭, 有色, 稀有金属, 基本金属, 贵金属, 化工, 石油天然气, 化学原料]
66
+ 公用事业: [电力, 燃气, 水务, 环保, 公用事业]
67
+ scorecard_profile:
68
+ capital_confirmed_bonus: 2.2
69
+ volume_spike_ratio: 9.0
70
+ hot_money_activity_min: 96.0
71
+ hot_money_penalty: 1.4
72
+ ranking_hints: |
73
+ 优先关注:
74
+ 1. 突破前有明显横盘整理(至少 10 个交易日)
75
+ 2. 突破当日量比和换手同步放大,且日 K 信号仍健康
76
+ 3. 突破后股价至少站上 MA20,优先考虑均线结构更顺的候选
77
+ 4. 板块有联动效应更佳
78
+ max_output: 5