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,32 @@
1
+ name: bottom_volume_yang
2
+ display_name: 底部倍量阳
3
+ family: bottom_reversal
4
+ status: experimental
5
+ version: "1.0"
6
+ description: 股价处于近60日低位且自高点回落充分后,放倍量收出实体饱满的强势阳线
7
+ tags: [bottom_reversal, volume, atr_normalized]
8
+ market_scope: [cn]
9
+ min_history_days: 60
10
+
11
+ universe:
12
+ exclude_st: true
13
+ proxy_amount_min: 80000000
14
+ close_min: 2.0
15
+
16
+ mode: direct
17
+ conditions:
18
+ - feature: pos_in_60d
19
+ max: 0.42
20
+ - feature: drawdown_from_60d_high_pct
21
+ max: -15.0
22
+ - feature: vol_ratio_5d
23
+ min: 1.8
24
+ - feature: vol_ratio_1d
25
+ min: 1.8
26
+ - feature: ret_limit_ratio
27
+ min: 0.35
28
+ max: 0.99
29
+ - feature: body_atr
30
+ min: 1.2
31
+ - feature: close_pos_in_bar
32
+ min: 0.65
@@ -0,0 +1,36 @@
1
+ name: box_breakout
2
+ display_name: 箱体突破
3
+ family: breakout
4
+ status: experimental
5
+ version: "1.0"
6
+ description: 站上20日线且前期窄幅横盘箱体后,首次放量阳线向上突破20日高点(与 volume_breakout 策略对齐)
7
+ aligned_strategy: volume_breakout
8
+ tags: [breakout, volume, consolidation]
9
+ market_scope: [cn]
10
+ min_history_days: 60
11
+
12
+ universe:
13
+ exclude_st: true
14
+ proxy_amount_min: 100000000
15
+ close_min: 2.0
16
+
17
+ mode: direct
18
+ conditions:
19
+ - feature: price_above_ma20
20
+ equals: true
21
+ - feature: prev_below_prev_high_20d
22
+ equals: true
23
+ - feature: prev_range_20d_atr
24
+ max: 4.5
25
+ - feature: breakout_20d_atr
26
+ min: 0.15
27
+ max: 2.5
28
+ - feature: vol_ratio_20d
29
+ min: 1.5
30
+ - feature: body_atr
31
+ min: 0.8
32
+ - feature: ret_limit_ratio
33
+ min: 0.25
34
+ max: 0.99
35
+ - feature: close_pos_in_bar
36
+ min: 0.60
@@ -0,0 +1,38 @@
1
+ name: double_bottom_breakout
2
+ display_name: 双底突破
3
+ family: bottom_reversal
4
+ status: experimental
5
+ version: "1.0"
6
+ description: 前期下跌后形成左右双底并伴随足够颈线高度,放量阳线突破颈线阻力
7
+ tags: [bottom_reversal, structural, breakout]
8
+ market_scope: [cn]
9
+ min_history_days: 65
10
+
11
+ universe:
12
+ exclude_st: true
13
+ proxy_amount_min: 80000000
14
+ close_min: 2.0
15
+
16
+ mode: direct
17
+ conditions:
18
+ - feature: double_bottom_neckline_breakout
19
+ equals: true
20
+ params:
21
+ prior_decline_min_pct: 12.0
22
+ trough_diff_max_atr: 1.2
23
+ min_trough_gap: 7
24
+ neckline_min_atr: 1.5
25
+ neckline_min_pct: 5.0
26
+ breakout_max_overshoot_atr: 2.2
27
+ - feature: pos_in_60d
28
+ min: 0.20
29
+ max: 0.85
30
+ - feature: vol_ratio_20d
31
+ min: 1.3
32
+ - feature: body_atr
33
+ min: 0.6
34
+ - feature: ret_limit_ratio
35
+ min: 0.20
36
+ max: 0.99
37
+ - feature: close_pos_in_bar
38
+ min: 0.55
@@ -0,0 +1,37 @@
1
+ name: ma20_shrink_pullback
2
+ display_name: 20日线低波缩量回踩
3
+ family: trend_continuation
4
+ status: experimental
5
+ version: "2.0"
6
+ description: 多头趋势(MA20>MA60 且斜率稳健)中低波动缩量回踩20日均线附近,过滤高波情绪股与追高阳线(与 shrink_pullback 策略对齐)
7
+ aligned_strategy: shrink_pullback
8
+ tags: [trend_continuation, pullback, ma20, low_volatility]
9
+ market_scope: [cn]
10
+ min_history_days: 60
11
+
12
+ universe:
13
+ exclude_st: true
14
+ proxy_amount_min: 80000000
15
+ close_min: 3.0
16
+
17
+ mode: direct
18
+ conditions:
19
+ - feature: ma_bullish
20
+ equals: true
21
+ - feature: ma20_above_ma60
22
+ equals: true
23
+ - feature: ma20_slope_5d_pct
24
+ min: 0.2
25
+ max: 4.0
26
+ - feature: atr20_pct
27
+ max: 3.2
28
+ - feature: pullback_to_ma20_atr
29
+ min: -0.5
30
+ max: 0.8
31
+ - feature: low_to_ma20_atr
32
+ max: 0.6
33
+ - feature: vol_ratio_20d
34
+ max: 0.85
35
+ - feature: ret_limit_ratio
36
+ min: -0.25
37
+ max: 0.20
@@ -0,0 +1,49 @@
1
+ name: shooting_star_confirm
2
+ display_name: 仙人指路确认
3
+ family: breakout
4
+ status: experimental
5
+ version: "1.0"
6
+ description: 放量长上影试盘后1-5个交易日未有效跌破试盘最低价,并放量阳线站上试盘最高价(无状态观察/确认)
7
+ tags: [breakout, observe_confirm, upper_shadow]
8
+ market_scope: [cn]
9
+ min_history_days: 60
10
+
11
+ universe:
12
+ exclude_st: true
13
+ proxy_amount_min: 100000000
14
+ close_min: 2.0
15
+
16
+ mode: observe_confirm
17
+ min_wait_days: 1
18
+ lookback_days: 5
19
+ invalidation:
20
+ rule: close_below_observe_low
21
+ tolerance_atr: 0.2
22
+
23
+ observe:
24
+ - feature: price_above_ma20
25
+ equals: true
26
+ - feature: pos_in_60d
27
+ min: 0.45
28
+ - feature: upper_shadow_atr
29
+ min: 1.0
30
+ - feature: upper_shadow_to_range
31
+ min: 0.45
32
+ - feature: vol_ratio_20d
33
+ min: 1.3
34
+ - feature: change_pct
35
+ min: -1.5
36
+ max: 6.5
37
+
38
+ confirm:
39
+ - feature: price_above_ma20
40
+ equals: true
41
+ - feature: close_above_observe_high
42
+ equals: true
43
+ - feature: body_atr
44
+ min: 0.5
45
+ - feature: vol_ratio_20d
46
+ min: 1.1
47
+ - feature: ret_limit_ratio
48
+ min: 0.15
49
+ max: 0.99
@@ -0,0 +1,44 @@
1
+ name: single_yang_hold
2
+ display_name: 单阳不破
3
+ family: trend_continuation
4
+ status: experimental
5
+ version: "1.0"
6
+ description: 标志性放量长阳出现后3-6个交易日不跌破大阳开盘价支撑并再度企稳收阳(无状态观察/确认)
7
+ tags: [trend_continuation, observe_confirm]
8
+ market_scope: [cn]
9
+ min_history_days: 60
10
+
11
+ universe:
12
+ exclude_st: true
13
+ proxy_amount_min: 80000000
14
+ close_min: 2.0
15
+
16
+ mode: observe_confirm
17
+ min_wait_days: 3
18
+ lookback_days: 6
19
+ invalidation:
20
+ rule: close_below_observe_open
21
+ tolerance_atr: 0.2
22
+
23
+ observe:
24
+ - feature: body_atr
25
+ min: 1.4
26
+ - feature: ret_limit_ratio
27
+ min: 0.40
28
+ max: 1.05
29
+ - feature: vol_ratio_20d
30
+ min: 1.5
31
+ - feature: close_pos_in_bar
32
+ min: 0.70
33
+
34
+ confirm:
35
+ - feature: price_above_ma20
36
+ equals: true
37
+ - feature: hold_above_observe_low
38
+ equals: true
39
+ - feature: close_above_observe_mid
40
+ equals: true
41
+ - feature: body_pct
42
+ min: 0.2
43
+ - feature: vol_ratio_20d
44
+ max: 2.0
@@ -0,0 +1,39 @@
1
+ name: steady_trend_breakout
2
+ display_name: 低波趋势稳健突破
3
+ family: breakout
4
+ status: experimental
5
+ version: "1.0"
6
+ description: 多头趋势且前期低波窄幅整理后,温和放量突破20日高点(拒绝追高大阳与次日一字接盘,与 volume_breakout 策略对齐)
7
+ aligned_strategy: volume_breakout
8
+ tags: [breakout, volume, consolidation, low_volatility]
9
+ market_scope: [cn]
10
+ min_history_days: 60
11
+
12
+ universe:
13
+ exclude_st: true
14
+ proxy_amount_min: 150000000
15
+ close_min: 3.0
16
+
17
+ mode: direct
18
+ conditions:
19
+ - feature: ma_bullish
20
+ equals: true
21
+ - feature: ma20_above_ma60
22
+ equals: true
23
+ - feature: prev_below_prev_high_20d
24
+ equals: true
25
+ - feature: atr20_pct
26
+ max: 3.5
27
+ - feature: prev_range_20d_atr
28
+ max: 4.0
29
+ - feature: breakout_20d_atr
30
+ min: 0.05
31
+ max: 1.2
32
+ - feature: vol_ratio_20d
33
+ min: 1.2
34
+ max: 3.0
35
+ - feature: ret_limit_ratio
36
+ min: 0.15
37
+ max: 0.55
38
+ - feature: close_pos_in_bar
39
+ min: 0.65
@@ -0,0 +1,72 @@
1
+ name: three_white_soldiers
2
+ display_name: 红三兵
3
+ family: trend_continuation
4
+ status: experimental
5
+ version: "1.0"
6
+ description: 60日相对低中位止跌后连续三根稳健推进阳线,剔除一字/涨停板接力与上影受阻(250日观察对照基线)
7
+ tags: [trend_continuation, multi_bar, candlestick]
8
+ market_scope: [cn]
9
+ min_history_days: 60
10
+ cooldown_days: 3
11
+
12
+ universe:
13
+ exclude_st: true
14
+ proxy_amount_min: 80000000
15
+ close_min: 2.0
16
+
17
+ mode: direct
18
+ conditions:
19
+ - feature: valid_streak
20
+ min: 4
21
+ - feature: bull_streak
22
+ min: 3
23
+ - feature: close_higher_streak
24
+ min: 2
25
+ - feature: pos_in_60d
26
+ lag: 2
27
+ max: 0.65
28
+ - feature: is_limit_up
29
+ equals: false
30
+ - feature: is_limit_up
31
+ lag: 1
32
+ equals: false
33
+ - feature: is_limit_up
34
+ lag: 2
35
+ equals: false
36
+ - feature: body_limit_ratio
37
+ min: 0.08
38
+ max: 0.55
39
+ - feature: body_limit_ratio
40
+ lag: 1
41
+ min: 0.08
42
+ max: 0.55
43
+ - feature: body_limit_ratio
44
+ lag: 2
45
+ min: 0.08
46
+ max: 0.55
47
+ - feature: ret_3d_limit_ratio
48
+ min: 0.30
49
+ max: 1.05
50
+ - feature: open_in_prev_body
51
+ equals: true
52
+ - feature: open_in_prev_body
53
+ lag: 1
54
+ equals: true
55
+ - feature: upper_shadow_to_range
56
+ max: 0.35
57
+ - feature: upper_shadow_to_range
58
+ lag: 1
59
+ max: 0.35
60
+ - feature: upper_shadow_to_range
61
+ lag: 2
62
+ max: 0.35
63
+ - feature: body_ratio_vs_prev
64
+ min: 0.50
65
+ - feature: body_ratio_vs_prev
66
+ lag: 1
67
+ min: 0.50
68
+ - feature: vol_ratio_20d
69
+ min: 0.8
70
+ max: 2.8
71
+ - feature: pullback_to_ma20_atr
72
+ max: 2.5
@@ -0,0 +1,91 @@
1
+ name: three_white_soldiers_pullback
2
+ display_name: 红三兵回踩确认
3
+ family: trend_continuation
4
+ status: experimental
5
+ version: "1.0"
6
+ description: 出现非涨停稳健红三兵后1-5个交易日回踩不破第三阳开盘支撑,再度放量可控收阳确认(无状态观察/确认)
7
+ tags: [trend_continuation, observe_confirm, multi_bar, candlestick]
8
+ market_scope: [cn]
9
+ min_history_days: 60
10
+ cooldown_days: 5
11
+
12
+ universe:
13
+ exclude_st: true
14
+ proxy_amount_min: 80000000
15
+ close_min: 2.0
16
+
17
+ mode: observe_confirm
18
+ min_wait_days: 1
19
+ lookback_days: 5
20
+ invalidation:
21
+ rule: close_below_observe_open
22
+ tolerance_atr: 0.3
23
+
24
+ observe:
25
+ - feature: valid_streak
26
+ min: 4
27
+ - feature: bull_streak
28
+ min: 3
29
+ - feature: close_higher_streak
30
+ min: 2
31
+ - feature: pos_in_60d
32
+ lag: 2
33
+ max: 0.70
34
+ - feature: is_limit_up
35
+ equals: false
36
+ - feature: is_limit_up
37
+ lag: 1
38
+ equals: false
39
+ - feature: is_limit_up
40
+ lag: 2
41
+ equals: false
42
+ - feature: body_limit_ratio
43
+ min: 0.08
44
+ max: 0.55
45
+ - feature: body_limit_ratio
46
+ lag: 1
47
+ min: 0.08
48
+ max: 0.55
49
+ - feature: body_limit_ratio
50
+ lag: 2
51
+ min: 0.08
52
+ max: 0.55
53
+ - feature: ret_3d_limit_ratio
54
+ min: 0.30
55
+ max: 1.05
56
+ - feature: open_in_prev_body
57
+ equals: true
58
+ - feature: open_in_prev_body
59
+ lag: 1
60
+ equals: true
61
+ - feature: upper_shadow_to_range
62
+ max: 0.35
63
+ - feature: upper_shadow_to_range
64
+ lag: 1
65
+ max: 0.35
66
+ - feature: upper_shadow_to_range
67
+ lag: 2
68
+ max: 0.35
69
+ - feature: body_ratio_vs_prev
70
+ min: 0.50
71
+ - feature: body_ratio_vs_prev
72
+ lag: 1
73
+ min: 0.50
74
+ - feature: vol_ratio_20d
75
+ min: 0.8
76
+ max: 2.8
77
+
78
+ confirm:
79
+ - feature: price_above_ma20
80
+ equals: true
81
+ - feature: is_bull_bar
82
+ equals: true
83
+ - feature: is_limit_up
84
+ equals: false
85
+ - feature: close_above_observe_mid
86
+ equals: true
87
+ - feature: vol_ratio_20d
88
+ max: 1.6
89
+ - feature: ret_limit_ratio
90
+ min: 0.05
91
+ max: 0.55