diff --git a/__pycache__/strategy_lifecycle.cpython-312.pyc b/__pycache__/strategy_lifecycle.cpython-312.pyc index c786b297..aa454765 100644 Binary files a/__pycache__/strategy_lifecycle.cpython-312.pyc and b/__pycache__/strategy_lifecycle.cpython-312.pyc differ diff --git a/_cron_report.py b/_cron_report.py new file mode 100644 index 00000000..bfbc3bec --- /dev/null +++ b/_cron_report.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +import sys; sys.path.insert(0, '/home/hmo/MoFin') +from mo_data import * + +pf = read_portfolio() +ta = pf.get('total_assets',0) +ca = pf.get('cash',0) +pp = pf.get('position_pct',0) +print(f'TA:{ta:.0f} CASH:{ca:.0f} POS:{pp:.1f}%') + +for h in pf.get('holdings', []): + c = h.get('currency','CNY') + p = h.get('price') + pos = h.get('position_pct') + if pos is None: + pos = 0 + if p is None: + print(f' {h["code"]} {h["name"]} 价? 仓{pos:.1f}%') + continue + tag = ' HKD' if c == 'HKD' else '' + print(f' {h["code"]} {h["name"]} 价{p:.2f}{tag} 仓{pos:.1f}%') + +wl = read_watchlist() +if wl and 'stocks' in wl: + for s in wl['stocks']: + nm = s.get('name','') + p = s.get('price') + if p is None: + print(f' WATCH {s["code"]} {nm} 价?') + else: + print(f' WATCH {s["code"]} {nm} 价{p:.2f}') + +# sector data +import json, sqlite3, os +db = os.path.join('/home/hmo/MoFin', 'data', 'mofin.db') +conn = sqlite3.connect(db) +c = conn.cursor() +try: + c.execute("SELECT id, market_trend, data FROM sector_snapshots ORDER BY id DESC LIMIT 1") + row = c.fetchone() + if row: + print(f' TREND:{row[1]}') + d = json.loads(row[2]) if isinstance(row[2], str) else row[2] + if d: + for k,v in list(d.items())[:5]: + print(f' {k}: {v}') +except Exception as e: + print(f' DB err:{e}') +conn.close() + +# decisions +dec = read_decisions() +if isinstance(dec, dict): + ds = dec.get('decisions',[]) + print(f' DECISIONS:{len(ds)}') + for d in ds[:5]: + print(f' {d}') diff --git a/data/analyst-knowledge-log.md b/data/analyst-knowledge-log.md index 71e6a8f6..39103cc1 100644 --- a/data/analyst-knowledge-log.md +++ b/data/analyst-knowledge-log.md @@ -68,3 +68,23 @@ 1. **传闻 vs 真实事件的应对区别:** 7月1日是传闻(韩国芯片利润传闻,辟谣后快速修复),7月2日是真实事件(Meta确认出租算力+韩国熔断)。传闻日可预期修复,真实事件需3-5日观察趋势确认。两者触发相同的「不动止损」规则,但后续跟踪周期不同。 2. **韩国熔断的历史信号意义:** 韩国KOSPI触发熔断是极罕见事件(上一次在2020年3月新冠初期),熔断本身不代表长期趋势转折——2020年熔断后KOSPI在半年内涨超80%。熔断是流动性冲击的信号,不是基本面崩塌。 3. **科创板-4.33%开盘但上证仅-1.42%的结构性分化验证了三维分析框架的价值:** 不看单一指数结论。科创50暴跌但上证不崩、黄金上涨、宁德时代翻红——说明是科技板块轮动式下跌而非全面系统性风险。仅看科创50会误判为系统性。 + +## 2026-07-07 标准化操作建议流程(Dad强制要求) + +**触发:** 腾讯盘中触止盈位,我直接给出「出半仓」建议。Dad 追问后才意识到港股每手100股不能拆半手,且系统策略信号是"持有"而不是卖出。 + +**根因:** 出操作建议前跳过了两个关键步骤: +1. 没有调 reassess_strategy() 获取系统策略判断(系统策略是持有,不是卖出) +2. 没有检查最小交易单位(港股每手=100股,100股=1手不能拆半) + +**修改内容:** +1. 新建 `/home/hmo/.hermes/profiles/position-analyst/scripts/prepare_recommendation.py` + — 标准化前置流程脚本,调 reassess_strategy() + 检查交易约束 + 输出结构化 JSON + - 调用方式:`python3 prepare_recommendation.py {code} {price}` + - 输出:strategy(信号/止损/止盈) + trade_constraints(市场/最小手/可拆半手) + pnl(成本/盈亏%) +2. 更新盘前中监控 cron (62a2ba59f7ff) prompt — 加入三步标准化流程 +3. 更新午后监控 cron (23adf24922b3) prompt — 加入三步标准化流程 + +**强制规则(以后所有推荐都走):** +三步流程:触发系统策略重评 → 检查交易约束 → 基于策略结果出推荐 +禁止凭行情直接下结论。 diff --git a/data/candidate_pool.json b/data/candidate_pool.json index ce875d13..34eb22ef 100644 --- a/data/candidate_pool.json +++ b/data/candidate_pool.json @@ -1,6 +1,6 @@ { - "last_updated": "2026-07-06 13:59", - "total_candidates": 23, + "last_updated": "2026-07-07 11:09", + "total_candidates": 27, "sectors_analyzed_today": [ "半导体", "金属新材料", @@ -371,8 +371,8 @@ "zhiwei_reviewed_at": null, "promoted": false, "promoted_at": null, - "dropped": false, - "drop_reason": null, + "dropped": true, + "drop_reason": "超7天未更新", "trend_warning": false, "trend_note": "" }, @@ -403,8 +403,8 @@ "zhiwei_reviewed_at": null, "promoted": false, "promoted_at": null, - "dropped": false, - "drop_reason": null, + "dropped": true, + "drop_reason": "超7天未更新", "trend_warning": false, "trend_note": "" }, @@ -435,8 +435,8 @@ "zhiwei_reviewed_at": null, "promoted": false, "promoted_at": null, - "dropped": false, - "drop_reason": null, + "dropped": true, + "drop_reason": "超7天未更新", "trend_warning": false, "trend_note": "" }, @@ -949,17 +949,17 @@ "name": "招商银行", "sector": "银行", "xiaoguo_score": 8.5, - "xiaoguo_reason": "零售业务护城河深,资产质量与ROE居同业前列,股息率稳定在5%以上,机构资金持续回流龙头,估值修复空间明确。", + "xiaoguo_reason": "零售业务护城河深厚,资产质量与ROE行业领先,估值处于历史低位,具备中长期配置价值与短期修复弹性。", "xiaoguo_strategy": { - "entry_range": "32.50-33.50元", - "stop_loss": "31.20元", - "target": "36.00-37.50元" + "entry_range": "34.5-35.5元", + "stop_loss": "33.0元", + "target": "39.0-41.0元" }, - "verified_price": 37.48, - "verified_change": 1.76, + "verified_price": 37.74, + "verified_change": 0.03, "added_at": "2026-07-06 12:17", - "last_updated": "2026-07-06 13:27", - "num_observations": 2, + "last_updated": "2026-07-07 09:18", + "num_observations": 3, "score_history": [ { "date": "2026-07-06 12:17", @@ -968,6 +968,10 @@ { "date": "2026-07-06 13:27", "score": 8.5 + }, + { + "date": "2026-07-07 09:18", + "score": 8.5 } ], "zhiwei_star": null, @@ -985,17 +989,17 @@ "name": "宁波银行", "sector": "银行", "xiaoguo_score": 8.0, - "xiaoguo_reason": "城商行基本面标杆,不良率极低且拨备充足,财富管理与小微业务增长强劲,业绩弹性大,适合成长型配置。", + "xiaoguo_reason": "深耕长三角经济强区,信贷投放精准且不良率极低,业绩确定性强,资金持续流入支撑估值修复。", "xiaoguo_strategy": { - "entry_range": "24.00-25.00元", - "stop_loss": "22.80元", - "target": "28.50-30.00元" + "entry_range": "29.0-30.0元", + "stop_loss": "27.5元", + "target": "33.0-35.0元" }, - "verified_price": 30.53, - "verified_change": 0.79, + "verified_price": 30.71, + "verified_change": 0.0, "added_at": "2026-07-06 12:17", - "last_updated": "2026-07-06 13:27", - "num_observations": 2, + "last_updated": "2026-07-07 09:18", + "num_observations": 3, "score_history": [ { "date": "2026-07-06 12:17", @@ -1004,6 +1008,10 @@ { "date": "2026-07-06 13:27", "score": 8.0 + }, + { + "date": "2026-07-07 09:18", + "score": 8.0 } ], "zhiwei_star": null, @@ -1115,6 +1123,230 @@ "drop_reason": null, "trend_warning": false, "trend_note": "" + }, + { + "code": "600919", + "name": "江苏银行", + "sector": "银行", + "xiaoguo_score": 7.5, + "xiaoguo_reason": "区域信贷需求旺盛,高股息率叠加业绩弹性,近期资金净流入明显,具备防御与进攻双重属性。", + "xiaoguo_strategy": { + "entry_range": "9.2-9.5元", + "stop_loss": "8.8元", + "target": "10.5-11.0元" + }, + "verified_price": 11.4, + "verified_change": 0.0, + "added_at": "2026-07-07 09:18", + "last_updated": "2026-07-07 09:18", + "num_observations": 1, + "score_history": [ + { + "date": "2026-07-07 09:18", + "score": 7.5 + } + ], + "zhiwei_star": null, + "zhiwei_reviewed": false, + "zhiwei_reviewed_at": null, + "promoted": false, + "promoted_at": null, + "dropped": false, + "drop_reason": null, + "trend_warning": false, + "trend_note": "" + }, + { + "code": "601088", + "name": "中国神华", + "sector": "煤炭开采加工", + "xiaoguo_score": 9, + "xiaoguo_reason": "行业龙头,现金流充沛,分红率稳定在70%以上,具备强防御与红利属性;技术面处于上升通道回踩支撑位,资金持续净流入。", + "xiaoguo_strategy": { + "entry_range": "78.00-80.50", + "stop_loss": "75.50", + "target": "88.00" + }, + "verified_price": 42.16, + "verified_change": 0.6, + "added_at": "2026-07-07 09:35", + "last_updated": "2026-07-07 09:35", + "num_observations": 1, + "score_history": [ + { + "date": "2026-07-07 09:35", + "score": 9 + } + ], + "zhiwei_star": null, + "zhiwei_reviewed": false, + "zhiwei_reviewed_at": null, + "promoted": false, + "promoted_at": null, + "dropped": false, + "drop_reason": null, + "trend_warning": false, + "trend_note": "" + }, + { + "code": "601225", + "name": "陕西煤业", + "sector": "煤炭开采加工", + "xiaoguo_score": 8.5, + "xiaoguo_reason": "资源禀赋优异,吨煤成本行业领先,业绩弹性大;近期缩量回踩20日均线,估值处于历史中低位,适合逢低布局。", + "xiaoguo_strategy": { + "entry_range": "22.50-23.80", + "stop_loss": "21.20", + "target": "27.50" + }, + "verified_price": 23.0, + "verified_change": -0.48, + "added_at": "2026-07-07 09:35", + "last_updated": "2026-07-07 09:35", + "num_observations": 1, + "score_history": [ + { + "date": "2026-07-07 09:35", + "score": 8.5 + } + ], + "zhiwei_star": null, + "zhiwei_reviewed": false, + "zhiwei_reviewed_at": null, + "promoted": false, + "promoted_at": null, + "dropped": false, + "drop_reason": null, + "trend_warning": false, + "trend_note": "" + }, + { + "code": "601101", + "name": "昊华能源", + "sector": "煤炭开采加工", + "xiaoguo_score": 7.5, + "xiaoguo_reason": "板块领涨标的,弹性较好,受益于京津冀保供及煤价企稳;技术面突破平台后回踩确认,短线资金活跃度高。", + "xiaoguo_strategy": { + "entry_range": "14.80-15.50", + "stop_loss": "13.90", + "target": "18.20" + }, + "verified_price": 12.82, + "verified_change": 2.23, + "added_at": "2026-07-07 09:35", + "last_updated": "2026-07-07 09:35", + "num_observations": 1, + "score_history": [ + { + "date": "2026-07-07 09:35", + "score": 7.5 + } + ], + "zhiwei_star": null, + "zhiwei_reviewed": false, + "zhiwei_reviewed_at": null, + "promoted": false, + "promoted_at": null, + "dropped": false, + "drop_reason": null, + "trend_warning": false, + "trend_note": "" + }, + { + "code": "002714", + "name": "牧原股份", + "sector": "养殖业", + "xiaoguo_score": 8.5, + "xiaoguo_reason": "行业绝对龙头,养殖成本行业领先,现金流充裕抗风险能力强,猪周期上行阶段盈利弹性最大,机构配置底仓首选。", + "xiaoguo_strategy": { + "entry_range": "38.5-40.0元", + "stop_loss": "36.5元", + "target": "45.0-48.0元" + }, + "verified_price": 38.63, + "verified_change": -0.13, + "added_at": "2026-07-07 09:40", + "last_updated": "2026-07-07 09:40", + "num_observations": 1, + "score_history": [ + { + "date": "2026-07-07 09:40", + "score": 8.5 + } + ], + "zhiwei_star": null, + "zhiwei_reviewed": false, + "zhiwei_reviewed_at": null, + "promoted": false, + "promoted_at": null, + "dropped": false, + "drop_reason": null, + "trend_warning": false, + "trend_note": "" + }, + { + "code": "603477", + "name": "巨星农牧", + "sector": "养殖业", + "xiaoguo_score": 8.0, + "xiaoguo_reason": "成本控制能力突出,产能扩张节奏稳健,资金关注度提升,技术面处于震荡蓄势阶段,具备中线博弈价值。", + "xiaoguo_strategy": { + "entry_range": "32.0-33.5元", + "stop_loss": "30.0元", + "target": "38.0-40.0元" + }, + "verified_price": 17.21, + "verified_change": 2.87, + "added_at": "2026-07-07 09:40", + "last_updated": "2026-07-07 09:40", + "num_observations": 1, + "score_history": [ + { + "date": "2026-07-07 09:40", + "score": 8.0 + } + ], + "zhiwei_star": null, + "zhiwei_reviewed": false, + "zhiwei_reviewed_at": null, + "promoted": false, + "promoted_at": null, + "dropped": false, + "drop_reason": null, + "trend_warning": false, + "trend_note": "" + }, + { + "code": "300498", + "name": "温氏股份", + "sector": "养殖业", + "xiaoguo_score": 7.5, + "xiaoguo_reason": "猪鸡双轮驱动业务结构抗周期波动能力强,盈利修复确定性高,估值处于历史中低位,适合稳健型中线布局。", + "xiaoguo_strategy": { + "entry_range": "22.5-23.8元", + "stop_loss": "21.0元", + "target": "26.0-28.0元" + }, + "verified_price": 13.6, + "verified_change": -0.95, + "added_at": "2026-07-07 09:40", + "last_updated": "2026-07-07 09:40", + "num_observations": 1, + "score_history": [ + { + "date": "2026-07-07 09:40", + "score": 7.5 + } + ], + "zhiwei_star": null, + "zhiwei_reviewed": false, + "zhiwei_reviewed_at": null, + "promoted": false, + "promoted_at": null, + "dropped": false, + "drop_reason": null, + "trend_warning": false, + "trend_note": "" } ] } \ No newline at end of file diff --git a/data/decisions.json b/data/decisions.json index cf79046a..61c7a8ff 100644 --- a/data/decisions.json +++ b/data/decisions.json @@ -27,7 +27,7 @@ "created_at": "2026-07-03 11:16:41", "updated_at": "2026-07-06 11:07:37", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:41", "note": null, "quality_check": null, "quality_checked_at": null, @@ -35,7 +35,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "自选策略", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -70,7 +70,7 @@ "created_at": "2026-07-03 11:16:48", "updated_at": "2026-07-03 11:16:48", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:48", "note": null, "quality_check": null, "quality_checked_at": null, @@ -78,7 +78,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -113,7 +113,7 @@ "created_at": "2026-07-03 11:16:48", "updated_at": "2026-07-06 11:01:50", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:48", "note": null, "quality_check": null, "quality_checked_at": null, @@ -121,7 +121,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "自选策略", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -156,7 +156,7 @@ "created_at": "2026-07-03 11:16:48", "updated_at": "2026-07-03 11:16:48", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:48", "note": null, "quality_check": null, "quality_checked_at": null, @@ -164,7 +164,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -199,7 +199,7 @@ "created_at": "2026-07-03 11:16:48", "updated_at": "2026-07-03 11:16:48", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:48", "note": null, "quality_check": null, "quality_checked_at": null, @@ -207,7 +207,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -223,7 +223,7 @@ "cost": 13.47, "shares": 11000, "stop_loss": 6.33, - "take_profit": 0, + "take_profit": 0.0, "entry_low": 6.06, "entry_high": 7.07, "currency": "HKD", @@ -242,7 +242,7 @@ "created_at": "2026-07-03 11:16:48", "updated_at": "2026-07-03 11:16:48", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:48", "note": null, "quality_check": null, "quality_checked_at": null, @@ -250,83 +250,13 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, "signal_factors": [], "timestamp": "2026-07-03 11:16:48", - "type": "holding", - "last_reassessed_price": 6.73, - "strategy_tree": { - "branches": [ - { - "id": "01478_stop_loss", - "condition": { - "price": "<6.33" - }, - "action": { - "type": "sell", - "amount": "all", - "reason": "止损" - }, - "priority": 0, - "rationale": "止损保护本金", - "trigger_count": 0, - "success_rate": null, - "last_triggered": null - }, - { - "id": "01478_buy_dip", - "condition": { - "scenario": "weak_consolidation", - "price": "<=7.07", - "price_lower": ">=6.06" - }, - "action": { - "type": "buy", - "amount": "normal", - "limit": 6.06, - "reason": "回调支撑买入" - }, - "priority": 1, - "rationale": "价格回调到支撑区,弱势市场低吸", - "trigger_count": 0, - "success_rate": null, - "last_triggered": null - }, - { - "id": "01478_trim", - "condition": { - "scenario": "sharp_decline", - "loss_pct": "<-15%" - }, - "action": { - "type": "sell", - "amount": "half", - "reason": "急跌降风险" - }, - "priority": 3, - "rationale": "急跌市场,深套股减半仓减少敞口", - "trigger_count": 0, - "success_rate": null, - "last_triggered": null - }, - { - "id": "01478_hold", - "condition": {}, - "action": { - "type": "hold", - "reason": "无明确信号,继续持有" - }, - "priority": 99, - "rationale": "没有分支匹配时的默认动作", - "trigger_count": 0, - "success_rate": null, - "last_triggered": null - } - ] - } + "type": "holding" }, { "code": "01888", @@ -355,7 +285,7 @@ "created_at": "2026-07-03 11:16:49", "updated_at": "2026-07-06 11:07:37", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:49", "note": null, "quality_check": null, "quality_checked_at": null, @@ -363,7 +293,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "自选策略", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -398,7 +328,7 @@ "created_at": "2026-07-03 11:16:49", "updated_at": "2026-07-03 11:16:49", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:49", "note": null, "quality_check": null, "quality_checked_at": null, @@ -406,7 +336,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -441,7 +371,7 @@ "created_at": "2026-07-03 11:16:49", "updated_at": "2026-07-06 11:01:50", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:49", "note": null, "quality_check": null, "quality_checked_at": null, @@ -449,7 +379,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "自选策略", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -461,19 +391,19 @@ "code": "300035", "name": "中科电气", "version": 1, - "price": 14.31, + "price": 13.98, "cost": 22.29, "shares": 1400, "stop_loss": 13.53, "take_profit": 15.45, - "entry_low": 12.88, - "entry_high": 15.03, + "entry_low": 12.58, + "entry_high": 14.68, "currency": "CNY", "strategy_type": "holding", - "action": "深套持有 | 深套持有 | 止损13.53 | 目标0 | 买入区12.88~15.03 | 信号:持有", + "action": "深套持有 | 深套持有 | 止损13.53 | 目标0 | 买入区12.58~14.68 | 信号:持有", "timing_signal": "持有", "rr_ratio": 0.0, - "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=21.7 MA10=21.88 MA20=22.15 MA60=21.44", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=22.11 MA10=22.11 MA20=22.1 MA60=21.44", "stock_category": "深套", "sector_context": "行业能源金属大涨+3.0%,可适度积极", "status": "active", @@ -484,7 +414,7 @@ "created_at": "2026-07-03 11:16:50", "updated_at": "2026-07-03 11:16:50", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:50", "note": null, "quality_check": null, "quality_checked_at": null, @@ -492,7 +422,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -504,7 +434,7 @@ "code": "300308", "name": "中际旭创", "version": 1, - "price": 1168.95, + "price": 1114.27, "cost": 1316.53, "shares": 100, "stop_loss": 1090.4, @@ -512,11 +442,11 @@ "entry_low": 1052.06, "entry_high": 1227.4, "currency": "CNY", - "strategy_type": "holding", + "strategy_type": "持仓策略", "action": "持有观察 | ⚠️盈亏比极低,关注 | 止损1090.4 | 目标0 | 买入区1052.06~1227.4 | 信号:持有", "timing_signal": "持有", "rr_ratio": 0.0, - "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=1222.01 MA10=1280.59 MA20=1239.5 MA60=1033.3", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=1139.01 MA10=1207.45 MA20=1225.2 MA60=1056.92", "stock_category": "中短线", "sector_context": "中际旭创所属行业(待补充)", "status": "active", @@ -527,7 +457,7 @@ "created_at": "2026-07-03 11:16:55", "updated_at": "2026-07-03 11:16:55", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:55", "note": null, "quality_check": null, "quality_checked_at": null, @@ -535,13 +465,13 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "持仓策略", "trigger": {}, "changelog": [], "quality_issues": {}, "signal_factors": [], "timestamp": "2026-07-03 11:16:55", - "type": "holding" + "type": "持仓策略" }, { "code": "300548", @@ -570,7 +500,7 @@ "created_at": "2026-07-03 11:16:56", "updated_at": "2026-07-06 11:01:50", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:56", "note": null, "quality_check": null, "quality_checked_at": null, @@ -578,7 +508,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "自选策略", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -613,7 +543,7 @@ "created_at": "2026-07-03 11:16:56", "updated_at": "2026-07-03 11:16:56", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:16:56", "note": null, "quality_check": null, "quality_checked_at": null, @@ -621,7 +551,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -633,19 +563,19 @@ "code": "518880", "name": "黄金ETF华安", "version": 1, - "price": 8.688, + "price": 8.61, "cost": 12.19, "shares": 2400, "stop_loss": 8.21, "take_profit": 9.38, "entry_low": 7.82, - "entry_high": 9.12, + "entry_high": 9.04, "currency": "CNY", "strategy_type": "holding", - "action": "深套持有 | 深套持有 | 止损8.21 | 目标0 | 买入区7.82~9.12 | 信号:持有", + "action": "深套持有 | 深套持有 | 止损8.21 | 目标0 | 买入区7.75~9.04 | 信号:持有", "timing_signal": "持有", "rr_ratio": 0.0, - "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=9.45 MA10=9.58 MA20=10.01 MA60=10.34", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=9.54 MA10=9.69 MA20=10.22 MA60=10.35", "stock_category": "深套", "sector_context": "行业贵金属大涨+723.0%,可适度积极", "status": "active", @@ -656,7 +586,7 @@ "created_at": "2026-07-03 11:17:01", "updated_at": "2026-07-03 11:17:01", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:17:01", "note": null, "quality_check": null, "quality_checked_at": null, @@ -664,7 +594,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -699,7 +629,7 @@ "created_at": "2026-07-03 11:17:08", "updated_at": "2026-07-03 11:17:08", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:17:08", "note": null, "quality_check": null, "quality_checked_at": null, @@ -707,7 +637,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -719,19 +649,19 @@ "code": "601899", "name": "紫金矿业", "version": 1, - "price": 28.04, + "price": 27.76, "cost": 39.89, "shares": 2400, "stop_loss": 25.26, - "take_profit": 30.28, - "entry_low": 25.24, - "entry_high": 29.44, + "take_profit": 29.98, + "entry_low": 24.98, + "entry_high": 29.15, "currency": "CNY", "strategy_type": "holding", - "action": "深套持有 | 深套持有 | 止损25.26 | 目标0 | 买入区25.24~29.44 | 信号:持有", + "action": "深套持有 | 深套持有 | 止损25.26 | 目标0 | 买入区24.98~29.15 | 信号:持有", "timing_signal": "持有", "rr_ratio": 0.0, - "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=35.14 MA10=36.13 MA20=37.18 MA60=36.52", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=36.27 MA10=36.92 MA20=37.96 MA60=36.47", "stock_category": "深套", "sector_context": "工业金属", "status": "active", @@ -742,7 +672,7 @@ "created_at": "2026-07-03 11:17:14", "updated_at": "2026-07-03 11:17:14", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:17:14", "note": null, "quality_check": null, "quality_checked_at": null, @@ -750,31 +680,135 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, "signal_factors": [], "timestamp": "2026-07-03 11:17:14", - "type": "holding" + "type": "holding", + "last_reassessed_price": 27.76, + "strategy_tree": { + "branches": [ + { + "id": "601899_stop_loss", + "condition": { + "price": "<25.26" + }, + "action": { + "type": "sell", + "amount": "all", + "reason": "止损" + }, + "priority": 0, + "rationale": "止损保护本金", + "trigger_count": 0, + "success_rate": null, + "last_triggered": null + }, + { + "id": "601899_buy_dip", + "condition": { + "scenario": "weak_consolidation", + "price": "<=29.15", + "price_lower": ">=24.98" + }, + "action": { + "type": "buy", + "amount": "normal", + "limit": 24.98, + "reason": "回调支撑买入" + }, + "priority": 1, + "rationale": "价格回调到支撑区,弱势市场低吸", + "trigger_count": 0, + "success_rate": null, + "last_triggered": null + }, + { + "id": "601899_breakout_chase", + "condition": { + "scenario": "bullish_recovery", + "price": ">=29.98" + }, + "action": { + "type": "buy", + "amount": "normal", + "limit": "market", + "reason": "突破确认追涨" + }, + "priority": 2, + "rationale": "价格突破阻力,确认上升趋势后买入", + "trigger_count": 0, + "success_rate": null, + "last_triggered": null + }, + { + "id": "601899_trim", + "condition": { + "scenario": "sharp_decline", + "loss_pct": "<-15%" + }, + "action": { + "type": "sell", + "amount": "half", + "reason": "急跌降风险" + }, + "priority": 3, + "rationale": "急跌市场,深套股减半仓减少敞口", + "trigger_count": 0, + "success_rate": null, + "last_triggered": null + }, + { + "id": "601899_take_profit", + "condition": { + "price": ">=29.98" + }, + "action": { + "type": "sell", + "amount": "half", + "reason": "止盈锁利" + }, + "priority": 4, + "rationale": "达到目标价,减半仓锁定利润", + "trigger_count": 0, + "success_rate": null, + "last_triggered": null + }, + { + "id": "601899_hold", + "condition": {}, + "action": { + "type": "hold", + "reason": "无明确信号,继续持有" + }, + "priority": 99, + "rationale": "没有分支匹配时的默认动作", + "trigger_count": 0, + "success_rate": null, + "last_triggered": null + } + ] + } }, { "code": "688411", "name": "海博思创", "version": 1, - "price": 257.02, + "price": 265.26, "cost": 266.95, "shares": 200, - "stop_loss": 220.57, + "stop_loss": 233.43, "take_profit": 277.58, - "entry_low": 231.32, - "entry_high": 269.87, + "entry_low": 238.73, + "entry_high": 278.52, "currency": "CNY", "strategy_type": "holding", - "action": "持有观察 | ⚠️盈亏比极低,关注 | 止损220.57 | 目标0 | 买入区231.32~269.87 | 信号:持有", + "action": "持有观察 | ⚠️盈亏比极低,关注 | 止损233.43 | 目标0 | 买入区238.73~278.52 | 信号:持有", "timing_signal": "持有", "rr_ratio": 0.0, - "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=270.94 MA10=273.7 MA20=265.98 MA60=254.7", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=260.16 MA10=267.89 MA20=265.99 MA60=256.91", "stock_category": "中短线", "sector_context": "行业光伏设备大跌-103.0%,收紧止损", "status": "active", @@ -785,7 +819,7 @@ "created_at": "2026-07-03 11:17:22", "updated_at": "2026-07-03 11:17:22", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:17:22", "note": null, "quality_check": null, "quality_checked_at": null, @@ -793,7 +827,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -805,19 +839,19 @@ "code": "688639", "name": "华恒生物", "version": 1, - "price": 16.62, + "price": 16.61, "cost": 21.51, "shares": 2800, - "stop_loss": 13.78, + "stop_loss": 14.12, "take_profit": 17.95, "entry_low": 14.96, - "entry_high": 17.45, + "entry_high": 17.44, "currency": "CNY", "strategy_type": "holding", - "action": "深套持有 | 深套持有 | 止损13.78 | 目标0 | 买入区14.96~17.45 | 信号:持有", + "action": "深套持有 | 深套持有 | 止损14.12 | 目标0 | 买入区14.95~17.44 | 信号:持有", "timing_signal": "持有", "rr_ratio": 0.0, - "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=33.68 MA10=35.7 MA20=36.69 MA60=34.28", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=35.03 MA10=36.72 MA20=37.12 MA60=34.13", "stock_category": "深套", "sector_context": "行业化学制品大跌-145.0%,收紧止损", "status": "active", @@ -828,7 +862,7 @@ "created_at": "2026-07-03 11:17:30", "updated_at": "2026-07-03 11:17:30", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:17:30", "note": null, "quality_check": null, "quality_checked_at": null, @@ -836,7 +870,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -848,19 +882,19 @@ "code": "688981", "name": "中芯国际", "version": 1, - "price": 145.3, + "price": 147.96, "cost": 126.07, "shares": 300, "stop_loss": 140.94, "take_profit": 156.92, - "entry_low": 130.77, - "entry_high": 152.57, + "entry_low": 133.16, + "entry_high": 155.36, "currency": "CNY", "strategy_type": "holding", - "action": "盈利良好 | ⚠️盈亏比极低,关注 | 止损140.94 | 目标0 | 买入区130.77~152.57 | 信号:持有", + "action": "盈利良好 | ⚠️盈亏比极低,关注 | 止损140.94 | 目标0 | 买入区133.16~155.36 | 信号:持有", "timing_signal": "持有", "rr_ratio": 0.0, - "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=151.43 MA10=149.35 MA20=138.9 MA60=125.49", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None | MA5=146.09 MA10=149.74 MA20=141.28 MA60=127.88", "stock_category": "中短线", "sector_context": "半导体", "status": "active", @@ -871,7 +905,7 @@ "created_at": "2026-07-03 11:17:37", "updated_at": "2026-07-03 11:17:37", "avg_price": null, - "decision_timestamp": null, + "decision_timestamp": "2026-07-03 11:17:37", "note": null, "quality_check": null, "quality_checked_at": null, @@ -879,7 +913,7 @@ "position_advice": null, "signal_factors_json": null, "time_horizon": null, - "decision_type": null, + "decision_type": "holding", "trigger": {}, "changelog": [], "quality_issues": {}, @@ -889,5 +923,5 @@ } ], "total": 19, - "regenerated_at": "2026-07-06 11:48" + "regenerated_at": "2026-07-07 10:28" } \ No newline at end of file diff --git a/data/price_history.json b/data/price_history.json index d8280393..f231da88 100644 --- a/data/price_history.json +++ b/data/price_history.json @@ -32,7 +32,13 @@ "date": "2026-07-06", "high": 1215.0, "low": 1180.0, - "close": 1203.23 + "close": 1206.91 + }, + { + "date": "2026-07-07", + "high": 1215.0, + "low": 1180.0, + "close": 1206.91 } ], "02202": [ @@ -75,6 +81,12 @@ "high": 49.96, "low": 48.81, "close": 49.38 + }, + { + "date": "2026-07-07", + "high": 50.2, + "low": 48.81, + "close": 50.1 } ], "02359": [ @@ -137,6 +149,12 @@ "high": 499.0, "low": 448.0, "close": 476.72 + }, + { + "date": "2026-07-07", + "high": 499.0, + "low": 448.0, + "close": 466.16 } ], "06160": [ @@ -179,6 +197,12 @@ "high": 649.88, "low": 615.0, "close": 649.01 + }, + { + "date": "2026-07-07", + "high": 649.88, + "low": 615.0, + "close": 635.51 } ], "09868": [ @@ -227,6 +251,12 @@ "high": 745.0, "low": 690.11, "close": 743.0 + }, + { + "date": "2026-07-07", + "high": 745.0, + "low": 690.11, + "close": 731.0 } ], "300124": [ @@ -245,8 +275,14 @@ { "date": "2026-07-06", "high": 71.94, - "low": 68.6, - "close": 69.55 + "low": 68.2, + "close": 68.33 + }, + { + "date": "2026-07-07", + "high": 71.94, + "low": 68.2, + "close": 68.33 } ], "000657": [ @@ -266,7 +302,13 @@ "date": "2026-07-06", "high": 90.58, "low": 80.46, - "close": 81.34 + "close": 80.46 + }, + { + "date": "2026-07-07", + "high": 90.58, + "low": 80.46, + "close": 80.46 } ], "000711": [ @@ -286,7 +328,13 @@ "date": "2026-07-06", "high": 5.65, "low": 5.0, - "close": 5.17 + "close": 5.01 + }, + { + "date": "2026-07-07", + "high": 5.65, + "low": 5.0, + "close": 5.01 } ], "001309": [ @@ -304,9 +352,15 @@ }, { "date": "2026-07-06", - "high": 918.98, + "high": 954.19, "low": 860.0, - "close": 916.6 + "close": 935.0 + }, + { + "date": "2026-07-07", + "high": 954.19, + "low": 860.0, + "close": 935.0 } ], "002594": [ @@ -326,7 +380,13 @@ "date": "2026-07-06", "high": 88.95, "low": 86.61, - "close": 87.68 + "close": 87.54 + }, + { + "date": "2026-07-07", + "high": 88.95, + "low": 86.61, + "close": 87.54 } ], "00700": [ @@ -400,7 +460,13 @@ "date": "2026-07-06", "high": 710.0, "low": 659.16, - "close": 695.26 + "close": 681.8 + }, + { + "date": "2026-07-07", + "high": 710.0, + "low": 659.16, + "close": 681.8 } ], "000700": [ @@ -408,7 +474,27 @@ "date": "2026-07-06", "high": 17.18, "low": 16.3, - "close": 16.88 + "close": 16.75 + }, + { + "date": "2026-07-07", + "high": 17.18, + "low": 16.3, + "close": 16.75 + } + ], + "300548": [ + { + "date": "2026-07-06", + "high": 225.0, + "low": 205.0, + "close": 214.13 + }, + { + "date": "2026-07-07", + "high": 225.0, + "low": 205.0, + "close": 214.13 } ] } \ No newline at end of file diff --git a/data/strategy_staleness_report.json b/data/strategy_staleness_report.json index 8688e429..69a9b939 100644 --- a/data/strategy_staleness_report.json +++ b/data/strategy_staleness_report.json @@ -1,214 +1,122 @@ { - "checked_at": "2026-07-03T09:00:47", - "total_active": 55, - "flagged_count": 13, + "checked_at": "2026-07-07T10:22:06", + "total_active": 19, + "flagged_count": 7, "flagged": [ { - "code": "000711", - "name": "ST京蓝", - "price": 5.01, + "code": "000700", + "name": "模塑科技", + "price": 17.22, "flags": [ - "现价5.01在买入区5~5(是否可买需结合timing_signal判断)" + "现价17.22在买入区16~18(是否可买需结合timing_signal判断)" ], - "age_days": 0, - "last_update": "2026-07-02 21:07", - "entry_zone": "5~5", - "current": "盈利持有 | ⚠️盈亏比偏低(1:1.7),谨慎买入 | 目标5.41 | 止损4.72 | 买入区4.91~5.03 | 信号:观望", + "age_days": 3, + "last_update": "2026-07-06 11:07:37", + "entry_zone": "16~18", + "current": "盈利良好 | ⚠️盈亏比极低,关注 | 止损16.7 | 目标0 | 买入区15.5~18.08 | 信号:持有", "updated_by": "auto", "updated_reason": "自动生成", "is_watchlist": true }, { - "code": "001309", - "name": "德明利", - "price": 811.0, + "code": "00700", + "name": "腾讯", + "price": 497.35, "flags": [ - "现价811.00在买入区795~827(是否可买需结合timing_signal判断)" + "价格距买入区中心32% 需关注" ], - "age_days": 0, - "last_update": "2026-07-02 21:07", - "entry_zone": "795~827", - "current": "盈利持有 | 目标896.77 | 止损716.85 | 买入区794.78~827.22", + "age_days": 3, + "last_update": "2026-07-03 11:16:48", + "entry_zone": "371~386", + "current": "盈利持有 | ⚠️盈亏比不足1:1.5,不建议买入 | 损363.06 | 盈0 | 买370.63~385.75", + "updated_by": "auto", + "updated_reason": "自动生成", + "is_watchlist": false + }, + { + "code": "01088", + "name": "中国神华", + "price": 46.14, + "flags": [ + "价格距买入区中心36% 需关注" + ], + "age_days": 3, + "last_update": "2026-07-03 11:16:48", + "entry_zone": "31~36", + "current": "持有观察 | ⚠️盈亏比极低,关注 | 止损33.67 | 目标0 | 买入区31.24~36.45 | 信号:持有", + "updated_by": "auto", + "updated_reason": "自动生成", + "is_watchlist": false + }, + { + "code": "01211", + "name": "比亚迪股份", + "price": 97.0, + "flags": [ + "价格距买入区中心39% 需关注" + ], + "age_days": 3, + "last_update": "2026-07-03 11:16:48", + "entry_zone": "64~75", + "current": "深套持有 | 深套持有 | 止损64.29 | 目标0 | 买入区64.22~74.92 | 信号:持有", + "updated_by": "auto", + "updated_reason": "自动生成", + "is_watchlist": false + }, + { + "code": "01888", + "name": "建滔积层板", + "price": 73.3, + "flags": [ + "现价73.30在买入区67~78(是否可买需结合timing_signal判断)" + ], + "age_days": 3, + "last_update": "2026-07-06 11:07:37", + "entry_zone": "67~78", + "current": "持有观察 | ⚠️盈亏比极低,关注 | 止损64.14 | 目标0 | 买入区67.27~78.48 | 信号:持有", "updated_by": "auto", "updated_reason": "自动生成", "is_watchlist": true }, { - "code": "02318", - "name": "中国平安", - "price": 52.3, + "code": "02202", + "name": "万科企业", + "price": 2.7, "flags": [ - "现价52.30在买入区51~53(是否可买需结合timing_signal判断)" + "价格距买入区中心38% 需关注" ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "51~53", - "current": "盈利持有 | 目标56.33 | 止损48.21 | 买入区51.25~52.97", + "age_days": 3, + "last_update": "2026-07-03 11:16:49", + "entry_zone": "2~2", + "current": "深套持有 | 深套持有 | 止损1.9 | 目标0 | 买入区1.81~2.11 | 信号:持有", "updated_by": "auto", "updated_reason": "自动生成", - "is_watchlist": true + "is_watchlist": false }, { - "code": "02359", - "name": "药明康德", - "price": 152.8, + "code": "300548", + "name": "长芯博创", + "price": 228.23, "flags": [ - "现价152.80在买入区150~154(是否可买需结合timing_signal判断)" + "现价228.23在买入区205~240(是否可买需结合timing_signal判断)" ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "150~154", - "current": "盈利持有 | ⚠️盈亏比偏低(1:1.9),谨慎买入 | 目标161.84 | 止损140.74 | 买入区149.74~153.58", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "02388", - "name": "中银香港", - "price": 42.3, - "flags": [ - "[STRATEGY_STALE] 信号不良(timing_signal含['弱势持有'])", - "现价42.30在买入区41~43(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "41~43", - "current": "盈利持有 | 目标45.52 | 止损41.03 | 买入区41.45~42.83 | 信号:弱势持有", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "06160", - "name": "百济神州", - "price": 174.7, - "flags": [ - "现价174.70在买入区171~178(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "171~178", - "current": "盈利持有 | 目标189.56 | 止损167.77 | 买入区171.21~177.5", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "300124", - "name": "汇川技术", - "price": 68.4, - "flags": [ - "现价68.40在买入区67~69(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "67~69", - "current": "盈利持有 | 目标73.65 | 止损63.06 | 买入区67.03~69.27 | 信号:观望", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "301308", - "name": "江波龙", - "price": 599.22, - "flags": [ - "现价599.22在买入区587~611(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "587~611", - "current": "盈利持有 | ⚠️盈亏比不足1:1.5,不建议买入 | 目标参考0 | 止损575.25 | 买入区587.24~611.2", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "600519", - "name": "贵州茅台", - "price": 1203.0, - "flags": [ - "现价1203.00在买入区1179~1212(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "1179~1212", - "current": "盈利持有 | 目标1278.8 | 止损1166.91 | 买入区1178.94~1211.67 | 信号:关注", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "601318", - "name": "中国平安", - "price": 48.92, - "flags": [ - "现价48.92在买入区48~50(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "48~50", - "current": "盈利持有 | 目标53.46 | 止损47.45 | 买入区47.94~49.85 | 信号:观望", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "688630", - "name": "芯碁微装", - "price": 468.0, - "flags": [ - "现价468.00在买入区459~477(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "459~477", - "current": "盈利持有 | 目标515.02 | 止损449.42 | 买入区458.64~477.36", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "688795", - "name": "摩尔线程-U", - "price": 641.59, - "flags": [ - "现价641.59在买入区629~654(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "629~654", - "current": "盈利持有 | 目标707.34 | 止损566.83 | 买入区628.76~654.42 | 信号:观望", - "updated_by": "auto", - "updated_reason": "自动生成", - "is_watchlist": true - }, - { - "code": "688802", - "name": "沐曦股份-U", - "price": 724.13, - "flags": [ - "现价724.13在买入区710~739(是否可买需结合timing_signal判断)" - ], - "age_days": 0, - "last_update": "2026-07-02 21:08", - "entry_zone": "710~739", - "current": "盈利持有 | 目标806.04 | 止损639.46 | 买入区709.65~738.61", + "age_days": 3, + "last_update": "2026-07-06 11:01:50", + "entry_zone": "205~240", + "current": "持有观察 | ⚠️盈亏比极低,关注 | 止损221.38 | 目标0 | 买入区205.41~239.64 | 信号:持有", "updated_by": "auto", "updated_reason": "自动生成", "is_watchlist": true } ], "portfolio": { - "position_pct": 91.04, - "cash": 80476.0, - "weak_position_pct": 34.3, - "all_weak_pct": 45.5, + "position_pct": 65.89, + "cash": 321271.0, + "weak_position_pct": 71.4, + "all_weak_pct": 63.2, "signals": [ - "[PORTFOLIO_WEAK_MILD] 组合弱势占比34.3%,需关注", - "[PORTFOLIO_FULL] 总仓位91.04%(现金80476元),买入建议受限" + "[PORTFOLIO_WEAK] 组合中弱势+深套分类持仓占比71.4%>40%,建议系统性减仓" ] }, - "summary": "扫描55个策略,13个需关注" + "summary": "扫描19个策略,7个需关注" } \ No newline at end of file diff --git a/data/watchlist.json b/data/watchlist.json new file mode 100644 index 00000000..1e7d121f --- /dev/null +++ b/data/watchlist.json @@ -0,0 +1,645 @@ +{ + "stocks": [ + { + "code": "02388", + "name": "中银香港", + "price": 48.26, + "analysis": { + "buy_low": 47.12, + "buy_high": 48.48, + "position_recommend": "", + "reason": "回调-0.95%至47.80,止损46安全,继续持有观察", + "updated_at": "2026-06-02T10:46:11.973827", + "tech_levels": { + "strong_support": 44.14, + "weak_support": 47.12, + "weak_resist": 48.48, + "strong_resist": 51.34 + }, + "stop_loss": 42.87, + "take_profit": 53.59, + "entry_low": 41.01, + "entry_high": 46.6, + "action": "盈利持有,止损42.87 目标53.59", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None", + "reassessed_at": "2026-06-12 09:30" + } + }, + { + "code": "01888", + "name": "建滔积层板", + "price": 65.6, + "analysis": { + "stop_loss": 61.42, + "take_profit": 77.23, + "entry_low": 63.99, + "entry_high": 66.61, + "action": "盈利持有 | 损61.42 | 盈77.23 | 买63.99~66.61", + "tech_snapshot": "形态:光头光脚阴线/neutral 量价:数据不足 强撑:57.53 弱撑:61.42 弱压:71.27 强压:77.23", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 3.07, + "action_note": "", + "timing_signal": "neutral" + }, + "strategy_action": "盈利持有", + "stop_loss": 74.32, + "entry_low": 76.01, + "entry_high": 88.67, + "take_profit": 95.0, + "current_signal": "持有" + }, + { + "code": "01088", + "name": "中国神华", + "price": 45.32, + "analysis": { + "stop_loss": 43.75, + "take_profit": 47.67, + "entry_low": 44.2, + "entry_high": 45.32, + "action": "盈利持有 | ⚠️盈亏比偏低(1:1.9),谨慎买入 | 损43.75 | 盈47.67 | 买44.2~45.32 | 信号:接近支撑位,关注", + "tech_snapshot": "形态:长影星线/neutral 量价:数据不足 强撑:42.64 弱撑:44.71 弱压:45.55 强压:47.67", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 1.9, + "action_note": "⚠️盈亏比偏低(1:1.9),谨慎买入", + "timing_signal": "接近支撑位,关注" + }, + "strategy_action": "盈利持有", + "stop_loss": 38.84, + "entry_low": 36.0, + "entry_high": 42.0, + "take_profit": 46.0 + }, + { + "code": "01211", + "name": "比亚迪股份", + "price": 86.55, + "analysis": { + "buy_low": 84.95, + "buy_high": 87.17, + "position_recommend": null, + "reason": "大涨+5.34%", + "updated_at": "2026-06-02T11:01:41.539019", + "tech_levels": { + "strong_support": 79.79, + "weak_support": 84.95, + "weak_resist": 87.17, + "strong_resist": 91.98 + }, + "stop_loss": 76.64, + "take_profit": 95.79, + "entry_low": 73.3, + "entry_high": 83.3, + "action": "盈利持有,止损76.64 目标95.79", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None", + "reassessed_at": "2026-06-12 09:30" + } + }, + { + "code": "002594", + "name": "比亚迪", + "price": 91.6, + "analysis": { + "stop_loss": 88.85, + "take_profit": 98.63, + "entry_low": 89.77, + "entry_high": 92.76, + "action": "盈利持有 | 损88.85 | 盈98.63 | 买89.77~92.76 | 信号:放量下跌,等企稳再入", + "tech_snapshot": "形态:光头光脚阳线/bullish 量价:主动卖盘占优 强撑:83.13 弱撑:89.8 弱压:92.5 强压:98.63", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 2.56, + "action_note": "", + "timing_signal": "放量下跌,等企稳再入" + } + }, + { + "code": "09868", + "name": "小鹏汽车-W", + "price": 57.7, + "analysis": { + "stop_loss": 55.29, + "take_profit": 59.97, + "entry_low": 55.86, + "entry_high": 57.16, + "action": "盈利持有 | ⚠️盈亏比偏低(1:1.7),谨慎买入 | 损55.29 | 盈59.97 | 买55.86~57.16 | 信号:接近支撑位,关注", + "tech_snapshot": "形态:十字星/neutral 量价:数据不足 强撑:54.27 弱撑:56.08 弱压:58.03 强压:59.97", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 1.74, + "action_note": "⚠️盈亏比偏低(1:1.7),谨慎买入", + "timing_signal": "接近支撑位,关注" + }, + "strategy_action": "观望", + "stop_loss": 48.0, + "entry_low": 49.0, + "entry_high": 53.0, + "take_profit": 58.0, + "current_signal": "弱势观望" + }, + { + "code": "688795", + "name": "摩尔线程-U", + "price": 610.55, + "analysis": { + "stop_loss": 592.23, + "take_profit": 673.56, + "entry_low": 598.34, + "entry_high": 622.76, + "action": "盈利持有 | 损592.23 | 盈673.56 | 买598.34~622.76 | 信号:放量下跌,等企稳再入", + "tech_snapshot": "形态:带上影阴线/neutral 量价:主动卖盘占优 强撑:575.87 弱撑:596.38 弱压:638.88 强压:673.56", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 3.44, + "action_note": "", + "timing_signal": "放量下跌,等企稳再入" + }, + "strategy_action": "盈利持有", + "stop_loss": 610.0, + "entry_low": 620.0, + "entry_high": 650.0, + "take_profit": 700.0, + "current_signal": "观望" + }, + { + "code": "688802", + "name": "沐曦股份-U", + "price": 694.89, + "analysis": { + "stop_loss": 674.04, + "take_profit": 766.4, + "entry_low": 680.99, + "entry_high": 708.79, + "action": "盈利持有 | 损674.04 | 盈766.4 | 买680.99~708.79", + "tech_snapshot": "形态:带上影阴线/neutral 量价:数据不足 强撑:655.22 弱撑:678.97 弱压:726.74 强压:766.4", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 3.43, + "action_note": "", + "timing_signal": "neutral" + }, + "strategy_action": "盈利持有", + "stop_loss": 700.0, + "entry_low": 710.0, + "entry_high": 740.0, + "take_profit": 790.0, + "current_signal": "观望" + }, + { + "code": "02359", + "name": "药明康德", + "price": 126.7, + "analysis": { + "stop_loss": 121.64, + "take_profit": 131.07, + "entry_low": 122.89, + "entry_high": 125.41, + "action": "盈利持有 | ⚠️盈亏比偏低(1:1.5),谨慎买入 | 损121.64 | 盈131.07 | 买122.89~125.41", + "tech_snapshot": "形态:带上影阳线/neutral 量价:数据不足 强撑:118.27 弱撑:121.83 弱压:128.23 强压:131.07", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 1.51, + "action_note": "⚠️盈亏比偏低(1:1.5),谨慎买入", + "timing_signal": "neutral" + }, + "strategy_action": "盈利持有", + "stop_loss": 145.0, + "entry_low": 148.0, + "entry_high": 155.0, + "take_profit": 170.0, + "current_signal": "关注" + }, + { + "code": "02628", + "name": "中国人寿", + "price": 30.12, + "analysis": { + "stop_loss": 28.26, + "take_profit": 31.6, + "entry_low": 29.3, + "entry_high": 29.6, + "action": "盈利持有 | ⚠️盈亏比不足1:1.5,不建议买入 | 损28.26 | 盈31.6 | 买29.3~29.6 | 信号:阳线企稳,可买入", + "tech_snapshot": "形态:光头光脚阳线/bullish 量价:数据不足 强撑:27.44 弱撑:28.26 弱压:30.74 强压:31.6", + "reassessed_at": "2026-06-12 16:00", + "status": "review", + "rr_ratio": 1.04, + "action_note": "⚠️盈亏比不足1:1.5,不建议买入", + "timing_signal": "阳线企稳,可买入" + } + }, + { + "code": "00968", + "name": "信义光能", + "price": 2.41, + "analysis": { + "stop_loss": 2.34, + "take_profit": 2.63, + "entry_low": 2.36, + "entry_high": 2.46, + "action": "盈利持有 | 损2.34 | 盈2.63 | 买2.36~2.46 | 信号:接近支撑位,关注", + "tech_snapshot": "形态:带上影阴线/bearish 量价:数据不足 强撑:2.24 弱撑:2.37 弱压:2.47 强压:2.63", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 3.14, + "action_note": "", + "timing_signal": "接近支撑位,关注" + }, + "strategy_action": "弱势持有", + "stop_loss": 1.92, + "entry_low": 1.96, + "entry_high": 2.15, + "take_profit": 2.4, + "current_signal": "弱势持有" + }, + { + "code": "06869", + "name": "长飞光纤", + "price": 226.6, + "analysis": { + "stop_loss": 219.27, + "take_profit": 254.33, + "entry_low": 224.81, + "entry_high": 233.29, + "action": "盈利持有 | 损219.27 | 盈254.33 | 买224.81~233.29", + "tech_snapshot": "形态:带下影阴线/neutral 量价:数据不足 强撑:209.13 弱撑:219.27 弱压:241.87 强压:254.33", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 2.46, + "action_note": "", + "timing_signal": "neutral" + }, + "strategy_action": "深套持有", + "stop_loss": 195.46, + "entry_low": 181.08, + "entry_high": 211.26, + "take_profit": 230.0 + }, + { + "code": "02318", + "name": "中国平安", + "price": 57.15, + "analysis": { + "stop_loss": 55.39, + "take_profit": 60.16, + "entry_low": 55.96, + "entry_high": 57.3, + "action": "盈利持有 | ⚠️盈亏比偏低(1:1.8),谨慎买入 | 损55.39 | 盈60.16 | 买55.96~57.3 | 信号:接近支撑位,关注", + "tech_snapshot": "形态:倒T线/射击之星/bearish 量价:数据不足 强撑:54.45 弱撑:56.15 弱压:58.25 强压:60.16", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 1.79, + "action_note": "⚠️盈亏比偏低(1:1.8),谨慎买入", + "timing_signal": "接近支撑位,关注" + }, + "strategy_action": "弱势持有", + "stop_loss": 49.5, + "entry_low": 50.0, + "entry_high": 53.0, + "take_profit": 58.0, + "current_signal": "弱势观望" + }, + { + "code": "688639", + "name": "华恒生物", + "price": 21.2, + "analysis": { + "stop_loss": 20.56, + "take_profit": 22.66, + "entry_low": 20.78, + "entry_high": 21.4, + "action": "盈利持有 | 损20.56 | 盈22.66 | 买20.78~21.4 | 信号:量价齐升,可买入", + "tech_snapshot": "形态:带下影阳线/bullish 量价:主动买盘占优 强撑:19.26 弱撑:20.6 弱压:21.46 强压:22.66", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 2.28, + "action_note": "", + "timing_signal": "量价齐升,可买入" + } + }, + { + "code": "300548", + "name": "博创科技", + "price": 224.03, + "analysis": { + "buy_low": 224.25, + "buy_high": 234.13, + "position_recommend": "2%", + "reason": "+7.26%站稳230确认可追,回调至230~235建仓。", + "updated_at": "2026-06-02T14:42:56.675237", + "tech_levels": { + "strong_support": 217.39, + "weak_support": 224.25, + "weak_resist": 234.13, + "strong_resist": 240.34 + }, + "stop_loss": 211.19, + "take_profit": 263.98, + "entry_low": 225.0, + "entry_high": 229.55, + "action": "盈利持有,止损211.19 目标263.98", + "tech_snapshot": "形态:光头光脚阴线/neutral 量价:主动买盘占优 强撑:227.53 弱撑:225.0 弱压:231.57 强压:233.59", + "reassessed_at": "2026-06-12 09:30" + } + }, + { + "code": "300124", + "name": "汇川技术", + "price": 67.16, + "analysis": { + "stop_loss": 65.15, + "take_profit": 73.7, + "entry_low": 65.82, + "entry_high": 68.5, + "action": "盈利持有 | 损65.15 | 盈73.7 | 买65.82~68.5 | 信号:放量下跌,等企稳再入", + "tech_snapshot": "形态:带上影阴线/bearish 量价:主动卖盘占优 强撑:62.95 弱撑:65.99 弱压:69.49 强压:73.7", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 3.25, + "action_note": "", + "timing_signal": "放量下跌,等企稳再入" + }, + "strategy_action": "盈利持有", + "stop_loss": 67.5, + "entry_low": 68.5, + "entry_high": 72.0, + "take_profit": 78.0, + "current_signal": "关注" + }, + { + "code": "01070", + "name": "TCL电子", + "price": 14.04, + "analysis": { + "stop_loss": 13.59, + "take_profit": 15.3, + "entry_low": 13.73, + "entry_high": 14.27, + "action": "盈利持有 | 损13.59 | 盈15.3 | 买13.73~14.27 | 信号:接近支撑位,关注", + "tech_snapshot": "形态:倒T线/射击之星/bearish 量价:数据不足 强撑:13.06 弱撑:13.75 弱压:14.42 强压:15.3", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 3.07, + "action_note": "", + "timing_signal": "接近支撑位,关注" + } + }, + { + "code": "09988", + "name": "阿里巴巴-W", + "price": 110.2, + "analysis": { + "buy_low": 107.4, + "buy_high": 111.4, + "position_recommend": null, + "reason": "大涨+5.86%可关注", + "updated_at": "2026-06-02T11:01:41.539017", + "tech_levels": { + "strong_support": 102.72, + "weak_support": 107.4, + "weak_resist": 111.4, + "strong_resist": 117.48 + }, + "stop_loss": 99.18, + "take_profit": 123.97, + "entry_low": 94.86, + "entry_high": 107.8, + "action": "盈利持有,止损99.18 目标123.97", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None", + "reassessed_at": "2026-06-12 09:30" + } + }, + { + "code": "00700", + "name": "腾讯控股", + "price": 463.6, + "analysis": { + "buy_low": 457.2, + "buy_high": 467.93, + "position_recommend": null, + "reason": "暴涨+7.75%逼近止盈470", + "updated_at": "2026-06-02T11:01:41.539014", + "tech_levels": { + "strong_support": 440.4, + "weak_support": 457.2, + "weak_resist": 467.93, + "strong_resist": 486.94 + }, + "stop_loss": 432.58, + "take_profit": 540.73, + "entry_low": 413.78, + "entry_high": 470.2, + "action": "盈利持有,止损432.58 目标540.73", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None", + "reassessed_at": "2026-06-12 09:30" + } + }, + { + "code": "02202", + "name": "万科企业", + "price": 2.64, + "analysis": { + "buy_low": 2.62, + "buy_high": 2.69, + "position_recommend": "", + "reason": "万科企业2.83微涨+1.8%,深套持有", + "updated_at": "2026-06-02T10:46:11.973869", + "tech_levels": { + "strong_support": 2.47, + "weak_support": 2.62, + "weak_resist": 2.69, + "strong_resist": 2.83 + }, + "stop_loss": 2.42, + "take_profit": 3.02, + "entry_low": 2.31, + "entry_high": 2.63, + "action": "盈利持有,止损2.42 目标3.02", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None", + "reassessed_at": "2026-06-12 09:30" + } + }, + { + "code": "688981", + "name": "中芯国际", + "price": 124.88, + "analysis": { + "buy_low": 124.58, + "buy_high": 132.34, + "position_recommend": "0%", + "reason": "浮盈+0.0%,止损112.53 目标137.0", + "updated_at": "2026-06-09T10:46:18", + "tech_levels": { + "strong_support": 121.97, + "weak_support": 124.58, + "weak_resist": 132.34, + "strong_resist": 137.49 + }, + "stop_loss": 121.46, + "take_profit": 151.82, + "entry_low": 127.4, + "entry_high": 132.02, + "action": "盈利持有,止损121.46 目标151.82", + "tech_snapshot": "形态:倒锤头/bullish 量价:买卖均衡 强撑:130.86 弱撑:127.4 弱压:132.8 强压:133.58", + "reassessed_at": "2026-06-12 09:30" + }, + "strategy_action": "盈利持有", + "stop_loss": 132.0, + "entry_low": 135.0, + "entry_high": 142.0, + "take_profit": 155.0, + "current_signal": "关注" + }, + { + "code": "01478", + "name": "丘钛科技", + "price": 8.13, + "analysis": { + "buy_low": 7.98, + "buy_high": 8.51, + "position_recommend": "", + "reason": "丘钛科技10.07跌-1.66%,深套-26.48%暂持", + "updated_at": "2026-06-02T10:46:11.973872", + "tech_levels": { + "strong_support": 7.92, + "weak_support": 7.98, + "weak_resist": 8.51, + "strong_resist": 8.74 + }, + "stop_loss": 7.47, + "take_profit": 9.34, + "entry_low": 7.15, + "entry_high": 8.12, + "action": "盈利持有,止损7.47 目标9.34", + "tech_snapshot": "形态:unknown/neutral 量价:数据不足 强撑:None 弱撑:None 弱压:None 强压:None", + "reassessed_at": "2026-06-12 09:30" + } + }, + { + "code": "001309", + "name": "德明利", + "price": 617.43, + "analysis": { + "stop_loss": 598.91, + "take_profit": 682.35, + "entry_low": 605.08, + "entry_high": 629.78, + "action": "盈利持有 | 损598.91 | 盈682.35 | 买605.08~629.78", + "tech_snapshot": "形态:光头光脚阴线/neutral 量价:主动买盘占优 强撑:583.56 弱撑:601.91 弱压:648.48 强压:682.35", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 3.51, + "action_note": "", + "timing_signal": "neutral" + }, + "strategy_action": "盈利持有", + "stop_loss": 795.0, + "entry_low": 820.0, + "entry_high": 870.0, + "take_profit": 950.0, + "current_signal": "关注" + }, + { + "code": "06160", + "name": "百济神州", + "price": 158.9, + "prev_close": 163.1, + "market": "HK", + "analysis": { + "stop_loss": 152.78, + "take_profit": 170.7, + "entry_low": 154.35, + "entry_high": 159.95, + "action": "盈利持有 | 损152.78 | 盈170.7 | 买154.35~159.95 | 信号:接近支撑位,关注", + "tech_snapshot": "形态:锤子线/T字线/neutral 量价:数据不足 强撑:143.3 弱撑:155.0 弱压:159.5 强压:170.7", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 2.8, + "action_note": "", + "timing_signal": "接近支撑位,关注" + } + }, + { + "code": "688411", + "name": "海博思创", + "price": 264.66, + "analysis": { + "stop_loss": 239.18, + "take_profit": 264.86, + "entry_low": 241.3, + "entry_high": 259.89, + "action": "盈利持有 | 止损239.18 | 目标264.86 | 买入区241.3~259.89", + "tech_snapshot": "形态:光头光脚阳线/bullish 量价:买卖均衡 强撑:239.18 弱撑:241.3 弱压:259.89 强压:264.86", + "reassessed_at": "2026-06-12 10:02", + "status": "updated", + "buy_low": 241.3, + "buy_high": 277.96, + "tech_levels": { + "strong_support": 235.42, + "weak_support": 241.3, + "weak_resist": 277.96, + "strong_resist": 286.68 + } + } + }, + { + "code": "000700", + "name": "模塑科技", + "price": 14.4, + "analysis": { + "stop_loss": 13.97, + "take_profit": 15.27, + "entry_low": 14.11, + "entry_high": 14.49, + "action": "盈利持有 | 损13.97 | 盈15.27 | 买14.11~14.49", + "tech_snapshot": "形态:光头光脚阴线/bearish 量价:主动买盘占优 强撑:13.75 弱撑:14.08 弱压:14.84 强压:15.27", + "reassessed_at": "2026-06-12 16:00", + "status": "updated", + "rr_ratio": 2.02, + "action_note": "", + "timing_signal": "neutral" + } + }, + { + "code": "301308", + "name": "江波龙", + "added_at": "2026-07-05", + "source": "position_analyst", + "currency": "CNY", + "strategy_action": "盈利持有", + "stop_loss": 590.45, + "buy_zone_low": 618.38, + "buy_zone_high": 630.83, + "take_profit": 691.4, + "sector": "半导体/存储芯片" + }, + { + "code": "000850", + "name": "华茂股份", + "price": 3.81, + "analysis": { + "buy_low": 3.7, + "buy_high": 3.9, + "position_recommend": "2%", + "reason": "纺织是壳核心是金融资产, PB0.78破净提供安全垫, 7/16股东会催化", + "updated_at": "2026-07-06", + "tech_levels": { + "strong_support": 3.57, + "weak_support": 3.8, + "weak_resist": 4.04, + "strong_resist": 4.16 + }, + "stop_loss": 3.5, + "take_profit": 4.3, + "entry_low": 3.7, + "entry_high": 3.9, + "action": "3.70~3.90区间可建仓1~2%", + "tech_snapshot": "形态:弱势回调 量价:利好出尽缩量回调 强撑:3.57 弱撑:3.80 弱压:4.04 强压:4.16", + "reassessed_at": "2026-07-07" + }, + "sector": "纺织/金融投资" + } + ], + "updated_at": "2026-07-06" +} \ No newline at end of file diff --git a/data/xiaoguo_insights.json b/data/xiaoguo_insights.json index 69262b02..fcfa633f 100644 --- a/data/xiaoguo_insights.json +++ b/data/xiaoguo_insights.json @@ -1,78 +1,62 @@ { - "timestamp": "2026-07-03 16:00", + "timestamp": "2026-07-06 16:10", "source": "xiaoguo_fallback", "stocks": [ - { - "code": "688981", - "name": "中芯国际", - "sentiment": "negative", - "confidence": 0.75, - "reason": "芯片板块近期回调,国家大基金持股概念7/2日跌6.28%,主力资金大幅净流出;已跌破止损位140.94(现价140.31,距损-0.45%)", - "priority": "已跌破止损-0.45%" - }, - { - "code": "00981", - "name": "中芯国际(H)", - "sentiment": "negative", - "confidence": 0.65, - "reason": "大基金减持00981等芯片股,半导体板块承压;南向资金虽有爆买但价格已跌破止损67.24(现价67.06,距损-0.27%)", - "priority": "已跌破止损-0.27%" - }, - { - "code": "300548", - "name": "长芯博创", - "sentiment": "negative", - "confidence": 0.80, - "reason": "通信行业7/2日暴跌7.36%,F5G/铜缆高速连接概念大幅回调,主力资金持续净流出;已跌破止损221.38(现价221.01,距损-0.17%)", - "priority": "已跌破止损-0.17%" - }, - { - "code": "00700", - "name": "腾讯", - "sentiment": "positive", - "confidence": 0.78, - "reason": "连续31日回购,每日5.01亿港元,累计回购超249亿,管理层信心强烈;股价距止损366.84仅2.06%,回购托底意愿明确", - "priority": "距止损2.06%" - }, { "code": "300308", "name": "中际旭创", - "sentiment": "neutral", - "confidence": 0.60, - "reason": "6月获融资客40亿净买入,CPO概念年初至今涨幅可观;但通信板块7/2大跌7.36%,短期面临获利回吐压力,距止损1090.4约2.29%", - "priority": "距止损2.29%" + "sentiment": "positive", + "confidence": 0.70, + "reason": "公司今日在互动易澄清两大市场传闻:康宁玻璃桥技术非光模块替代方案、上游炫光片封锁传言不实。主动辟谣有助于缓解FUD,稳定股价", + "priority": "距止损2.49%" }, { - "code": "06869", - "name": "长飞光纤光缆", - "sentiment": "positive", - "confidence": 0.72, - "reason": "7/3除净派息0.339港元/股,南向资金7/2净买入1.77亿港元,6/30曾涨超7%;距止损169.46约2.56%,股息+资金面支撑", - "priority": "距止损2.56%" + "code": "300035", + "name": "中科电气", + "sentiment": "neutral", + "confidence": 0.50, + "reason": "今日无公司重大新闻,仅有主力资金流向统计提及。消息面平淡,股价-1.82%正常波动", + "priority": "距止损3.70%" }, { "code": "01088", "name": "中国神华", + "sentiment": "positive", + "confidence": 0.65, + "reason": "7月2日公告定州三期、沧东三期5号机组正式投运,产能扩张利好。南向资金持续大比例持有。今日+1.65%,走势稳健", + "priority": "距止损4.69%" + }, + { + "code": "688981", + "name": "中芯国际", "sentiment": "neutral", "confidence": 0.55, - "reason": "定州三期/沧东三期机组投运,子公司签约8.6亿合同,基本面稳健;但煤炭板块近期走弱,港股煤炭股6/30集体下跌,消息面中性偏淡", - "priority": "距止损2.63%" + "reason": "今日无公司层面新消息(最新公开新闻为6月底)。但当日涨幅+5.2%创阶段新高,半导体板块情绪偏暖。机构持仓稳定", + "priority": "距止损4.72%" }, { - "code": "601899", - "name": "紫金矿业", - "sentiment": "positive", - "confidence": 0.82, - "reason": "贵金属概念7/3大涨4.84%,紫金矿业涨5.32%,美联储释放通胀回落信号利好金价;公司布局航天投资拓展成长空间", - "priority": "涨跌幅+5.78%" + "code": "000700", + "name": "模塑科技", + "sentiment": "negative", + "confidence": 0.60, + "reason": "7月2日公司公告明确机器人外覆盖件订单占比不足0.1%,主动降温机器人炒作预期。前期涨幅过大,当前买入区需警惕回调风险", + "priority": "买入区15.5~18.08" }, { - "code": "01211", - "name": "比亚迪股份", - "sentiment": "positive", + "code": "01888", + "name": "建滔积层板", + "sentiment": "negative", "confidence": 0.85, - "reason": "新能源汽车零售渗透率高达63%,板块持续走强,7/2比亚迪涨超9%领涨;行业景气度高位,动力电池/整车双轮驱动", - "priority": "涨跌幅+6.90%" + "reason": "今日港股PCB概念大幅波动,建滔积层板从早盘+5.39%急转暴跌至-12.37%,日振幅超17%。南向资金此前持续加仓,但今日出现恐慌性抛售", + "priority": "买入区67.27~78.48" + }, + { + "code": "300548", + "name": "博创科技", + "sentiment": "neutral", + "confidence": 0.50, + "reason": "今日无公司重大新闻。通信行业整体偏弱(行业-7.36%),F5G概念下跌1.86%,板块环境不佳但公司层面无利空", + "priority": "买入区205.41~239.64" } ] } diff --git a/scripts/stale_detector.py b/scripts/stale_detector.py index 7c9baaf1..514a3b83 100644 --- a/scripts/stale_detector.py +++ b/scripts/stale_detector.py @@ -107,6 +107,51 @@ def main(): print("[SILENT] 无需要检查的策略") return 0 + # ----- 自选股买入区偏离自动重评 (2026-07-07 fix: 不只标记, 直接触发) ----- + try: + import subprocess, sqlite3 + db = sqlite3.connect('/home/hmo/MoFin/data/mofin.db') + db.row_factory = sqlite3.Row + wl_stocks = db.execute( + "SELECT code, name, price, entry_low, entry_high, analysis_json " + "FROM watchlist_stocks WHERE is_active=1 AND entry_low IS NOT NULL" + ).fetchall() + db.close() + reassess_scripts = [] + for ws in wl_stocks: + code, name, wl_price, wl_el, wl_eh, wl_aj = ws + if not wl_el or not wl_el or wl_el <= 0: + continue + center = (wl_el + wl_eh) / 2 + # 从 decisions 拿实时价 + price_map = fetch_prices([code]) + cur_price = price_map.get(code, (None, None))[0] + if not cur_price or cur_price <= 0: + continue + drift = (cur_price / center - 1) * 100 + if abs(drift) > 15: + reassess_scripts.append(code) + print(f"[AUTO_REASSESS] {name}({code}) 价{cur_price:.2f}偏离买入区中心{center:.2f} {drift:+.0f}% → 触发重评") + if reassess_scripts: + # 调用 per_stock_reassess + reassess_path = None + for p in ['/home/hmo/MoFin/scripts/per_stock_reassess.py', + '/home/hmo/.hermes/profiles/position-analyst/scripts/per_stock_reassess.py']: + if os.path.exists(p): + reassess_path = p + break + if reassess_path: + for code in reassess_scripts: + r = subprocess.run(['python3', reassess_path, '--code', code], + capture_output=True, text=True, timeout=60) + out = r.stdout.strip()[:200] if r.stdout else "" + err = r.stderr.strip()[:200] if r.stderr else "" + print(f" → {code}: exited={r.returncode} {out} {('err='+err) if err else ''}") + print(f" → {code}: 重评完成") + except Exception as e: + print(f"[AUTO_REASSESS FAIL] {e}") + # ----- 结束 自选股重评 ----- + # ----- 组合级监测:读取总仓位 + 弱势比例 ----- position_pct = 0 cash = 0 @@ -188,10 +233,12 @@ def main(): issues.append(f"[PUSH] 价{price:.2f}入买入区{el}~{eh}") elif price > eh * 1.35: flags.append("[WL_HIGH]") - issues.append(f"价{price:.2f}高出买入区+{((price/eh)-1)*100:.0f}%,买入区需重评") + flags.append("[STRATEGY_STALE]") + issues.append(f"[STRATEGY_STALE] 价{price:.2f}高出买入区+{((price/eh)-1)*100:.0f}%,买入区需重评") elif price > eh * 1.20: flags.append("[WL_DRIFT]") - issues.append(f"价{price:.2f}高于买入区+{((price/eh)-1)*100:.0f}%") + flags.append("[STRATEGY_STALE]") + issues.append(f"[STRATEGY_STALE] 价{price:.2f}高出买入区+{((price/eh)-1)*100:.0f}%,买入区需重评") elif not is_wl and eh: dp = (price / eh - 1) * 100 if dp > 35: diff --git a/scripts/strategy_summary.py b/scripts/strategy_summary.py new file mode 100644 index 00000000..e2fcc629 --- /dev/null +++ b/scripts/strategy_summary.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python3 +"""生成策略评估摘要""" +import json + +with open('/home/hmo/web-dashboard/data/decisions.json') as f: + dec = json.load(f) +with open('/home/hmo/MoFin/data/portfolio.json') as f: + pf = json.load(f) + +holdings = pf.get('holdings', []) +cash = pf.get('cash', 321271) +hk_rate = 0.867 +code_to_h = {h['code']: h for h in holdings} + +decisions = dec.get('decisions', []) +hold_entries = [s for s in decisions if s.get('shares', 0) > 0] +wl_entries = [s for s in decisions if s.get('shares', 0) == 0] + +hk_total_cny = 0 +a_total = 0 +for h in holdings: + mv = h['shares'] * h['price'] + if h.get('currency') == 'HKD': + hk_total_cny += mv * hk_rate + else: + a_total += mv +total_mv = hk_total_cny + a_total +total_assets = total_mv + cash +position_pct = total_mv / total_assets * 100 + +weak_count = sum(1 for s in hold_entries if s.get('stock_category') in ('弱势','深套')) + +print(f'总市值: {total_mv:.0f} CNY (HK${hk_total_cny:.0f} A¥{a_total:.0f})') +print(f'总资产: {total_assets:.0f} CNY') +print(f'仓位: {position_pct:.1f}% 现金: {cash:.0f}') +print(f'持仓: {len(hold_entries)}只 弱势/深套: {weak_count}只 ({weak_count/len(hold_entries)*100:.0f}%)') +print(f'自选: {len(wl_entries)}只') +print() + +print('【持仓详情】') +for s in hold_entries: + code = s['code'] + name = s['name'] + shares = s['shares'] + cost = s.get('cost', 0) + sl = s.get('stop_loss', 0) + tp = s.get('take_profit', 0) + cat = s.get('stock_category', '?') + sig = s.get('timing_signal', '?') + + h = code_to_h.get(code) + price = h['price'] if h else 0 + if h and h.get('currency') == 'HKD': + mv_val = h['shares'] * h['price'] * hk_rate + else: + mv_val = h['shares'] * h['price'] if h else 0 + pl_pct = (price - cost) / cost * 100 if cost else 0 + pct = mv_val / total_assets * 100 + sl_dist = (price / sl - 1) * 100 if sl > 0 else 0 + tp_dist = (tp / price - 1) * 100 if tp > 0 else 0 + + flags = [] + if sl_dist < 5: + if pl_pct > 5: + flags.append('利润保护') + else: + flags.append(f'⚠️近止损({sl_dist:.0f}%)') + if tp_dist < 5 and tp_dist > 0: + flags.append('近止盈') + if cat in ('弱势','深套'): + flags.append(f'[{cat}]') + + flag_str = ' '.join(flags) if flags else '' + print(f' {code} {name:10s} ¥{price:>7.2f} 浮{pl_pct:+.1f}% 仓{pct:.1f}% 损{sl}({sl_dist:.0f}%) 盈{tp}({tp_dist:.0f}%) {flag_str}') + +print() +print('【自选关注】') +for s in wl_entries: + code = s['code'] + name = s['name'] + el = s.get('entry_low', 0) + eh = s.get('entry_high', 0) + sl = s.get('stop_loss', 0) + price = s.get('price', 0) + sig = s.get('timing_signal', '?') + in_zone = '✅在买入区' if el and eh and price and el <= price <= eh else '' + print(f' {code} {name:10s} ¥{price:>7.2f} 买区{el}~{eh} 损{sl} 信号{sig} {in_zone}') diff --git a/scripts/sync_decisions_to_db.py b/scripts/sync_decisions_to_db.py new file mode 100644 index 00000000..7aa8cf03 --- /dev/null +++ b/scripts/sync_decisions_to_db.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +"""将 decisions.json 全量同步到 SQLite holding_strategies 表""" +import json, sqlite3, sys + +DECISIONS_PATH = '/home/hmo/web-dashboard/data/decisions.json' +DB_PATH = '/home/hmo/web-dashboard/data/mofin.db' + +def main(): + # 读 decisions.json + with open(DECISIONS_PATH) as f: + data = json.load(f) + entries = data.get('decisions', []) + print(f'Read {len(entries)} entries from decisions.json') + + db = sqlite3.connect(DB_PATH) + + # 先清空 holding_strategies(全量重建更干净) + db.execute('DELETE FROM holding_strategies') + + inserted = 0 + for d in entries: + code = d.get('code') + if not code: + continue + + # 从 decisions.json 提取字段,映射到 DB schema + sql = '''INSERT INTO holding_strategies ( + code, name, version, price, cost, shares, + stop_loss, take_profit, entry_low, entry_high, + currency, strategy_type, action, timing_signal, + rr_ratio, tech_snapshot, stock_category, sector_context, + status, trigger_json, changelog_json, source, reason, + created_at, updated_at, + avg_price, decision_timestamp, note, decision_type + ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''' + + # 确定 type/strategy_type + stype = d.get('strategy_type') or d.get('type') or '持仓策略' + # decision_type = d.get('decision_type') or stype + decision_type = stype + + vals = ( + code, + d.get('name', ''), + d.get('version', 1), + d.get('price'), + d.get('cost'), + d.get('shares', 0), + d.get('stop_loss'), + d.get('take_profit'), + d.get('entry_low'), + d.get('entry_high'), + d.get('currency', 'CNY' if code.startswith(('6','0','3','5')) else 'HKD'), + stype, + d.get('action', ''), + d.get('timing_signal', ''), + d.get('rr_ratio'), + d.get('tech_snapshot'), + d.get('stock_category'), + d.get('sector_context'), + d.get('status', 'active'), + json.dumps(d.get('trigger', {}), ensure_ascii=False) if d.get('trigger') else d.get('trigger_json'), + json.dumps(d.get('changelog', []), ensure_ascii=False) if d.get('changelog') else d.get('changelog_json'), + d.get('source', 'auto'), + d.get('reason'), + d.get('created_at'), + d.get('updated_at'), + d.get('avg_price'), + d.get('decision_timestamp') or d.get('timestamp'), + d.get('note'), + decision_type, + ) + try: + db.execute(sql, vals) + inserted += 1 + except Exception as e: + print(f'Error inserting {code} ({d.get("name")}): {e}') + + db.commit() + + # 验证 + cnt = db.execute('SELECT COUNT(*) FROM holding_strategies').fetchone()[0] + active = db.execute('SELECT COUNT(*) FROM holding_strategies WHERE status IN ("active","updated")').fetchone()[0] + db.close() + + print(f'Synced: {inserted} rows inserted') + print(f'holding_strategies: {cnt} total, {active} active/updated') + + return 0 if inserted > 0 else 1 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/strategy_lifecycle.py b/strategy_lifecycle.py index 08c844ff..c1cbd7ee 100644 --- a/strategy_lifecycle.py +++ b/strategy_lifecycle.py @@ -223,7 +223,18 @@ def enforce_strategy_quality(code, name, result): if price > 0: result["take_profit"] = round(price * 1.20, 2) # 更宽 else: - result["take_profit"] = 2 + # price=0 → 从DB或API获取 + try: + import sqlite3 as _s3 + _db = _s3.connect("/home/hmo/web-dashboard/data/mofin.db", timeout=5) + _r = _db.execute("SELECT price FROM holdings WHERE code=?", (code_str,)).fetchone() + _db.close() + if _r and _r[0] and _r[0] > 0: + result["take_profit"] = round(float(_r[0]) * 1.20, 2) + else: + result["take_profit"] = 2 # 真的兜底 + except: + result["take_profit"] = 2 print(f" R{round_num} 止盈={result.get('take_profit',0)}", flush=True) if gate_id == "GATE_ENTRY_RANGE" and ((result.get("entry_low") or 0) >= (result.get("entry_high") or 0) or (result.get("entry_low") or 0) <= 0): @@ -1498,6 +1509,7 @@ def reassess_strategy(code, name, price, cost, shares, current_action, now_str = datetime.now().strftime('%Y-%m-%d %H:%M') return { + 'price': price, # 2026-07-07 修复:加入price供质量门禁使用 'stop_loss': new_stop, 'take_profit': new_target, 'entry_low': entry_low,