alphasift 0.3.1__tar.gz
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.
- alphasift-0.3.1/.env.example +151 -0
- alphasift-0.3.1/LICENSE +184 -0
- alphasift-0.3.1/MANIFEST.in +4 -0
- alphasift-0.3.1/PKG-INFO +312 -0
- alphasift-0.3.1/README.md +278 -0
- alphasift-0.3.1/SKILL.md +190 -0
- alphasift-0.3.1/agents/openai.yaml +7 -0
- alphasift-0.3.1/alphasift/__init__.py +52 -0
- alphasift-0.3.1/alphasift/__main__.py +7 -0
- alphasift-0.3.1/alphasift/audit.py +191 -0
- alphasift-0.3.1/alphasift/candidate_context.py +738 -0
- alphasift-0.3.1/alphasift/cli.py +2797 -0
- alphasift-0.3.1/alphasift/config.py +705 -0
- alphasift-0.3.1/alphasift/context.py +672 -0
- alphasift-0.3.1/alphasift/daily.py +1256 -0
- alphasift-0.3.1/alphasift/daily_brief.py +593 -0
- alphasift-0.3.1/alphasift/daily_report.py +1115 -0
- alphasift-0.3.1/alphasift/daily_report_html.py +1257 -0
- alphasift-0.3.1/alphasift/doctor.py +1123 -0
- alphasift-0.3.1/alphasift/dsa.py +302 -0
- alphasift-0.3.1/alphasift/dsa_adapter.py +178 -0
- alphasift-0.3.1/alphasift/dsa_provider.py +192 -0
- alphasift-0.3.1/alphasift/evaluate.py +2418 -0
- alphasift-0.3.1/alphasift/filter.py +517 -0
- alphasift-0.3.1/alphasift/hotspot.py +1713 -0
- alphasift-0.3.1/alphasift/industry.py +959 -0
- alphasift-0.3.1/alphasift/llm_client.py +349 -0
- alphasift-0.3.1/alphasift/market_digest.py +284 -0
- alphasift-0.3.1/alphasift/market_news.py +446 -0
- alphasift-0.3.1/alphasift/market_regime.py +578 -0
- alphasift-0.3.1/alphasift/markets.py +160 -0
- alphasift-0.3.1/alphasift/mcp.py +720 -0
- alphasift-0.3.1/alphasift/models.py +315 -0
- alphasift-0.3.1/alphasift/normalize.py +113 -0
- alphasift-0.3.1/alphasift/notify.py +2608 -0
- alphasift-0.3.1/alphasift/overview.py +225 -0
- alphasift-0.3.1/alphasift/pack.py +1470 -0
- alphasift-0.3.1/alphasift/pack_features.py +431 -0
- alphasift-0.3.1/alphasift/pattern_replay.py +1449 -0
- alphasift-0.3.1/alphasift/patterns/bottom_volume_yang.yaml +32 -0
- alphasift-0.3.1/alphasift/patterns/box_breakout.yaml +36 -0
- alphasift-0.3.1/alphasift/patterns/double_bottom_breakout.yaml +38 -0
- alphasift-0.3.1/alphasift/patterns/ma20_shrink_pullback.yaml +37 -0
- alphasift-0.3.1/alphasift/patterns/shooting_star_confirm.yaml +49 -0
- alphasift-0.3.1/alphasift/patterns/single_yang_hold.yaml +44 -0
- alphasift-0.3.1/alphasift/patterns/steady_trend_breakout.yaml +39 -0
- alphasift-0.3.1/alphasift/patterns/three_white_soldiers.yaml +72 -0
- alphasift-0.3.1/alphasift/patterns/three_white_soldiers_pullback.yaml +91 -0
- alphasift-0.3.1/alphasift/patterns.py +1233 -0
- alphasift-0.3.1/alphasift/performance_history.py +297 -0
- alphasift-0.3.1/alphasift/pipeline.py +1010 -0
- alphasift-0.3.1/alphasift/post_analysis.py +337 -0
- alphasift-0.3.1/alphasift/ranker.py +990 -0
- alphasift-0.3.1/alphasift/report.py +379 -0
- alphasift-0.3.1/alphasift/result_schema.py +179 -0
- alphasift-0.3.1/alphasift/risk.py +452 -0
- alphasift-0.3.1/alphasift/run_history.py +164 -0
- alphasift-0.3.1/alphasift/scorer.py +597 -0
- alphasift-0.3.1/alphasift/server.py +680 -0
- alphasift-0.3.1/alphasift/snapshot.py +1025 -0
- alphasift-0.3.1/alphasift/snapshot_us.py +280 -0
- alphasift-0.3.1/alphasift/snapshot_yahoo.py +358 -0
- alphasift-0.3.1/alphasift/source_guard.py +70 -0
- alphasift-0.3.1/alphasift/source_history.py +306 -0
- alphasift-0.3.1/alphasift/store.py +294 -0
- alphasift-0.3.1/alphasift/strategies/balanced_alpha.yaml +76 -0
- alphasift-0.3.1/alphasift/strategies/blue_chip_income.yaml +87 -0
- alphasift-0.3.1/alphasift/strategies/capital_heat.yaml +74 -0
- alphasift-0.3.1/alphasift/strategies/dual_low.yaml +80 -0
- alphasift-0.3.1/alphasift/strategies/global_value.yaml +65 -0
- alphasift-0.3.1/alphasift/strategies/low_volatility_quality.yaml +95 -0
- alphasift-0.3.1/alphasift/strategies/momentum_quality.yaml +81 -0
- alphasift-0.3.1/alphasift/strategies/oversold_reversal.yaml +75 -0
- alphasift-0.3.1/alphasift/strategies/quality_value.yaml +80 -0
- alphasift-0.3.1/alphasift/strategies/shrink_pullback.yaml +77 -0
- alphasift-0.3.1/alphasift/strategies/us_momentum_quality.yaml +74 -0
- alphasift-0.3.1/alphasift/strategies/volume_breakout.yaml +78 -0
- alphasift-0.3.1/alphasift/strategy.py +1090 -0
- alphasift-0.3.1/alphasift/strategy_cards.py +424 -0
- alphasift-0.3.1/alphasift/strategy_templates.py +291 -0
- alphasift-0.3.1/alphasift/timeutil.py +38 -0
- alphasift-0.3.1/alphasift/valuation_kr.py +149 -0
- alphasift-0.3.1/alphasift/workbench_ui.py +1051 -0
- alphasift-0.3.1/alphasift.egg-info/PKG-INFO +312 -0
- alphasift-0.3.1/alphasift.egg-info/SOURCES.txt +142 -0
- alphasift-0.3.1/alphasift.egg-info/dependency_links.txt +1 -0
- alphasift-0.3.1/alphasift.egg-info/entry_points.txt +2 -0
- alphasift-0.3.1/alphasift.egg-info/requires.txt +12 -0
- alphasift-0.3.1/alphasift.egg-info/top_level.txt +1 -0
- alphasift-0.3.1/pyproject.toml +94 -0
- alphasift-0.3.1/setup.cfg +4 -0
- alphasift-0.3.1/tests/test_audit.py +42 -0
- alphasift-0.3.1/tests/test_candidate_context.py +376 -0
- alphasift-0.3.1/tests/test_cli.py +747 -0
- alphasift-0.3.1/tests/test_code_utils.py +31 -0
- alphasift-0.3.1/tests/test_config.py +423 -0
- alphasift-0.3.1/tests/test_context.py +225 -0
- alphasift-0.3.1/tests/test_daily.py +940 -0
- alphasift-0.3.1/tests/test_daily_brief_and_html.py +337 -0
- alphasift-0.3.1/tests/test_daily_report_and_notify.py +1253 -0
- alphasift-0.3.1/tests/test_dashboard_p3.py +451 -0
- alphasift-0.3.1/tests/test_doctor.py +570 -0
- alphasift-0.3.1/tests/test_dsa.py +139 -0
- alphasift-0.3.1/tests/test_dsa_adapter.py +114 -0
- alphasift-0.3.1/tests/test_ecosystem_and_packaging.py +102 -0
- alphasift-0.3.1/tests/test_evaluation_horizon.py +536 -0
- alphasift-0.3.1/tests/test_evaluation_next_open.py +345 -0
- alphasift-0.3.1/tests/test_filter.py +389 -0
- alphasift-0.3.1/tests/test_hotspot.py +553 -0
- alphasift-0.3.1/tests/test_industry.py +377 -0
- alphasift-0.3.1/tests/test_llm_client.py +516 -0
- alphasift-0.3.1/tests/test_llm_truncation.py +291 -0
- alphasift-0.3.1/tests/test_market_regime.py +285 -0
- alphasift-0.3.1/tests/test_markets.py +465 -0
- alphasift-0.3.1/tests/test_mcp.py +312 -0
- alphasift-0.3.1/tests/test_overview.py +143 -0
- alphasift-0.3.1/tests/test_pack.py +965 -0
- alphasift-0.3.1/tests/test_pack_features.py +455 -0
- alphasift-0.3.1/tests/test_patterns.py +877 -0
- alphasift-0.3.1/tests/test_performance_history.py +164 -0
- alphasift-0.3.1/tests/test_pipeline_daily.py +542 -0
- alphasift-0.3.1/tests/test_pipeline_dsa.py +246 -0
- alphasift-0.3.1/tests/test_pipeline_market.py +76 -0
- alphasift-0.3.1/tests/test_post_analysis.py +103 -0
- alphasift-0.3.1/tests/test_radar_api_and_pull.py +233 -0
- alphasift-0.3.1/tests/test_ranker.py +657 -0
- alphasift-0.3.1/tests/test_report.py +153 -0
- alphasift-0.3.1/tests/test_result_schema.py +154 -0
- alphasift-0.3.1/tests/test_risk.py +319 -0
- alphasift-0.3.1/tests/test_run_history.py +107 -0
- alphasift-0.3.1/tests/test_scorer.py +370 -0
- alphasift-0.3.1/tests/test_server.py +710 -0
- alphasift-0.3.1/tests/test_snapshot.py +656 -0
- alphasift-0.3.1/tests/test_source_health_and_industry_backfill.py +311 -0
- alphasift-0.3.1/tests/test_source_history.py +138 -0
- alphasift-0.3.1/tests/test_store_evaluate.py +809 -0
- alphasift-0.3.1/tests/test_strategy.py +500 -0
- alphasift-0.3.1/tests/test_strategy_cards.py +132 -0
- alphasift-0.3.1/tests/test_strategy_templates.py +53 -0
- alphasift-0.3.1/tests/test_timeutil.py +63 -0
- alphasift-0.3.1/tests/test_track_record.py +582 -0
- alphasift-0.3.1/tests/test_track_record_p2.py +363 -0
- alphasift-0.3.1/tests/test_tushare.py +47 -0
- alphasift-0.3.1/tests/test_valuation_kr.py +287 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# === LLM 配置 ===
|
|
2
|
+
# 通过 OpenAI 兼容的 Chat Completions 接口调用模型。
|
|
3
|
+
# 主模型优先级为 LITELLM_MODEL > LLM_MODEL > AGENT_LITELLM_MODEL > 首个渠道模型 > 供应商默认模型。
|
|
4
|
+
|
|
5
|
+
# 极简方式:填一个供应商 key 即可
|
|
6
|
+
# GEMINI_API_KEY=
|
|
7
|
+
# GEMINI_API_KEYS=key1,key2
|
|
8
|
+
# DEEPSEEK_API_KEY=
|
|
9
|
+
# OPENAI_API_KEY=
|
|
10
|
+
# OPENAI_BASE_URL=
|
|
11
|
+
# OLLAMA_API_BASE=http://localhost:11434
|
|
12
|
+
# OLLAMA_MODEL=qwen3:8b
|
|
13
|
+
|
|
14
|
+
# 以下模型变量名仅为兼容旧配置而保留。
|
|
15
|
+
# LITELLM_MODEL=gemini/gemini-3.8-flash
|
|
16
|
+
# LITELLM_FALLBACK_MODELS=gemini/gemini-4-hydrogen
|
|
17
|
+
|
|
18
|
+
# 兼容旧变量
|
|
19
|
+
# LLM_API_KEY=your_api_key
|
|
20
|
+
# LLM_MODEL=gemini/gemini-3.8-flash
|
|
21
|
+
# LLM_BASE_URL=
|
|
22
|
+
|
|
23
|
+
# 多渠道模式
|
|
24
|
+
# LLM_CHANNELS=primary
|
|
25
|
+
# LLM_PRIMARY_PROTOCOL=openai
|
|
26
|
+
# LLM_PRIMARY_BASE_URL=https://api.deepseek.com/v1
|
|
27
|
+
# LLM_PRIMARY_API_KEYS=sk-xxx,sk-yyy
|
|
28
|
+
# LLM_PRIMARY_MODELS=deepseek-chat,deepseek-reasoner
|
|
29
|
+
|
|
30
|
+
# 从 Router YAML 迁移时,请删除 LITELLM_CONFIG 并改用上面的 LLM_CHANNELS 配置。
|
|
31
|
+
|
|
32
|
+
# === 可选 ===
|
|
33
|
+
# LLM_CONTEXT=
|
|
34
|
+
# LLM_TEMPERATURE=0.2
|
|
35
|
+
# LLM_JSON_MODE=true
|
|
36
|
+
# LLM_SILENT=true
|
|
37
|
+
# LLM_RANK_WEIGHT=0.40
|
|
38
|
+
# LLM_CANDIDATE_MULTIPLIER=6
|
|
39
|
+
# LLM_MAX_CANDIDATES=30
|
|
40
|
+
# LLM_MAX_RETRIES=1
|
|
41
|
+
# LLM_MIN_COVERAGE=0.60
|
|
42
|
+
# LLM_CONTEXT_MAX_CHARS=4000
|
|
43
|
+
# LLM_TIMEOUT_SEC=60
|
|
44
|
+
# 单次 LLM 输出 token 严格硬上限(绝不自动扩容);深度推理模型如在 8192 下仍截断,可显式调大至如 16384
|
|
45
|
+
# LLM_MAX_TOKENS=8192
|
|
46
|
+
# LLM_CANDIDATE_CONTEXT_ENABLED=false
|
|
47
|
+
# LLM_CANDIDATE_CONTEXT_MAX_CANDIDATES=8
|
|
48
|
+
# LLM_CANDIDATE_CONTEXT_PROVIDERS=news,fund_flow,announcement
|
|
49
|
+
# LLM_CANDIDATE_CONTEXT_NEWS_LIMIT=3
|
|
50
|
+
# LLM_CANDIDATE_CONTEXT_ANNOUNCEMENT_LIMIT=3
|
|
51
|
+
# LLM_CANDIDATE_CONTEXT_CACHE_ENABLED=true
|
|
52
|
+
# LLM_CANDIDATE_CONTEXT_CACHE_TTL_HOURS=24
|
|
53
|
+
# 未显式设置 SNAPSHOT_SOURCE_PRIORITY 时:无 Tushare token 默认 em_datacenter,sina,efinance,akshare_em;
|
|
54
|
+
# 有 token 默认 tushare,em_datacenter,sina,efinance,akshare_em。Tushare 数据为最近交易日日线与 daily_basic,不是实时盘口
|
|
55
|
+
# SNAPSHOT_SOURCE_PRIORITY=em_datacenter,sina,efinance,akshare_em
|
|
56
|
+
# ALPHASIFT_FALLBACK_SNAPSHOT_PATH=./data/snapshot.last_good.json
|
|
57
|
+
# TUSHARE_TOKEN=
|
|
58
|
+
# TUSHARE_API_URL=http://api.waditu.com
|
|
59
|
+
# 可选:固定 Tushare 交易日,格式 YYYYMMDD,便于复现实验
|
|
60
|
+
# TUSHARE_TRADE_DATE=
|
|
61
|
+
|
|
62
|
+
# 稳定行业/概念锚点:优先使用本地映射文件;可选 akshare 板块反查默认关闭
|
|
63
|
+
# INDUSTRY_MAP_FILES=./data/industry_map.csv
|
|
64
|
+
# INDUSTRY_PROVIDER=none
|
|
65
|
+
# INDUSTRY_PROVIDER_MAX_BOARDS=80
|
|
66
|
+
# INDUSTRY_PROVIDER_CACHE_DIR=./data/industry_provider_cache
|
|
67
|
+
# INDUSTRY_PROVIDER_CACHE_TTL_HOURS=24
|
|
68
|
+
|
|
69
|
+
# L3 后置分析器,默认启用本地 scorecard;设为 none 可关闭
|
|
70
|
+
# 可选:scorecard,dsa,external_http
|
|
71
|
+
# POST_ANALYZERS=scorecard
|
|
72
|
+
# POST_ANALYSIS_MAX_PICKS=3
|
|
73
|
+
# POST_ANALYZER_URL=http://localhost:9000/rank
|
|
74
|
+
# POST_ANALYZER_TIMEOUT_SEC=120
|
|
75
|
+
|
|
76
|
+
# DSA 是可选 L3 分析器之一,不是默认依赖
|
|
77
|
+
# DSA_API_URL=http://localhost:8000
|
|
78
|
+
# DSA_REPORT_TYPE=detailed
|
|
79
|
+
# DSA_MAX_PICKS=3
|
|
80
|
+
# DSA_TIMEOUT_SEC=120
|
|
81
|
+
# DSA_FORCE_REFRESH=false
|
|
82
|
+
# DSA_NOTIFY=false
|
|
83
|
+
|
|
84
|
+
# 日 K 增强默认关闭;策略必需日 K 字段时会自动启用候选级增强
|
|
85
|
+
# DAILY_ENRICH_ENABLED=false
|
|
86
|
+
# DAILY_ENRICH_MAX_CANDIDATES=100
|
|
87
|
+
# DAILY_LOOKBACK_DAYS=120
|
|
88
|
+
# DAILY_SOURCE=akshare
|
|
89
|
+
# 可选:tushare 使用 Tushare Pro 前复权日线;auto 在有 TUSHARE_TOKEN 时优先用 tushare
|
|
90
|
+
# TUSHARE_DAILY_ADJ=qfq
|
|
91
|
+
# DAILY_FETCH_RETRIES=2
|
|
92
|
+
# DAILY_FETCH_MAX_WORKERS=1
|
|
93
|
+
# DAILY_HISTORY_CACHE_DIR=./data/daily_history
|
|
94
|
+
# DAILY_HISTORY_CACHE_TTL_HOURS=24
|
|
95
|
+
|
|
96
|
+
# 独立风险层
|
|
97
|
+
# RISK_ENABLED=true
|
|
98
|
+
# RISK_MAX_PENALTY=12
|
|
99
|
+
# RISK_VETO_HIGH=false
|
|
100
|
+
|
|
101
|
+
# LLM 行业/主题风险桶驱动的组合分散层
|
|
102
|
+
# PORTFOLIO_DIVERSITY_ENABLED=true
|
|
103
|
+
# PORTFOLIO_MAX_SAME_LLM_SECTOR=1
|
|
104
|
+
# PORTFOLIO_CONCENTRATION_PENALTY=4
|
|
105
|
+
|
|
106
|
+
# T+N 评估收益扣除的往返成本,单位 bps
|
|
107
|
+
# EVALUATION_COST_BPS=0
|
|
108
|
+
# 形态后验验证阈值:用于 evaluate/evaluate-batch 标记突破延续或失败
|
|
109
|
+
# EVALUATION_FOLLOW_THROUGH_PCT=3
|
|
110
|
+
# EVALUATION_FAILED_BREAKOUT_PCT=-3
|
|
111
|
+
# 可选:评估时抓取日 K 路径,计算最大回撤和最大浮盈;会增加外部请求
|
|
112
|
+
# EVALUATION_PRICE_PATH_ENABLED=false
|
|
113
|
+
# EVALUATION_PRICE_PATH_LOOKBACK_DAYS=90
|
|
114
|
+
|
|
115
|
+
# ALPHASIFT_DATA_DIR=./data
|
|
116
|
+
# STRATEGIES_DIR=./strategies
|
|
117
|
+
|
|
118
|
+
# === 通知推送、离线日线包与看板 ===
|
|
119
|
+
# 最简方式:一行 NOTIFY_URLS 自动识别全部 12 种通道(逗号/换行分隔,未配置则静默跳过)
|
|
120
|
+
# 支持:企微/飞书/钉钉 Webhook、pushplus://TOKEN、sct://SENDKEY、bark://KEY、
|
|
121
|
+
# mailto://user:pass@qq.com?to=a@b.com、tgram://BOT/CHAT、discord/slack Webhook、ntfy://TOPIC
|
|
122
|
+
# NOTIFY_URLS=
|
|
123
|
+
#
|
|
124
|
+
# 也支持分渠道独立环境变量(与 NOTIFY_URLS 可同时使用,自动去重):
|
|
125
|
+
# WECOM_WEBHOOK_URL=
|
|
126
|
+
# FEISHU_WEBHOOK_URL=
|
|
127
|
+
# FEISHU_WEBHOOK_SECRET=
|
|
128
|
+
# DINGTALK_WEBHOOK_URL=
|
|
129
|
+
# DINGTALK_WEBHOOK_SECRET=
|
|
130
|
+
# PUSHPLUS_TOKEN=
|
|
131
|
+
# PUSHPLUS_TOPIC=
|
|
132
|
+
# SERVERCHAN_SENDKEY=
|
|
133
|
+
# BARK_URL=
|
|
134
|
+
# EMAIL_SENDER=
|
|
135
|
+
# EMAIL_PASSWORD=
|
|
136
|
+
# EMAIL_RECEIVERS=
|
|
137
|
+
# EMAIL_SMTP_HOST=
|
|
138
|
+
# EMAIL_SMTP_PORT=
|
|
139
|
+
# TELEGRAM_BOT_TOKEN=
|
|
140
|
+
# TELEGRAM_CHAT_ID=
|
|
141
|
+
# DISCORD_WEBHOOK_URL=
|
|
142
|
+
# SLACK_WEBHOOK_URL=
|
|
143
|
+
# NTFY_URL=
|
|
144
|
+
# CUSTOM_WEBHOOK_URL=
|
|
145
|
+
# CUSTOM_WEBHOOK_TOKEN=
|
|
146
|
+
# ALPHASIFT_CANDIDATE_CONTEXT_CACHE_DIR=./data/candidate_context
|
|
147
|
+
# ALPHASIFT_NOTIFY_STATE_PATH=./data/notify_state.json
|
|
148
|
+
# ALPHASIFT_NOTIFY_TIMEOUT_SEC=10
|
|
149
|
+
# ALPHASIFT_DASHBOARD_URL=https://alphasift.zhulinsen.tech/
|
|
150
|
+
# ALPHASIFT_PACK_DIR=./data/pack/cn
|
|
151
|
+
# TICKPLUS_API_KEY=
|
alphasift-0.3.1/LICENSE
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and
|
|
10
|
+
distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
|
13
|
+
owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities
|
|
16
|
+
that control, are controlled by, or are under common control with that entity.
|
|
17
|
+
For the purposes of this definition, "control" means (i) the power, direct or
|
|
18
|
+
indirect, to cause the direction or management of such entity, whether by
|
|
19
|
+
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
20
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
21
|
+
|
|
22
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
23
|
+
permissions granted by this License.
|
|
24
|
+
|
|
25
|
+
"Source" form shall mean the preferred form for making modifications, including
|
|
26
|
+
but not limited to software source code, documentation source, and
|
|
27
|
+
configuration files.
|
|
28
|
+
|
|
29
|
+
"Object" form shall mean any form resulting from mechanical transformation or
|
|
30
|
+
translation of a Source form, including but not limited to compiled object
|
|
31
|
+
code, generated documentation, and conversions to other media types.
|
|
32
|
+
|
|
33
|
+
"Work" shall mean the work of authorship, whether in Source or Object form,
|
|
34
|
+
made available under the License, as indicated by a copyright notice that is
|
|
35
|
+
included in or attached to the work (an example is provided in the Appendix
|
|
36
|
+
below).
|
|
37
|
+
|
|
38
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
|
39
|
+
is based on (or derived from) the Work and for which the editorial revisions,
|
|
40
|
+
annotations, elaborations, or other modifications represent, as a whole, an
|
|
41
|
+
original work of authorship. For the purposes of this License, Derivative Works
|
|
42
|
+
shall not include works that remain separable from, or merely link (or bind by
|
|
43
|
+
name) to the interfaces of, the Work and Derivative Works thereof.
|
|
44
|
+
|
|
45
|
+
"Contribution" shall mean any work of authorship, including the original
|
|
46
|
+
version of the Work and any modifications or additions to that Work or
|
|
47
|
+
Derivative Works thereof, that is intentionally submitted to Licensor for
|
|
48
|
+
inclusion in the Work by the copyright owner or by an individual or Legal
|
|
49
|
+
Entity authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal, or
|
|
51
|
+
written communication sent to the Licensor or its representatives, including
|
|
52
|
+
but not limited to communication on electronic mailing lists, source code
|
|
53
|
+
control systems, and issue tracking systems that are managed by, or on behalf
|
|
54
|
+
of, the Licensor for the purpose of discussing and improving the Work, but
|
|
55
|
+
excluding communication that is conspicuously marked or otherwise designated in
|
|
56
|
+
writing by the copyright owner as "Not a Contribution."
|
|
57
|
+
|
|
58
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
|
59
|
+
of whom a Contribution has been received by Licensor and subsequently
|
|
60
|
+
incorporated within the Work.
|
|
61
|
+
|
|
62
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this
|
|
63
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
64
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
65
|
+
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
|
66
|
+
sublicense, and distribute the Work and such Derivative Works in Source or
|
|
67
|
+
Object form.
|
|
68
|
+
|
|
69
|
+
3. Grant of Patent License. Subject to the terms and conditions of this
|
|
70
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
71
|
+
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
|
|
72
|
+
section) patent license to make, have made, use, offer to sell, sell, import,
|
|
73
|
+
and otherwise transfer the Work, where such license applies only to those
|
|
74
|
+
patent claims licensable by such Contributor that are necessarily infringed by
|
|
75
|
+
their Contribution(s) alone or by combination of their Contribution(s) with the
|
|
76
|
+
Work to which such Contribution(s) was submitted. If You institute patent
|
|
77
|
+
litigation against any entity (including a cross-claim or counterclaim in a
|
|
78
|
+
lawsuit) alleging that the Work or a Contribution incorporated within the Work
|
|
79
|
+
constitutes direct or contributory patent infringement, then any patent
|
|
80
|
+
licenses granted to You under this License for that Work shall terminate as of
|
|
81
|
+
the date such litigation is filed.
|
|
82
|
+
|
|
83
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or
|
|
84
|
+
Derivative Works thereof in any medium, with or without modifications, and in
|
|
85
|
+
Source or Object form, provided that You meet the following conditions:
|
|
86
|
+
|
|
87
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy
|
|
88
|
+
of this License; and
|
|
89
|
+
|
|
90
|
+
(b) You must cause any modified files to carry prominent notices stating that
|
|
91
|
+
You changed the files; and
|
|
92
|
+
|
|
93
|
+
(c) You must retain, in the Source form of any Derivative Works that You
|
|
94
|
+
distribute, all copyright, patent, trademark, and attribution notices from the
|
|
95
|
+
Source form of the Work, excluding those notices that do not pertain to any
|
|
96
|
+
part of the Derivative Works; and
|
|
97
|
+
|
|
98
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then
|
|
99
|
+
any Derivative Works that You distribute must include a readable copy of the
|
|
100
|
+
attribution notices contained within such NOTICE file, excluding those notices
|
|
101
|
+
that do not pertain to any part of the Derivative Works, in at least one of
|
|
102
|
+
the following places: within a NOTICE text file distributed as part of the
|
|
103
|
+
Derivative Works; within the Source form or documentation, if provided along
|
|
104
|
+
with the Derivative Works; or, within a display generated by the Derivative
|
|
105
|
+
Works, if and wherever such third-party notices normally appear. The contents
|
|
106
|
+
of the NOTICE file are for informational purposes only and do not modify the
|
|
107
|
+
License. You may add Your own attribution notices within Derivative Works that
|
|
108
|
+
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
|
109
|
+
provided that such additional attribution notices cannot be construed as
|
|
110
|
+
modifying the License.
|
|
111
|
+
|
|
112
|
+
You may add Your own copyright statement to Your modifications and may provide
|
|
113
|
+
additional or different license terms and conditions for use, reproduction, or
|
|
114
|
+
distribution of Your modifications, or for any such Derivative Works as a
|
|
115
|
+
whole, provided Your use, reproduction, and distribution of the Work otherwise
|
|
116
|
+
complies with the conditions stated in this License.
|
|
117
|
+
|
|
118
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
|
119
|
+
Contribution intentionally submitted for inclusion in the Work by You to the
|
|
120
|
+
Licensor shall be under the terms and conditions of this License, without any
|
|
121
|
+
additional terms or conditions. Notwithstanding the above, nothing herein shall
|
|
122
|
+
supersede or modify the terms of any separate license agreement you may have
|
|
123
|
+
executed with Licensor regarding such Contributions.
|
|
124
|
+
|
|
125
|
+
6. Trademarks. This License does not grant permission to use the trade names,
|
|
126
|
+
trademarks, service marks, or product names of the Licensor, except as
|
|
127
|
+
required for reasonable and customary use in describing the origin of the Work
|
|
128
|
+
and reproducing the content of the NOTICE file.
|
|
129
|
+
|
|
130
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
|
|
131
|
+
writing, Licensor provides the Work (and each Contributor provides its
|
|
132
|
+
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
133
|
+
KIND, either express or implied, including, without limitation, any warranties
|
|
134
|
+
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
135
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
136
|
+
appropriateness of using or redistributing the Work and assume any risks
|
|
137
|
+
associated with Your exercise of permissions under this License.
|
|
138
|
+
|
|
139
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in
|
|
140
|
+
tort (including negligence), contract, or otherwise, unless required by
|
|
141
|
+
applicable law (such as deliberate and grossly negligent acts) or agreed to in
|
|
142
|
+
writing, shall any Contributor be liable to You for damages, including any
|
|
143
|
+
direct, indirect, special, incidental, or consequential damages of any
|
|
144
|
+
character arising as a result of this License or out of the use or inability to
|
|
145
|
+
use the Work (including but not limited to damages for loss of goodwill, work
|
|
146
|
+
stoppage, computer failure or malfunction, or any and all other commercial
|
|
147
|
+
damages or losses), even if such Contributor has been advised of the
|
|
148
|
+
possibility of such damages.
|
|
149
|
+
|
|
150
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or
|
|
151
|
+
Derivative Works thereof, You may choose to offer, and charge a fee for,
|
|
152
|
+
acceptance of support, warranty, indemnity, or other liability obligations
|
|
153
|
+
and/or rights consistent with this License. However, in accepting such
|
|
154
|
+
obligations, You may act only on Your own behalf and on Your sole
|
|
155
|
+
responsibility, not on behalf of any other Contributor, and only if You agree
|
|
156
|
+
to indemnify, defend, and hold each Contributor harmless for any liability
|
|
157
|
+
incurred by, or claims asserted against, such Contributor by reason of your
|
|
158
|
+
accepting any such warranty or additional liability.
|
|
159
|
+
|
|
160
|
+
END OF TERMS AND CONDITIONS
|
|
161
|
+
|
|
162
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
163
|
+
|
|
164
|
+
To apply the Apache License to your work, attach the following boilerplate
|
|
165
|
+
notice, with the fields enclosed by brackets "[]" replaced with your own
|
|
166
|
+
identifying information. (Don't include the brackets!) The text should be
|
|
167
|
+
enclosed in the appropriate comment syntax for the file format. We also
|
|
168
|
+
recommend that a file or class name and description of purpose be included on
|
|
169
|
+
the same "printed page" as the copyright notice for easier identification
|
|
170
|
+
within third-party archives.
|
|
171
|
+
|
|
172
|
+
Copyright [yyyy] [name of copyright owner]
|
|
173
|
+
|
|
174
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
175
|
+
you may not use this file except in compliance with the License.
|
|
176
|
+
You may obtain a copy of the License at
|
|
177
|
+
|
|
178
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
179
|
+
|
|
180
|
+
Unless required by applicable law or agreed to in writing, software
|
|
181
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
182
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
183
|
+
See the License for the specific language governing permissions and
|
|
184
|
+
limitations under the License.
|
alphasift-0.3.1/PKG-INFO
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: alphasift
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Full-market stock discovery for AI agents: YAML strategies, optional LLM ranking, sector-diversified picks and T+N evaluation across CN, US, HK, JP, KR, TW and IN
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://alphasift.zhulinsen.tech/
|
|
7
|
+
Project-URL: Repository, https://github.com/ZhuLinsen/alphasift
|
|
8
|
+
Project-URL: Documentation, https://github.com/ZhuLinsen/alphasift/tree/main/docs
|
|
9
|
+
Project-URL: Issues, https://github.com/ZhuLinsen/alphasift/issues
|
|
10
|
+
Keywords: stock-screener,a-shares,a-stock,china-equities,multi-market,track-record,mcp,quant,quantitative-trading,quantitative-finance,algorithmic-trading,ai-agent,agent-skill,openclaw,claude-code,llm,akshare,yfinance,backtesting
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: pandas>=2.0
|
|
23
|
+
Requires-Dist: pyyaml>=6.0
|
|
24
|
+
Requires-Dist: efinance>=0.4
|
|
25
|
+
Requires-Dist: akshare>=1.10
|
|
26
|
+
Requires-Dist: baostock>=0.8.9
|
|
27
|
+
Requires-Dist: tushare>=1.4
|
|
28
|
+
Requires-Dist: yfinance>=1.0
|
|
29
|
+
Requires-Dist: requests>=2.28
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest; extra == "dev"
|
|
32
|
+
Requires-Dist: ruff; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
<div align="center">
|
|
36
|
+
|
|
37
|
+
<a href="https://alphasift.zhulinsen.tech/?lang=zh">
|
|
38
|
+
<img src="docs/assets/alphasift-logo.svg" alt="AlphaSift Logo" width="480">
|
|
39
|
+
</a>
|
|
40
|
+
|
|
41
|
+
简体中文 | [English](README.en.md) | [日本語](README.ja.md)
|
|
42
|
+
|
|
43
|
+
# 🔎 AlphaSift
|
|
44
|
+
|
|
45
|
+
**AI 量化选股引擎**
|
|
46
|
+
|
|
47
|
+
*A股 / 美股 / 港股 / 日韩台印全市场多因子筛选 → AI 情报复核与排雷 → 公开 T+N 纸面跟踪验证*
|
|
48
|
+
|
|
49
|
+
[](https://github.com/ZhuLinsen/alphasift/stargazers)
|
|
50
|
+
[](https://alphasift.zhulinsen.tech/?lang=zh)
|
|
51
|
+
[](docs/ecosystem.md)
|
|
52
|
+
[](https://www.python.org/downloads/)
|
|
53
|
+
[](LICENSE)
|
|
54
|
+
|
|
55
|
+
[**在线看板**](https://alphasift.zhulinsen.tech/?lang=zh) · [**核心亮点**](#-为什么用-alphasift) · [**30 秒上手**](#-30-秒极速上手) · [**硬核实证**](#-硬核实证与系统架构) · [**量化铁三角**](#-quant-trio-开源量化铁三角) · [**Agent Skill**](SKILL.md)
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
> [!TIP]
|
|
60
|
+
> 🚀 **与 [daily_stock_analysis(73.6k★)](https://github.com/ZhuLinsen/daily_stock_analysis) 同源配套**:**AlphaSift** 负责每天盘后从全市场 `5,000+` 标的中初筛高共识候选并公开跟踪 `T+N` 胜率;**DSA** 负责单股深度研报与操作决策;[**AlphaEvo**](https://github.com/ZhuLinsen/alphaevo) 负责进化式因子挖掘与验伪。
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 🖥️ 无需安装,在线直看今日选股与公开纸面战绩
|
|
65
|
+
|
|
66
|
+
👉 **[点击打开公开在线看板(alphasift.zhulinsen.tech)](https://alphasift.zhulinsen.tech/?lang=zh)** — 每交易日盘后自动更新 7 大市场多策略共识精选、`T+5 / T+10 / T+20` 收益榜,以及可选 **AI 复核 vs 纯规则** 同日对照赛道。
|
|
67
|
+
|
|
68
|
+
<p align="center">
|
|
69
|
+
<a href="https://alphasift.zhulinsen.tech/?lang=zh">
|
|
70
|
+
<img src="docs/assets/dashboard-preview.gif" alt="AlphaSift 在线看板交互演示(深/浅主题与多语言实时切换)" width="840">
|
|
71
|
+
</a>
|
|
72
|
+
<br><sub>点击动图直达在线看板 · 支持 Dark / Light 主题及 <code>中 | EN | 日</code> 一键切换</sub>
|
|
73
|
+
</p>
|
|
74
|
+
|
|
75
|
+
<details>
|
|
76
|
+
<summary><strong>查看更多静态高清截图与可打印独立盘后研报(<code>alphasift daily-report --output-html</code>)</strong></summary>
|
|
77
|
+
|
|
78
|
+
<table>
|
|
79
|
+
<tr>
|
|
80
|
+
<td width="50%" align="center">
|
|
81
|
+
<a href="https://alphasift.zhulinsen.tech/?lang=zh&theme=dark">
|
|
82
|
+
<img src="docs/assets/dashboard-zh.png" alt="AlphaSift 在线看板(暗色 · 中文)" width="100%">
|
|
83
|
+
</a>
|
|
84
|
+
<br><sub><b>Obsidian Dark 终端</b> — 跨策略共识精选、A 股宽度与 7 市场领跑榜</sub>
|
|
85
|
+
</td>
|
|
86
|
+
<td width="50%" align="center">
|
|
87
|
+
<a href="https://alphasift.zhulinsen.tech/?lang=en&theme=light">
|
|
88
|
+
<img src="docs/assets/dashboard-light.png" alt="AlphaSift 在线看板(亮色 · 多语言)" width="100%">
|
|
89
|
+
</a>
|
|
90
|
+
<br><sub><b>Editorial Paper Light</b> — 中/英/日实时切换与审计账本</sub>
|
|
91
|
+
</td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td colspan="2" align="center">
|
|
95
|
+
<a href="docs/usage.md">
|
|
96
|
+
<img src="docs/assets/daily-report.png" alt="AlphaSift 独立可打印盘后投研日报" width="88%">
|
|
97
|
+
</a>
|
|
98
|
+
<br><sub><b>可打印独立盘后研报</b>(<code>alphasift daily-report --output-html</code>)— 盘后综述、7 档涨跌分布、公告排雷与 20 日迷你 K 线</sub>
|
|
99
|
+
</td>
|
|
100
|
+
</tr>
|
|
101
|
+
</table>
|
|
102
|
+
|
|
103
|
+
</details>
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## ✨ 为什么用 AlphaSift
|
|
108
|
+
|
|
109
|
+
多数 AI 选股工具只能“针对几只自选股聊天分析”,或拿美化后的历史片段截图讲故事,既难跨全市场扫雷,也没人敢公开事后账本。**AlphaSift 把全市场筛选、情报排雷与事后验真做成了一个公开透明的闭环:**
|
|
110
|
+
|
|
111
|
+
1. **全市场自动挑股(零 API Key 也能跑)**:覆盖 A股、美股、港股、日本、韩国、台湾、印度 7 大市场,内置 12 套公开可读的 YAML 量化策略与行业分散约束,每天几十秒跑完 `5,000+` 标的。
|
|
112
|
+
2. **不吹票、代码级硬排雷、每天公开验真**:接入大模型时(默认 `gemini/gemini-3.8-flash` + `gemini/gemini-4-hydrogen` 自动兜底),先注入实时公告、新闻与资金流上下文,遇未消除重大利空在 Python 代码层面硬封顶 **`<= 35` 分**;所有入选标的记录至公开 [`track-record`](https://github.com/ZhuLinsen/alphasift/tree/track-record) 账本,按 `next_open` 扣除一字涨停核算 `T+5 / T+10 / T+20` 超额收益,同日实测 AI 到底有没有跑赢纯规则。
|
|
113
|
+
3. **零成本定时运行 + 一句话接 AI 助手**:支持免费 GitHub Actions 每天盘后跑并推送到飞书/企微/Telegram/Discord/邮件等 12 个渠道(Fork 后默认只推送不发布重复网页);内置零依赖 STDIO **MCP Server**(`alphasift mcp`)和本机 **Web 工作台**(`alphasift serve` → `/ui`)。
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## ⚡ 30 秒极速上手
|
|
118
|
+
|
|
119
|
+
### 1. 接入 Claude Code / OpenClaw / Cursor / Codex(原生 MCP)
|
|
120
|
+
|
|
121
|
+
安装 AlphaSift 后,在客户端 MCP 配置加入 5 行 JSON 即可让 AI 助手直接调用 `10` 个只读量化工具(默认不触发外发推送):
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"mcpServers": {
|
|
126
|
+
"alphasift": { "command": "alphasift", "args": ["mcp"] }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
> *上方为 Claude Code / Cursor JSON 写法;Codex(`mcp_servers` TOML)与 OpenClaw(`mcp.servers`)写法见 [docs/ecosystem.md](docs/ecosystem.md)。*
|
|
132
|
+
|
|
133
|
+
**接好后直接用自然语言提问:**
|
|
134
|
+
- *“用 AlphaSift 跑一遍今天低估且没有公告利空的 A 股 `dual_low` 策略,给出前 5 只及入选理由”*
|
|
135
|
+
- *“对比 `dual_low` 和 `quality_value` 的筛选条件与权重偏向,我更适合震荡市还是趋势市?”*
|
|
136
|
+
- *“用 `global_value` 扫描港股和日股无 LLM 初筛结果,按行业分组列出来”*
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### 2. 本机命令行、交互式 Web 工作台 & Docker
|
|
141
|
+
|
|
142
|
+
可直接从 [`v0.3.1` Release](https://github.com/ZhuLinsen/alphasift/releases/tag/v0.3.1) 安装独立 wheel 包,或源码可编辑安装:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# 方式 A:直接安装 v0.3.1 Release Wheel
|
|
146
|
+
pip install https://github.com/ZhuLinsen/alphasift/releases/download/v0.3.1/alphasift-0.3.1-py3-none-any.whl
|
|
147
|
+
|
|
148
|
+
# 方式 B:源码克隆安装
|
|
149
|
+
git clone https://github.com/ZhuLinsen/alphasift.git && cd alphasift
|
|
150
|
+
pip install -e .
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**无 API Key 立即出结果:**
|
|
154
|
+
```bash
|
|
155
|
+
alphasift quickstart # 30 秒端到端演示
|
|
156
|
+
alphasift screen dual_low --no-llm # 跑 A 股双低纯规则筛选
|
|
157
|
+
alphasift screen global_value --market hk --no-llm # 扫描港股低估值
|
|
158
|
+
alphasift serve --host 127.0.0.1 --port 8765 # 打开本机交互式 Web 工作台 (/ui)
|
|
159
|
+
# 或用 Docker Compose 在同一回环端口启动:
|
|
160
|
+
docker compose up --build -d
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**可选开启 AI 情报复核、250 日回放与可打印研报:**
|
|
164
|
+
```bash
|
|
165
|
+
cp .env.example .env # 填入 GEMINI_API_KEY / DEEPSEEK_API_KEY / OPENAI_API_KEY
|
|
166
|
+
alphasift pack build --days 250 # 首次构建本地 A 股日线包
|
|
167
|
+
alphasift screen dual_low --save-run
|
|
168
|
+
alphasift evaluate-strategies --window 5,10,20 --explain
|
|
169
|
+
alphasift daily-report --pack-dir ./data/pack/cn --output-html daily_report.html --push
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### 3. 免费云端每日自动选股与推送(Fork 防撞车)
|
|
175
|
+
|
|
176
|
+
1. **Fork 本仓库**并启用 **GitHub Actions**。
|
|
177
|
+
2. 在 *Settings → Secrets and variables → Actions → Secrets* 按需添加可选密钥:
|
|
178
|
+
- `GEMINI_API_KEY`(或 `DEEPSEEK_API_KEY` / `OPENAI_API_KEY`):开启每日 AI 对照赛道与盘后综述;不填则静默跑纯规则赛道。
|
|
179
|
+
- `NOTIFY_URLS`:一行接入 12 种原生推送通道(无配置自动跳过)。
|
|
180
|
+
3. **Plan A Fork 安全护栏**:他人 Fork 后默认**只跑每日筛选与推送,跳过重复官网构建**,避免一 Fork 就挂出一份一模一样的站点;如确实要在 Fork 发布独立网页,在 *Variables* 设置 `ALPHASIFT_ENABLE_PAGES=true` 并开启 *Settings → Pages → GitHub Actions*。详细步骤见 [部署与镜像指南](docs/deployment.md)。
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 📊 硬核实证与系统架构
|
|
185
|
+
|
|
186
|
+
| 维度 | 传统条件选股(东财 / TradingView) | 单股 AI 研报(`daily_stock_analysis`) | **AlphaSift** |
|
|
187
|
+
|---|---|---|---|
|
|
188
|
+
| **覆盖范围** | 单市场人工点选指标 | 聚焦已给定的自选股池 | **7 大市场全量初筛(A股 / 美 / 港 / 日 / 韩 / 台 / 印)** |
|
|
189
|
+
| **规则与分散度** | 封闭黑盒或人工拼指标 | 偏重个股长文叙事 | **透明 YAML DSL + 8 行业桶硬上限正交分散** |
|
|
190
|
+
| **AI 幻觉约束** | 无 | 偏叙事分析 | **公告/资讯/资金流上下文 + 重大利空 `<= 35` 硬封顶** |
|
|
191
|
+
| **事后真实性** | 无持续记录 | 需人工回看 | **公开 `track-record` 账本(`next_open` 扣除一字涨停)** |
|
|
192
|
+
|
|
193
|
+
- **策略正交分散实证**:A 股 10 套策略经 8 行业桶硬上限重构后(`hard_cap` / `max_same_bucket: 1`),250 日 3 时点回测策略两两平均重合度由 **8.0%–24.9% 降至 0.9%–1.8%**(最大单对 `100% → 20%`),银行单板块占比由 **22%–31.1% 降至 4.0%–9.1%**。
|
|
194
|
+
- **250 日实证形态雷达(`next_open` vs 沪深 300 与 All-A 等权)**:在 `2026-02-05 .. 2026-11-06`(180 交易日、5,218 只 A 股、`next_open` 排除开盘一字涨停,共内置 **9 套**无状态形态)回放中,形态须同时满足 `T+5 样本 >= 200`、扣除 `25bp` 往返成本后相对沪深 300 与同日全 A 等权均值均为正、Bartlett Newey-West HAC 检验 `t >= 2.0`、BH-FDR 多重检验校正 `q <= 0.05` 且前/后半样本(`H1/H2 >= 15d & >= 30`)同向为正,方可晋级 `active`。当前 **`红三兵回踩确认`**、**`红三兵`** 与其余 7 套经典形态均暂列 **`experimental` 观察期**,并在日报与看板中披露净超额与检验指标;负期望观察形态在推送卡片中自动折叠对照。
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
+-------------------------------------------------------------------+
|
|
198
|
+
| 7 市场实时快照链路 + 私有离线日线包 DailyPack (actions/cache) |
|
|
199
|
+
+---------------------------------+---------------------------------+
|
|
200
|
+
|
|
|
201
|
+
v
|
|
202
|
+
+-------------------------------------------------------------------+
|
|
203
|
+
| L1 确定性底座:YAML 硬筛选规则 + 多因子打分曲线 |
|
|
204
|
+
+---------------------------------+---------------------------------+
|
|
205
|
+
|
|
|
206
|
+
v
|
|
207
|
+
+-------------------------------------------------------------------+
|
|
208
|
+
| L2 情报红线 AI 复核 + 候选上下文注入(重大负面 <= 35 分封顶) |
|
|
209
|
+
+---------------------------------+---------------------------------+
|
|
210
|
+
|
|
|
211
|
+
v
|
|
212
|
+
+-------------------------------------------------------------------+
|
|
213
|
+
| 风险过滤覆盖层 + 8 行业桶硬上限分散(max_same_bucket: 1) |
|
|
214
|
+
+----------------+--------------------------------+-----------------+
|
|
215
|
+
| |
|
|
216
|
+
v v
|
|
217
|
+
+---------------------------------+ +------------------------------+
|
|
218
|
+
| L3 后置分析 (scorecard / DSA) | | track-record 公开可审计账本 |
|
|
219
|
+
| 独立 HTML 研报 & 12 通道推送 | | next_open T+5/10/20 验收 |
|
|
220
|
+
+---------------------------------+ +------------------------------+
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
<details>
|
|
226
|
+
<summary><strong>内置 12 套 YAML 策略清单(点击展开参数与覆盖范围)</strong></summary>
|
|
227
|
+
|
|
228
|
+
| 策略名 | 适用市场 | 类型 | 核心思路 |
|
|
229
|
+
|---|---|---|---|
|
|
230
|
+
| `dual_low` | `cn` | 价值 | 中小盘双低(`50–600 亿` 市值,低 PE + 低 PB),行业桶硬上限 `1` |
|
|
231
|
+
| `blue_chip_income` | `cn` | 红利 | 超大盘高流动性高股息蓝筹(`≥ 500 亿` 市值) |
|
|
232
|
+
| `quality_value` | `cn` | GARP 成长 | 中盘稳健估值 + MA20 趋势确认(`80–1200 亿` 市值) |
|
|
233
|
+
| `low_volatility_quality` | `cn` | 质量防御 | 基于日 K 20 日波动率、最大回撤与 ATR 的低波防线 |
|
|
234
|
+
| `balanced_alpha` | `cn` | 均衡框架 | 跨因子综合发现,强制行业正交分散 |
|
|
235
|
+
| `momentum_quality` | `cn` | 趋势质量 | 60 日中期趋势确认 + 基本面质量硬过滤 |
|
|
236
|
+
| `shrink_pullback` | `cn` | 回踩趋势 | 上升趋势中缩量回踩支撑位(需日 K) |
|
|
237
|
+
| `capital_heat` | `cn` | 资金动量 | 换手与量比活跃但剔除短期过热追高 |
|
|
238
|
+
| `oversold_reversal` | `cn` | 超跌修复 | 短期超跌 + 回撤受控的均值回复候选 |
|
|
239
|
+
| `volume_breakout` | `cn` | 放量突破 | 成交量显著放大并突破关键压力区间 |
|
|
240
|
+
| `global_value` | `us, hk, jp, kr, tw, in` | 多市场价值 | 去除币种绝对阈值的 `dual_low` 跨市场版本 |
|
|
241
|
+
| `us_momentum_quality` | `us` | 美股趋势 | 美股大盘动量 + 质量精选(`>= $2B`) |
|
|
242
|
+
|
|
243
|
+
</details>
|
|
244
|
+
|
|
245
|
+
<details>
|
|
246
|
+
<summary><strong>一行 <code>NOTIFY_URLS</code> 12 种原生推送通道 & Atom RSS 订阅</strong></summary>
|
|
247
|
+
|
|
248
|
+
无需额外推送依赖,用一个逗号/换行分隔的 `NOTIFY_URLS` 变量即可同时触发多个渠道(完全兼容传统独立环境变量,报错与日志自动脱敏 Token,共享 `(trade_date, channel)` 文件双锁防重复推送):
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
NOTIFY_URLS="pushplus://TOKEN,sct://SENDKEY,bark://api.day.app/KEY,mailto://sender@qq.com:auth@qq.com?to=a@qq.com,https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=..."
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
| 通道 | 一行 `NOTIFY_URLS` 写法 | 独立环境变量(兼容) |
|
|
255
|
+
|---|---|---|
|
|
256
|
+
| **PushPlus** | `pushplus://TOKEN[/TOPIC]` | `PUSHPLUS_TOKEN`, `PUSHPLUS_TOPIC` |
|
|
257
|
+
| **Server酱 / Server酱3** | `sct://SENDKEY`(兼容 `SCT...` 与 `sctp123t...`) | `SERVERCHAN_SENDKEY` |
|
|
258
|
+
| **Bark** | `bark://KEY` 或 `bark://host/KEY` | `BARK_URL` |
|
|
259
|
+
| **Email 邮件** | `mailto://user:pass@host[:port]?to=a,b` | `EMAIL_SENDER`, `EMAIL_PASSWORD`, `EMAIL_RECEIVERS` |
|
|
260
|
+
| **企业微信** | `wecom://KEY` 或完整 Webhook URL | `WECOM_WEBHOOK_URL` |
|
|
261
|
+
| **飞书** | `feishu://TOKEN[#secret=SEC]` 或完整 URL | `FEISHU_WEBHOOK_URL`, `FEISHU_WEBHOOK_SECRET` |
|
|
262
|
+
| **钉钉** | `dingtalk://TOKEN[#secret=SEC]` 或完整 URL | `DINGTALK_WEBHOOK_URL`, `DINGTALK_WEBHOOK_SECRET` |
|
|
263
|
+
| **Telegram** | `tgram://BOT_TOKEN/CHAT_ID` | `TELEGRAM_BOT_TOKEN`, `TELEGRAM_CHAT_ID` |
|
|
264
|
+
| **Discord** | `discord://ID/TOKEN` 或完整 URL | `DISCORD_WEBHOOK_URL` |
|
|
265
|
+
| **Slack** | `slack://T.../B.../...` 或 Webhook URL | `SLACK_WEBHOOK_URL` |
|
|
266
|
+
| **ntfy** | `ntfy://topic` 或 `https://ntfy.sh/topic` | `NTFY_URL` |
|
|
267
|
+
| **自定义 Webhook / Apprise** | `custom://https://...` 或任意 Apprise Scheme | `CUSTOM_WEBHOOK_URL`, `CUSTOM_WEBHOOK_TOKEN` |
|
|
268
|
+
|
|
269
|
+
公开看板页脚同时输出 Atom 1.0 RSS:[`site/feed.xml`](https://alphasift.zhulinsen.tech/site/feed.xml)。本地可通过 `alphasift notify status` 与 `alphasift notify test --dry-run` 检查配置。
|
|
270
|
+
|
|
271
|
+
</details>
|
|
272
|
+
|
|
273
|
+
<details>
|
|
274
|
+
<summary><strong>7 市场数据源链路、独立示例输出与关键环境变量</strong></summary>
|
|
275
|
+
|
|
276
|
+
| 市场 ID | 数据源链路 | 说明 |
|
|
277
|
+
|---|---|---|
|
|
278
|
+
| `cn` | `em_datacenter → sina → efinance → akshare_em`(配置 `TUSHARE_TOKEN` 时优先 `tushare`) | A 股全市场 + 东财行业补全 + 公告排雷 + 私有离线包 |
|
|
279
|
+
| `us, hk, jp, tw, in` | Yahoo Finance 筛选器 + `yfinance` | 海外服务器直连可用,仅依赖单一非官方接口 |
|
|
280
|
+
| `kr` | Yahoo Finance + Naver Finance | 从 Naver 补充韩股 PE/PB(`ALPHASIFT_KR_VALUATION=0` 可关闭) |
|
|
281
|
+
|
|
282
|
+
- **2026-11-20 `--no-llm` 离线样本示例**:A 股 `dual_low`(5,215 → 205 → 5 行业 Top 5:`601997` 贵阳银行、`601117` 中国化学、`600741` 华域汽车、`603799` 华友钴业、`601233` 桐昆股份);港股 `global_value --market hk`(`0267.HK`、`0001.HK`、`1339.HK`、`1398.HK`、`0358.HK`);日股 `global_value --market jp`(`9501.T`、`5401.T`、`1605.T`、`9104.T`、`9022.T`)。
|
|
283
|
+
- **核心环境变量**:`LITELLM_MODEL`(默认 `gemini/gemini-3.8-flash`)、`LITELLM_FALLBACK_MODELS`(`gemini/gemini-4-hydrogen`)、`GEMINI_API_KEY` / `DEEPSEEK_API_KEY` / `OPENAI_API_KEY`、`LLM_CANDIDATE_CONTEXT_ENABLED=true`(CI Actions 默认开启;本地默认关闭)、`NOTIFY_URLS`、`ALPHASIFT_ENABLE_PAGES=true`(Fork 启用网页开关)、`DSA_API_URL`。详情见 [docs/configuration.md](docs/configuration.md)。
|
|
284
|
+
- **口径说明**:AlphaSift 为研究初筛与后验审计引擎,不构成投资建议或自动交易系统;公开账本在 `ALPHASIFT_NEXT_OPEN_SWITCH_DATE`(`2026-11-21`)前采用 `close` 入场口径,切换日起采用 `next_open` 并严格计量开盘一字涨停不可成交比例。
|
|
285
|
+
|
|
286
|
+
</details>
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## 🔗 Quant Trio — 开源量化铁三角
|
|
291
|
+
|
|
292
|
+
| 项目 | 在链路中的定位 | 协同方式 |
|
|
293
|
+
|---|---|---|
|
|
294
|
+
| **[AlphaEvo](https://github.com/ZhuLinsen/alphaevo)** | 研究与因子挖掘 | 进化式发现与样本外检验 α 因子后,沉淀为 AlphaSift YAML 策略规则 |
|
|
295
|
+
| **[AlphaSift](https://github.com/ZhuLinsen/alphasift)** | **全市场筛选与公开验真** | 盘后从 7 市场 `5,000+` 标的精选高共识候选并公开跟踪 `T+5 / 10 / 20` |
|
|
296
|
+
| **[daily_stock_analysis](https://github.com/ZhuLinsen/daily_stock_analysis)** | L3 个股深度精研 | 通过 `DSA_API_URL` 或 `alphasift mcp` 接收初筛名单,输出深度基本面与操作计划 |
|
|
297
|
+
|
|
298
|
+
更多架构说明、MCP Schema 与 Docker 教程见 [docs/ecosystem.md](docs/ecosystem.md)。
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## 免责声明、文档索引与开源协议
|
|
303
|
+
|
|
304
|
+
> 本项目仅用于量化研究、开源工程验证与个人学习,不构成任何投资建议、收益承诺或买卖指令。行情源、大模型输出与形态统计均可能存在延迟或偏差。
|
|
305
|
+
|
|
306
|
+
[使用指南](docs/usage.md) · [配置参考](docs/configuration.md) · [情绪实证研究](docs/pattern-regime-research.md) · [生态与 MCP](docs/ecosystem.md) · [部署与镜像](docs/deployment.md) · [策略指南](docs/strategy-guide.md) · [评分体系](docs/scoring.md) · [输出契约](docs/result-schema.md) · [参考资料](docs/reference.md) · [参与贡献](CONTRIBUTING.md) · [安全策略](SECURITY.md) · [更新记录](docs/CHANGELOG.md) · [SKILL.md](SKILL.md)
|
|
307
|
+
|
|
308
|
+
基于 [Apache License 2.0](LICENSE) 开源。
|
|
309
|
+
|
|
310
|
+
## 友情链接
|
|
311
|
+
|
|
312
|
+
感谢 [LINUX DO](https://linux.do/) 社区的支持。
|