diff --git a/data/price_events.json b/data/price_events.json index c504d2b8..f2fa7336 100644 --- a/data/price_events.json +++ b/data/price_events.json @@ -4339,6 +4339,276 @@ "event_label": "止盈区间", "timestamp": "2026-07-09T13:35:18.747119", "date": "2026-07-09" + }, + { + "code": "01888", + "name": "建滔积层板", + "event_type": "entry_zone", + "price": 65.65, + "trigger_value": "64.58~67.22", + "event_label": "加仓区间", + "timestamp": "2026-07-09T13:38:58.113244", + "date": "2026-07-09" + }, + { + "code": "600563", + "name": "法拉电子", + "event_type": "entry_zone", + "price": 147.03, + "trigger_value": "0.0~148.72", + "event_label": "止盈区间", + "timestamp": "2026-07-09T13:43:00.275642", + "date": "2026-07-09" + }, + { + "code": "01211", + "name": "比亚迪股份", + "event_type": "entry_zone", + "price": 82.4, + "trigger_value": "0.0~82.56", + "event_label": "止盈区间", + "timestamp": "2026-07-09T13:46:03.118468", + "date": "2026-07-09" + }, + { + "code": "06869", + "name": "长飞光纤光缆", + "event_type": "entry_zone", + "price": 158.7, + "trigger_value": "155.62~161.98", + "event_label": "加仓区间", + "timestamp": "2026-07-09T13:54:13.097656", + "date": "2026-07-09" + }, + { + "code": "01211", + "name": "比亚迪股份", + "event_type": "entry_zone", + "price": 82.4, + "trigger_value": "0.0~82.42", + "event_label": "止盈区间", + "timestamp": "2026-07-09T13:56:17.168207", + "date": "2026-07-09" + }, + { + "code": "600563", + "name": "法拉电子", + "event_type": "entry_zone", + "price": 148.43, + "trigger_value": "0.0~148.72", + "event_label": "止盈区间", + "timestamp": "2026-07-09T13:56:19.051542", + "date": "2026-07-09" + }, + { + "code": "000518", + "name": "四环生物", + "event_type": "entry_zone", + "price": 3.93, + "trigger_value": "0.0~3.93", + "event_label": "止盈区间", + "timestamp": "2026-07-09T13:58:22.933836", + "date": "2026-07-09" + }, + { + "code": "000711", + "name": "ST京蓝", + "event_type": "entry_zone", + "price": 5.58, + "trigger_value": "5.58~5.6", + "event_label": "加仓区间", + "timestamp": "2026-07-09T13:58:25.015873", + "date": "2026-07-09" + }, + { + "code": "000657", + "name": "中钨高新", + "event_type": "entry_zone", + "price": 75.42, + "trigger_value": "72.47~75.43", + "event_label": "加仓区间", + "timestamp": "2026-07-09T14:02:37.818729", + "date": "2026-07-09" + }, + { + "code": "000700", + "name": "模塑科技", + "event_type": "entry_zone", + "price": 15.05, + "trigger_value": "0.0~15.42", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:02:45.560659", + "date": "2026-07-09" + }, + { + "code": "600563", + "name": "法拉电子", + "event_type": "entry_zone", + "price": 148.76, + "trigger_value": "0.0~153.18", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:02:49.034256", + "date": "2026-07-09" + }, + { + "code": "688411", + "name": "海博思创", + "event_type": "entry_zone", + "price": 248.6, + "trigger_value": "0.0~255.09", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:02:53.697878", + "date": "2026-07-09" + }, + { + "code": "688639", + "name": "华恒生物", + "event_type": "entry_zone", + "price": 16.26, + "trigger_value": "0.0~16.93", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:03:01.081412", + "date": "2026-07-09" + }, + { + "code": "000518", + "name": "四环生物", + "event_type": "entry_zone", + "price": 3.93, + "trigger_value": "0.0~3.93", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:12:55.195062", + "date": "2026-07-09" + }, + { + "code": "000518", + "name": "四环生物", + "event_type": "entry_zone", + "price": 3.93, + "trigger_value": "0.0~3.93", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:17:06.706160", + "date": "2026-07-09" + }, + { + "code": "01888", + "name": "建滔积层板", + "event_type": "stop_loss", + "price": 65.35, + "trigger_value": "65.52", + "event_label": "", + "timestamp": "2026-07-09T14:18:11.729296", + "date": "2026-07-09" + }, + { + "code": "01088", + "name": "中国神华", + "event_type": "entry_zone", + "price": 41.18, + "trigger_value": "40.88~41.26", + "event_label": "加仓区间", + "timestamp": "2026-07-09T14:20:15.844154", + "date": "2026-07-09" + }, + { + "code": "01888", + "name": "建滔积层板", + "event_type": "entry_zone", + "price": 66.2, + "trigger_value": "64.09~66.71", + "event_label": "加仓区间", + "timestamp": "2026-07-09T14:20:22.220550", + "date": "2026-07-09" + }, + { + "code": "01888", + "name": "建滔积层板", + "event_type": "entry_zone", + "price": 67.95, + "trigger_value": "66.15~68.85", + "event_label": "加仓区间", + "timestamp": "2026-07-09T14:26:23.388720", + "date": "2026-07-09" + }, + { + "code": "01211", + "name": "比亚迪股份", + "event_type": "entry_zone", + "price": 82.9, + "trigger_value": "0.0~84.79", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:48:11.862007", + "date": "2026-07-09" + }, + { + "code": "300750", + "name": "宁德时代", + "event_type": "entry_zone", + "price": 375.81, + "trigger_value": "0.0~384.7", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:48:19.477610", + "date": "2026-07-09" + }, + { + "code": "601899", + "name": "紫金矿业", + "event_type": "entry_zone", + "price": 27.63, + "trigger_value": "0.0~28.33", + "event_label": "止盈区间", + "timestamp": "2026-07-09T14:48:25.964779", + "date": "2026-07-09" + }, + { + "code": "000700", + "name": "模塑科技", + "event_type": "entry_zone", + "price": 15.17, + "trigger_value": "14.9~15.18", + "event_label": "加仓区间", + "timestamp": "2026-07-09T14:54:22.002129", + "date": "2026-07-09" + }, + { + "code": "000700", + "name": "模塑科技", + "event_type": "entry_zone", + "price": 15.18, + "trigger_value": "0.0~15.42", + "event_label": "止盈区间", + "timestamp": "2026-07-09T15:02:40.447650", + "date": "2026-07-09" + }, + { + "code": "300035", + "name": "中科电气", + "event_type": "entry_zone", + "price": 13.1, + "trigger_value": "0.0~13.28", + "event_label": "止盈区间", + "timestamp": "2026-07-09T15:02:41.664662", + "date": "2026-07-09" + }, + { + "code": "518880", + "name": "黄金ETF华安", + "event_type": "entry_zone", + "price": 8.54, + "trigger_value": "0.0~8.83", + "event_label": "止盈区间", + "timestamp": "2026-07-09T15:02:46.381981", + "date": "2026-07-09" + }, + { + "code": "688639", + "name": "华恒生物", + "event_type": "entry_zone", + "price": 16.34, + "trigger_value": "0.0~16.6", + "event_label": "止盈区间", + "timestamp": "2026-07-09T15:02:49.588923", + "date": "2026-07-09" } ] } \ No newline at end of file diff --git a/data/price_history.json b/data/price_history.json index 0811693f..0a685446 100644 --- a/data/price_history.json +++ b/data/price_history.json @@ -4,19 +4,19 @@ "date": "2026-07-09", "high": 15.75, "low": 14.86, - "close": 14.98, - "volume": 444216.0, - "amount": 67570.0 + "close": 15.18, + "volume": 570457.0, + "amount": 86672.0 } ], "00700": [ { "date": "2026-07-09", "high": 485.0, - "low": 470.2, - "close": 470.2, - "volume": 26422991.0, - "amount": 12632308619.838 + "low": 467.2, + "close": 469.6, + "volume": 42402152.0, + "amount": 20136358005.238 } ], "01088": [ @@ -24,19 +24,19 @@ "date": "2026-07-09", "high": 41.64, "low": 40.82, - "close": 41.24, - "volume": 7332972.0, - "amount": 302862748.4 + "close": 41.14, + "volume": 14046969.0, + "amount": 579255213.92 } ], "01211": [ { "date": "2026-07-09", "high": 86.55, - "low": 82.55, + "low": 82.2, "close": 82.65, - "volume": 18326386.0, - "amount": 1550084205.15 + "volume": 38997358.0, + "amount": 3261050507.8 } ], "01478": [ @@ -44,9 +44,9 @@ "date": "2026-07-09", "high": 6.97, "low": 6.79, - "close": 6.82, - "volume": 2527000.0, - "amount": 17355670.0 + "close": 6.95, + "volume": 5386000.0, + "amount": 37091059.0 } ], "01888": [ @@ -54,9 +54,9 @@ "date": "2026-07-09", "high": 71.0, "low": 63.4, - "close": 65.85, - "volume": 59047903.0, - "amount": 3957642009.85 + "close": 67.7, + "volume": 102823013.0, + "amount": 6908608777.7 } ], "02202": [ @@ -64,9 +64,9 @@ "date": "2026-07-09", "high": 2.28, "low": 2.23, - "close": 2.24, - "volume": 8649200.0, - "amount": 19491995.6 + "close": 2.26, + "volume": 13355400.0, + "amount": 30069732.6 } ], "06869": [ @@ -74,9 +74,9 @@ "date": "2026-07-09", "high": 163.5, "low": 146.0, - "close": 156.0, - "volume": 24880313.0, - "amount": 3855569879.8 + "close": 160.2, + "volume": 45112427.0, + "amount": 7086960142.8 } ], "300035": [ @@ -84,59 +84,59 @@ "date": "2026-07-09", "high": 13.44, "low": 12.68, - "close": 12.97, - "volume": 145833.0, - "amount": 18946.0 + "close": 13.1, + "volume": 207556.0, + "amount": 27007.0 } ], "300308": [ { "date": "2026-07-09", - "high": 1168.95, + "high": 1199.99, "low": 1117.01, - "close": 1159.0, - "volume": 234082.0, - "amount": 2677710.0 + "close": 1194.9, + "volume": 358884.0, + "amount": 4160873.0 } ], "300548": [ { "date": "2026-07-09", - "high": 227.76, + "high": 233.51, "low": 213.1, - "close": 226.28, - "volume": 109292.0, - "amount": 239836.0 + "close": 232.7, + "volume": 170364.0, + "amount": 380906.0 } ], "300750": [ { "date": "2026-07-09", - "high": 370.68, + "high": 376.66, "low": 360.07, - "close": 366.77, - "volume": 246690.0, - "amount": 900969.0 + "close": 375.5, + "volume": 377942.0, + "amount": 1390578.0 } ], "518880": [ { "date": "2026-07-09", - "high": 8.504, + "high": 8.55, "low": 8.446, - "close": 8.479, - "volume": 1504923.0, - "amount": 127577.0 + "close": 8.544, + "volume": 2454207.0, + "amount": 208479.0 } ], "600563": [ { "date": "2026-07-09", - "high": 147.68, + "high": 151.6, "low": 140.33, - "close": 146.08, - "volume": 57531.0, - "amount": 82717.0 + "close": 150.88, + "volume": 95323.0, + "amount": 139212.0 } ], "601899": [ @@ -144,19 +144,19 @@ "date": "2026-07-09", "high": 27.7, "low": 26.55, - "close": 26.97, - "volume": 1784624.0, - "amount": 483471.0 + "close": 27.62, + "volume": 2514997.0, + "amount": 683733.0 } ], "688411": [ { "date": "2026-07-09", - "high": 248.86, + "high": 249.5, "low": 239.0, - "close": 246.75, - "volume": 2194854.0, - "amount": 53748.0 + "close": 249.01, + "volume": 3170558.0, + "amount": 77981.0 } ], "688639": [ @@ -164,39 +164,39 @@ "date": "2026-07-09", "high": 16.53, "low": 16.22, - "close": 16.3, - "volume": 2307747.0, - "amount": 3758.0 + "close": 16.34, + "volume": 3415772.0, + "amount": 5562.0 } ], "688981": [ { "date": "2026-07-09", - "high": 166.58, + "high": 174.51, "low": 152.1, - "close": 165.66, - "volume": 96555603.0, - "amount": 1543952.0 + "close": 173.0, + "volume": 144629617.0, + "amount": 2364591.0 } ], "00981": [ { "date": "2026-07-09", - "high": 83.45, + "high": 85.8, "low": 76.65, - "close": 81.55, - "volume": 126183931.0, - "amount": 10157585460.2 + "close": 83.55, + "volume": 227477167.0, + "amount": 18651146410.85 } ], "688041": [ { "date": "2026-07-09", - "high": 354.97, + "high": 363.85, "low": 335.5, - "close": 350.57, - "volume": 22812082.0, - "amount": 789683.0 + "close": 363.46, + "volume": 42754499.0, + "amount": 1501760.0 } ], "688795": [ @@ -204,9 +204,9 @@ "date": "2026-07-09", "high": 769.5, "low": 666.66, - "close": 741.88, - "volume": 5633346.0, - "amount": 405585.0 + "close": 759.0, + "volume": 7025157.0, + "amount": 510168.0 } ], "688802": [ @@ -214,29 +214,279 @@ "date": "2026-07-09", "high": 1008.0, "low": 855.0, - "close": 958.0, - "volume": 4048232.0, - "amount": 375987.0 + "close": 981.88, + "volume": 5491609.0, + "amount": 514329.0 } ], "000657": [ { "date": "2026-07-09", - "high": 76.0, + "high": 76.46, "low": 71.06, - "close": 72.67, - "volume": 356301.0, - "amount": 261932.0 + "close": 75.99, + "volume": 672849.0, + "amount": 499850.0 } ], "301308": [ { "date": "2026-07-09", - "high": 622.1, + "high": 624.3, "low": 589.73, - "close": 605.89, - "volume": 110818.0, - "amount": 672825.0 + "close": 620.0, + "volume": 201711.0, + "amount": 1234713.0 + } + ], + "000518": [ + { + "date": "2026-07-09", + "high": 4.15, + "low": 3.65, + "close": 3.99, + "volume": 1610368.0, + "amount": 63780.0 + } + ], + "000711": [ + { + "date": "2026-07-09", + "high": 5.93, + "low": 5.28, + "close": 5.28, + "volume": 1532289.0, + "amount": 86156.0 + } + ], + "001309": [ + { + "date": "2026-07-09", + "high": 867.88, + "low": 798.88, + "close": 860.48, + "volume": 163888.0, + "amount": 1365118.0 + } + ], + "002396": [ + { + "date": "2026-07-09", + "high": 29.2, + "low": 26.45, + "close": 28.96, + "volume": 1428423.0, + "amount": 400163.0 + } + ], + "002594": [ + { + "date": "2026-07-09", + "high": 87.77, + "low": 85.8, + "close": 86.87, + "volume": 377393.0, + "amount": 327088.0 + } + ], + "000949": [ + { + "date": "2026-07-09", + "high": 5.8, + "low": 5.4, + "close": 5.7, + "volume": 810560.0, + "amount": 45364.0 + } + ], + "600519": [ + { + "date": "2026-07-09", + "high": 1191.99, + "low": 1178.0, + "close": 1182.19, + "volume": 34096.0, + "amount": 403522.0 + } + ], + "300124": [ + { + "date": "2026-07-09", + "high": 64.47, + "low": 62.26, + "close": 64.32, + "volume": 375976.0, + "amount": 238428.0 + } + ], + "601318": [ + { + "date": "2026-07-09", + "high": 49.61, + "low": 48.91, + "close": 49.49, + "volume": 662369.0, + "amount": 325989.0 + } + ], + "000850": [ + { + "date": "2026-07-09", + "high": 3.86, + "low": 3.71, + "close": 3.75, + "volume": 114481.0, + "amount": 4306.0 + } + ], + "688510": [ + { + "date": "2026-07-09", + "high": 24.48, + "low": 22.99, + "close": 24.0, + "volume": 4103947.0, + "amount": 9706.0 + } + ], + "688513": [ + { + "date": "2026-07-09", + "high": 53.8, + "low": 50.39, + "close": 51.5, + "volume": 3296562.0, + "amount": 16996.0 + } + ], + "688518": [ + { + "date": "2026-07-09", + "high": 25.6, + "low": 23.9, + "close": 25.09, + "volume": 20986390.0, + "amount": 51634.0 + } + ], + "688533": [ + { + "date": "2026-07-09", + "high": 21.33, + "low": 20.75, + "close": 21.11, + "volume": 1065153.0, + "amount": 2238.0 + } + ], + "688566": [ + { + "date": "2026-07-09", + "high": 25.8, + "low": 24.95, + "close": 25.29, + "volume": 1948187.0, + "amount": 4942.0 + } + ], + "688588": [ + { + "date": "2026-07-09", + "high": 9.09, + "low": 8.77, + "close": 8.99, + "volume": 3790020.0, + "amount": 3378.0 + } + ], + "688621": [ + { + "date": "2026-07-09", + "high": 50.7, + "low": 47.73, + "close": 49.25, + "volume": 1883753.0, + "amount": 9227.0 + } + ], + "688696": [ + { + "date": "2026-07-09", + "high": 61.94, + "low": 59.95, + "close": 60.81, + "volume": 1112977.0, + "amount": 6762.0 + } + ], + "688755": [ + { + "date": "2026-07-09", + "high": 25.37, + "low": 24.51, + "close": 24.78, + "volume": 898367.0, + "amount": 2224.0 + } + ], + "688789": [ + { + "date": "2026-07-09", + "high": 49.8, + "low": 48.6, + "close": 49.0, + "volume": 1124631.0, + "amount": 5510.0 + } + ], + "600111": [ + { + "date": "2026-07-09", + "high": 45.98, + "low": 41.42, + "close": 42.98, + "volume": 1623791.0, + "amount": 697536.0 + } + ], + "601101": [ + { + "date": "2026-07-09", + "high": 11.96, + "low": 11.15, + "close": 11.3, + "volume": 403168.0, + "amount": 46115.0 + } + ], + "002371": [ + { + "date": "2026-07-09", + "high": 880.98, + "low": 815.0, + "close": 878.43, + "volume": 158615.0, + "amount": 1333947.0 + } + ], + "603501": [ + { + "date": "2026-07-09", + "high": 107.75, + "low": 99.44, + "close": 107.14, + "volume": 474716.0, + "amount": 493524.0 + } + ], + "688630": [ + { + "date": "2026-07-09", + "high": 523.35, + "low": 468.88, + "close": 517.8, + "volume": 5958884.0, + "amount": 293798.0 } ] } \ No newline at end of file diff --git a/mo_data.py b/mo_data.py deleted file mode 100644 index 50ab7fff..00000000 --- a/mo_data.py +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/env python3 -""" -mo_data.py — MoFin 统一数据层(纯 DB) - -所有数据从 SQLite 读取。不做 JSON fallback。 -JSON 文件已弃用,仅保留为历史备份。 - -用法: - from mo_data import read_portfolio, read_decisions, read_watchlist - - pf = read_portfolio() # 返回和 portfolio.json 一样的 dict 结构 - dec = read_decisions() # 返回和 decisions.json 一样的 dict 结构 - wl = read_watchlist() # 返回和 watchlist.json 一样的 dict 结构 -""" - -import sqlite3, json -from datetime import datetime - -DB_PATH = '/home/hmo/web-dashboard/data/mofin.db' - - -def _get_db(): - """获取数据库连接(WAL 模式,15秒超时防并发锁)""" - db = sqlite3.connect(DB_PATH, timeout=15) - db.row_factory = sqlite3.Row - db.execute("PRAGMA journal_mode=WAL") - db.execute("PRAGMA busy_timeout=15000") - return db - - -# ── portfolio ───────────────────────────────────────────────────── - -def read_portfolio(): - """返回 portfolio.json 等价 dict。纯 DB。 - - 总市值从 holdings 实时计算(shares × price,港股 × 汇率), - 不信任 portfolio_summary 的存储值,因为可能未及时更新。 - """ - db = _get_db() - rows = db.execute( - "SELECT code, name, shares, cost, price, market_value, " - "change_pct, currency, position_pct " - "FROM holdings WHERE is_active=1" - ).fetchall() - holdings = [] - for r in rows: - h = dict(r) - h['_currency'] = h.get('currency', 'CNY') - holdings.append(h) - - sum_row = db.execute("SELECT * FROM portfolio_summary WHERE id=1").fetchone() - summary = dict(sum_row) if sum_row else {} - - db.close() - - # ── 总市值从 holdings 实时计算 ──────────────────── - cash = float(summary.get('cash', 0) or 0) - frozen = float(summary.get('frozen_cash', 0) or 0) - - # 获取港股汇率 - import subprocess, os as _os - rate = 0.865 # 默认值 - try: - hk_rate_py = _os.path.join(_os.path.dirname(_os.path.dirname(__file__)), 'hk_rate.py') - if _os.path.exists(hk_rate_py): - r = subprocess.run( - [_os.path.join(_os.path.dirname(_os.path.dirname(__file__)), 'venv', 'bin', 'python3'), - hk_rate_py, '--rate'], - capture_output=True, text=True, timeout=10 - ) - if r.returncode == 0 and r.stdout.strip(): - rate = float(r.stdout.strip()) - except Exception: - pass - - total_mv = 0.0 - for h in holdings: - p = float(h.get('price', 0) or 0) - s = float(h.get('shares', 0) or 0) - if h.get('currency') == 'HKD' or (len(str(h.get('code',''))) == 5 and str(h.get('code',''))[0] in ('0','1')): - total_mv += s * p * rate - else: - total_mv += s * p - total_mv = round(total_mv, 2) - total_assets = round(total_mv + cash + frozen, 2) - position_pct = round(total_mv / total_assets * 100, 2) if total_assets > 0 else 0 - - return { - "holdings": holdings, - "total_assets": total_assets, - "total_mv": total_mv, - "stock_value": total_mv, - "cash": cash, - "frozen_cash": frozen, - "position_pct": position_pct, - "currency": summary.get("currency", "CNY"), - "updated_at": summary.get("updated_at", ""), - } - - -# ── decisions ───────────────────────────────────────────────────── - -def _parse_json(val, default): - if val: - try: return json.loads(val) - except: pass - return default - - -def read_decisions(): - """返回 decisions.json 等价 dict。纯 DB。""" - db = _get_db() - rows = db.execute( - "SELECT 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, quality_check, " - "quality_checked_at, quality_issues_json, position_advice, " - "signal_factors_json, time_horizon, decision_type " - "FROM holding_strategies WHERE status IN ('active','updated') " - "ORDER BY code" - ).fetchall() - - decisions = [] - for r in rows: - d = dict(r) - d['trigger'] = _parse_json(r['trigger_json'], {}) - d['changelog'] = _parse_json(r['changelog_json'], []) - d['quality_issues'] = _parse_json(r['quality_issues_json'], {}) - d['signal_factors'] = _parse_json(r['signal_factors_json'], []) - d['timestamp'] = r['decision_timestamp'] or r['created_at'] or '' - d['type'] = r['decision_type'] or r['strategy_type'] or '持仓策略' - decisions.append(d) - - db.close() - - return { - "decisions": decisions, - "total": len(decisions), - "regenerated_at": datetime.now().strftime('%Y-%m-%d %H:%M'), - } - - -# ── watchlist ───────────────────────────────────────────────────── - -def read_watchlist(): - """返回 watchlist.json 等价 dict。纯 DB。""" - db = _get_db() - rows = db.execute( - "SELECT code, name, price, entry_low, entry_high, " - "stop_loss, currency, source, source_detail, notes, " - "added_by, added_at, analysis_json " - "FROM watchlist_stocks WHERE is_active=1" - ).fetchall() - - stocks = [] - for r in rows: - s = dict(r) - s['source_detail'] = _parse_json(r['source_detail'], None) - if r['analysis_json']: - s['analysis'] = _parse_json(r['analysis_json'], {}) - else: - s['analysis'] = {} - stocks.append(s) - - db.close() - - return { - "stocks": stocks, - "updated_at": datetime.now().strftime('%Y-%m-%d %H:%M'), - } - - -# ── 便捷别名 ─────────────────────────────────────────────────────── - -def read_portfolio_json(): - return read_portfolio() - -def read_decisions_json(): - return read_decisions() - -def read_watchlist_json(): - return read_watchlist() - - -# ── cash_log 写入 ────────────────────────────────────────────────── - -def write_cash_log(cash_before, cash_after, frozen_before, frozen_after, - source, note, verified=0): - """记录现金变更到 cash_log 表。""" - change_amount = round(cash_after - cash_before, 2) if cash_after is not None and cash_before is not None else 0 - db = sqlite3.connect(DB_PATH) - try: - cur = db.execute( - """INSERT INTO cash_log - (timestamp, cash_before, cash_after, frozen_before, frozen_after, - change_amount, source, note, verified) - VALUES (datetime('now','localtime'), ?, ?, ?, ?, ?, ?, ?, ?)""", - (cash_before, cash_after, frozen_before, frozen_after, - change_amount, source, note, verified) - ) - db.commit() - return cur.lastrowid - finally: - db.close() - - -# ── 自检 ─────────────────────────────────────────────────────────── - -if __name__ == "__main__": - pf = read_portfolio() - print(f"portfolio: {len(pf.get('holdings',[]))} holdings, total_assets={pf.get('total_assets',0)}") - - dec = read_decisions() - print(f"decisions: {len(dec.get('decisions',[]))} entries") - - wl = read_watchlist() - print(f"watchlist: {len(wl.get('stocks',[]))} stocks") diff --git a/static/mofin_health.json b/static/mofin_health.json index 30ae4d02..5b37c292 100644 --- a/static/mofin_health.json +++ b/static/mofin_health.json @@ -1,5 +1,5 @@ { - "generated_at": "2026-07-09 13:30:52", + "generated_at": "2026-07-10 01:02:34", "feature_tree": { "label": "MoFin 系统", "status": "ok", @@ -18,7 +18,7 @@ "script": "market_watch.py", "schedule": "*/10 9-11,13-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:20", + "last_run": "2026-07-09T15:51", "type": "no_agent", "profile": "position-analyst" } @@ -39,7 +39,7 @@ "script": "price_monitor.py", "schedule": "*/2 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:28", + "last_run": "2026-07-09T16:58", "type": "no_agent", "profile": "position-analyst" } @@ -55,7 +55,7 @@ "script": "xiaoguo_scanner.py", "schedule": "*/5 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:25", + "last_run": "2026-07-09T15:55", "type": "no_agent", "profile": "position-analyst" } @@ -71,7 +71,7 @@ "script": "capital_flow_collector.py", "schedule": "1,31 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:01", + "last_run": "2026-07-09T15:31", "type": "no_agent", "profile": "position-analyst" } @@ -87,7 +87,7 @@ "script": "refresh_macro_context.py", "schedule": "*/30 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:01", + "last_run": "2026-07-09T15:30", "type": "no_agent", "profile": "position-analyst" } @@ -103,7 +103,7 @@ "script": "macro_context_collector.py", "schedule": "*/30 8-16 * * *", "status": "ok", - "last_run": "2026-07-09T13:01", + "last_run": "2026-07-09T16:30", "type": "no_agent", "profile": "position-analyst" } @@ -146,8 +146,8 @@ "name": "自选买入区提醒-盘前午间尾盘", "script": "per_stock_reassess.py", "schedule": "0 9,12,15 * * 1-5", - "status": "error", - "last_run": "2026-07-09T12:02", + "status": "ok", + "last_run": "2026-07-09T15:01", "type": "no_agent", "profile": "position-analyst" }, @@ -156,7 +156,7 @@ "script": "stale_push_wlin.py", "schedule": "1,31 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:01", + "last_run": "2026-07-09T15:31", "type": "no_agent", "profile": "position-analyst" } @@ -181,7 +181,7 @@ "script": "stale_detector.py", "schedule": "0 21 * * 1-5", "status": "ok", - "last_run": "2026-07-08T21:21", + "last_run": "2026-07-09T21:16", "type": "LLM", "profile": "position-analyst" }, @@ -190,7 +190,7 @@ "script": "collect_evaluation_data.py", "schedule": "30 20 * * 1-5", "status": "ok", - "last_run": "2026-07-08T22:54", + "last_run": "2026-07-09T20:30", "type": "no_agent", "profile": "position-analyst" } @@ -206,7 +206,7 @@ "script": "branch_scanner.py", "schedule": "15,30,45,00 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30", + "last_run": "2026-07-09T15:45", "type": "no_agent", "profile": "position-analyst" } @@ -222,7 +222,7 @@ "script": "meta_growth.py", "schedule": "45 0,12 * * 1-5", "status": "ok", - "last_run": "2026-07-09T12:45", + "last_run": "2026-07-10T00:45", "type": "no_agent", "profile": "position-analyst" } @@ -238,7 +238,7 @@ "script": "prune_branches.py", "schedule": "0 21 * * 1-5", "status": "ok", - "last_run": "2026-07-08T21:00", + "last_run": "2026-07-09T21:01", "type": "no_agent", "profile": "position-analyst" } @@ -309,7 +309,7 @@ "script": "cron_to_xmpp.py", "schedule": "*/5 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:25", + "last_run": "2026-07-09T16:55", "type": "no_agent", "profile": "position-analyst" } @@ -341,7 +341,7 @@ "script": "generate_report.py closing_brief", "schedule": "10 16 * * 1-5", "status": "ok", - "last_run": "2026-07-08T16:15", + "last_run": "2026-07-09T16:14", "type": "LLM", "profile": "position-analyst" } @@ -357,7 +357,7 @@ "script": null, "schedule": "0 16 * * 1-5", "status": "ok", - "last_run": "2026-07-08T16:15", + "last_run": "2026-07-09T16:10", "type": "LLM", "profile": "position-analyst" } @@ -421,7 +421,7 @@ "script": "cron_to_xmpp.py", "schedule": "* 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:29", + "last_run": "2026-07-09T16:59", "type": "no_agent", "profile": "default" } @@ -478,7 +478,7 @@ "script": "macro_signal_consumer.py", "schedule": "5,20,35,50 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:20", + "last_run": "2026-07-09T15:51", "type": "no_agent", "profile": "position-analyst" } @@ -494,7 +494,7 @@ "script": "divergence_detector.py", "schedule": "*/30 8-15 * * *", "status": "ok", - "last_run": "2026-07-09T13:01", + "last_run": "2026-07-09T15:30", "type": "no_agent", "profile": "position-analyst" }, @@ -508,22 +508,6 @@ "profile": "position-analyst" } ] - }, - { - "label": "小果信号消费-盘中 (xiaoguo_signal_consumer.py)", - "desc": "盘中消费小果扫描信号", - "status": "ok", - "pipes": [ - { - "name": "小果信号消费-盘中", - "script": "xiaoguo_signal_consumer.py", - "schedule": "0,15,30,45 9-15 * * 1-5", - "status": "ok", - "last_run": "2026-07-09T13:15", - "type": "no_agent", - "profile": "position-analyst" - } - ] } ], "desc": "宏观风险信号、跨市场背离检测" @@ -542,7 +526,7 @@ "script": "system_audit.py", "schedule": "30 17 * * 1-5", "status": "ok", - "last_run": "2026-07-08T17:35", + "last_run": "2026-07-09T17:37", "type": "LLM", "profile": "position-analyst" } @@ -558,7 +542,7 @@ "script": "cron_health_monitor.py", "schedule": "*/10 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:20", + "last_run": "2026-07-09T16:50", "type": "no_agent", "profile": "position-analyst" } @@ -574,7 +558,7 @@ "script": "verify_reassess_pipeline.py", "schedule": "*/30 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:01", + "last_run": "2026-07-09T16:30", "type": "no_agent", "profile": "position-analyst" } @@ -590,7 +574,7 @@ "script": "mofin_health.py", "schedule": "*/15 9-16,20-22 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:15", + "last_run": "2026-07-09T22:45", "type": "no_agent", "profile": "position-analyst" } @@ -606,7 +590,7 @@ "script": "hardcode_scanner.py", "schedule": "25 17 * * 1-5", "status": "ok", - "last_run": "2026-07-08T17:26", + "last_run": "2026-07-09T17:26", "type": "no_agent", "profile": "position-analyst" } @@ -622,7 +606,7 @@ "script": "intraday_health_check.py", "schedule": "*/15 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:15", + "last_run": "2026-07-09T15:45", "type": "no_agent", "profile": "position-analyst" } @@ -677,7 +661,7 @@ "script": "self_todo_executor.py", "schedule": "*/10 8-22 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30", + "last_run": "2026-07-09T22:50", "type": "no_agent", "profile": "position-analyst" } @@ -693,7 +677,7 @@ "script": "review_needed_watchdog.py", "schedule": "0,30 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30", + "last_run": "2026-07-09T15:30", "type": "no_agent", "profile": "position-analyst" } @@ -748,7 +732,7 @@ "script": "prepare_report_data.py", "schedule": "0 20 * * 4", "status": "ok", - "last_run": "2026-07-02T20:12", + "last_run": "2026-07-09T20:17", "type": "LLM", "profile": "position-analyst" } @@ -764,7 +748,7 @@ "script": "strategy_review.py", "schedule": "0 20 * * 1-5", "status": "ok", - "last_run": "2026-07-08T22:54", + "last_run": "2026-07-09T20:00", "type": "no_agent", "profile": "position-analyst" } @@ -787,7 +771,7 @@ "script": null, "schedule": "0 16 * * 1-5", "status": "ok", - "last_run": "2026-07-08T16:12", + "last_run": "2026-07-09T16:13", "type": "LLM", "profile": "position-analyst" } @@ -815,7 +799,7 @@ "script": "monitor_300308.py", "schedule": "*/2 13-14 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30", + "last_run": "2026-07-09T14:58", "type": "no_agent", "profile": "position-analyst" } @@ -831,7 +815,7 @@ "script": "300308_monitor.py", "schedule": "*/2 13-14 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30", + "last_run": "2026-07-09T14:58", "type": "no_agent", "profile": "position-analyst" } @@ -840,14 +824,14 @@ { "label": "多周期缓存刷新-盘中 (refresh_mtf_cache.py)", "desc": "盘中刷新技术指标缓存", - "status": "error", + "status": "ok", "pipes": [ { "name": "多周期缓存刷新-盘中", "script": "refresh_mtf_cache.py", "schedule": "0 9,11,14 * * 1-5", - "status": "error", - "last_run": "2026-07-09T11:03", + "status": "ok", + "last_run": "2026-07-09T14:00", "type": "no_agent", "profile": "position-analyst" } @@ -869,7 +853,7 @@ "script": "market_insight.py", "schedule": "35 15 * * 1-5", "status": "ok", - "last_run": "2026-07-08T15:35", + "last_run": "2026-07-09T15:35", "type": "no_agent", "profile": "position-analyst" } @@ -885,7 +869,87 @@ "script": "market_screener.py", "schedule": "35 15 * * 1-5", "status": "ok", - "last_run": "2026-07-08T22:58", + "last_run": "2026-07-09T15:35", + "type": "no_agent", + "profile": "position-analyst" + } + ] + }, + { + "label": "候选股自动推广-盘中 (promote_candidates.py)", + "desc": "", + "status": null, + "pipes": [ + { + "name": "候选股自动推广-盘中", + "script": "promote_candidates.py", + "schedule": "0,30 9-15 * * 1-5", + "status": null, + "last_run": "", + "type": "no_agent", + "profile": "position-analyst" + } + ] + }, + { + "label": "主力建仓扫描-每15分 (accumulation_scanner.py)", + "desc": "", + "status": null, + "pipes": [ + { + "name": "主力建仓扫描-每15分", + "script": "accumulation_scanner.py", + "schedule": "*/10 9-15 * * 1-5", + "status": null, + "last_run": "", + "type": "no_agent", + "profile": "position-analyst" + } + ] + }, + { + "label": "候选股自动提拔-每30分 (promote_candidates.py)", + "desc": "", + "status": null, + "pipes": [ + { + "name": "候选股自动提拔-每30分", + "script": "promote_candidates.py", + "schedule": "*/30 9-15 * * 1-5", + "status": null, + "last_run": "", + "type": "no_agent", + "profile": "position-analyst" + } + ] + }, + { + "label": "候选股过滤管道-每30分 (candidate_filter.py)", + "desc": "", + "status": null, + "pipes": [ + { + "name": "候选股过滤管道-每30分", + "script": "candidate_filter.py", + "schedule": "*/30 9-15 * * 1-5", + "status": null, + "last_run": "", + "type": "no_agent", + "profile": "position-analyst" + } + ] + }, + { + "label": "批量补全九维分析-一次性 (batch_reassess.py)", + "desc": "", + "status": null, + "pipes": [ + { + "name": "批量补全九维分析-一次性", + "script": "batch_reassess.py", + "schedule": "once at 2026-07-09 23:00", + "status": null, + "last_run": "", "type": "no_agent", "profile": "position-analyst" } @@ -1014,13 +1078,18 @@ { "name": "candidates", "desc": "潜力股候选池(小果扫描产出)", - "rows": 12, + "rows": 25, "readers": [ - "mofin_db" + "candidate_filter", + "mofin_db", + "accumulation_scanner", + "promote_candidates" ], "writers": [ - "mofin_db", - "market_screener" + "candidate_filter", + "market_scanner", + "accumulation_scanner", + "promote_candidates" ], "has_input": true, "has_output": true, @@ -1068,12 +1137,12 @@ "desc": "资金变动记录", "rows": 15, "readers": [ - "prepare_report_data", - "mofin_db" + "mofin_db", + "prepare_report_data" ], "writers": [ - "mo_data", - "mofin_db" + "mofin_db", + "mo_data" ], "has_input": true, "has_output": true, @@ -1120,23 +1189,26 @@ { "name": "holding_strategies", "desc": "每只股票的完整策略参数", - "rows": 65, + "rows": 75, "readers": [ - "per_stock_reassess", - "stale_push_wlin", - "system_health_check", - "strategy_lifecycle", - "sync_decisions_to_db", - "mofin_db", "mofin_collect", - "verify_reassess_pipeline", - "pre-flight-check", - "data_governance" + "run_all_tests", + "system_audit", + "accumulation_scanner", + "candidate_filter", + "system_health_check", + "promote_candidates", + "mofin_db", + "generate_report", + "verify_reassess_pipeline" ], "writers": [ - "mofin_db", + "data_governance", "sync_decisions_to_db", - "data_governance" + "batch_reassess", + "per_stock_reassess", + "promote_candidates", + "mofin_db" ], "has_input": true, "has_output": true, @@ -1165,19 +1237,19 @@ "rows": 19, "readers": [ "mofin_collect", - "prepare_report_data", - "mo_data", "run_all_tests", - "per_stock_reassess", - "refresh_mtf_cache", "xiaoguo_scanner", - "price_monitor", - "stale_push_wlin", - "server" + "system_audit", + "prepare_recommendation", + "accumulation_scanner", + "import_holding_xls", + "candidate_filter", + "system_health_check", + "mo_alphasift_bridge" ], "writers": [ - "import_holding_xls", - "mofin_db" + "mofin_db", + "import_holding_xls" ], "has_input": true, "has_output": true, @@ -1203,17 +1275,19 @@ { "name": "live_prices", "desc": "所有持仓+自选最新实时价", - "rows": 42, + "rows": 72, "readers": [ - "mofin_db", - "verify_reassess_pipeline", - "cron_health_monitor", + "candidate_filter", "mo_data", - "system_audit" + "stale_push_wlin", + "mofin_db", + "cron_health_monitor", + "system_audit", + "verify_reassess_pipeline" ], "writers": [ - "mo_data", - "mofin_db" + "mofin_db", + "mo_data" ], "has_input": true, "has_output": true, @@ -1237,15 +1311,17 @@ { "name": "macro_context_log", "desc": "宏观上下文(大盘偏向/指数)", - "rows": 19, + "rows": 24, "readers": [ - "xiaoguo_signal_consumer", "strategy_tree", - "stock_profile", + "batch_reassess", + "per_stock_reassess", "stale_push_wlin", "strategy_lifecycle", + "system_audit", + "xiaoguo_signal_consumer", "divergence_detector", - "system_audit" + "stock_profile" ], "writers": [ "refresh_macro_context" @@ -1271,10 +1347,10 @@ { "name": "macro_raw_news", "desc": "宏观新闻原始数据", - "rows": 8927, + "rows": 9312, "readers": [ - "macro_context_collector", - "system_audit" + "system_audit", + "macro_context_collector" ], "writers": [ "macro_context_collector" @@ -1298,14 +1374,15 @@ { "name": "market_snapshots", "desc": "大盘指数快照(每10分)", - "rows": 567, + "rows": 578, "readers": [ "trend_detector", - "mofin_db", - "prepare_report_data", "market_screener", - "mofin_query", - "system_audit" + "prepare_report_data", + "mofin_db", + "system_audit", + "market_scanner", + "mofin_query" ], "writers": [ "mofin_db" @@ -1333,9 +1410,9 @@ "desc": "多周期均线缓存", "rows": 39, "readers": [ - "technical_analysis", "multi_timeframe", - "mofin_db" + "mofin_db", + "technical_analysis" ], "writers": [ "multi_timeframe", @@ -1364,16 +1441,16 @@ "desc": "总资产/现金/仓位汇总", "rows": 1, "readers": [ - "import_holding_xls", - "preflight_verify", - "mofin_db", + "mo_data", "price_monitor", + "preflight_verify", "prepare_report_data", - "mo_data" + "mofin_db", + "import_holding_xls" ], "writers": [ - "import_holding_xls", - "mofin_db" + "mofin_db", + "import_holding_xls" ], "has_input": true, "has_output": true, @@ -1425,15 +1502,15 @@ "desc": "行业信号(趋势检测产出)", "rows": 653, "readers": [ + "xiaoguo_news_processor", "mofin_news", "trend_detector", - "server", - "xiaoguo_news_processor" + "server" ], "writers": [ + "xiaoguo_news_processor", "mofin_news", - "trend_detector", - "xiaoguo_news_processor" + "trend_detector" ], "has_input": true, "has_output": true, @@ -1458,12 +1535,13 @@ { "name": "sector_snapshots", "desc": "行业板块数据", - "rows": 45700, + "rows": 46570, "readers": [ - "strategy_lifecycle", "trend_detector", "market_screener", - "mofin_db" + "mofin_db", + "strategy_lifecycle", + "market_scanner" ], "writers": [ "mofin_db" @@ -1489,21 +1567,22 @@ { "name": "signal_news", "desc": "信号相关新闻", - "rows": 1090, + "rows": 1106, "readers": [ - "xiaoguo_signal_consumer", "macro_signal_consumer", - "intraday_health_check", "server", - "system_audit" + "intraday_health_check", + "per_stock_reassess", + "system_audit", + "xiaoguo_signal_consumer" ], "writers": [ - "xiaoguo_signal_consumer", + "macro_signal_consumer", + "xiaoguo_news_processor", + "xiaoguo_scanner", "macro_context_collector", "mofin_news", - "xiaoguo_news_processor", - "macro_signal_consumer", - "xiaoguo_scanner", + "xiaoguo_signal_consumer", "divergence_detector" ], "has_input": true, @@ -1559,16 +1638,18 @@ { "name": "stock_daily", "desc": "日线行情", - "rows": 6522, + "rows": 7744, "readers": [ "mofin_db" ], - "writers": [], - "has_input": false, + "writers": [ + "mofin_db" + ], + "has_input": true, "has_output": true, - "orphan": true, - "flow_status": "read_only", - "warn": true, + "orphan": false, + "flow_status": "healthy", + "warn": false, "flow_detail": {} }, { @@ -1596,28 +1677,16 @@ } } }, - { - "name": "stock_monthly", - "desc": "月线行情", - "rows": 647, - "readers": [], - "writers": [], - "has_input": false, - "has_output": false, - "orphan": true, - "flow_status": "orphan", - "warn": true, - "flow_detail": {} - }, { "name": "stock_sectors", "desc": "股票行业映射", - "rows": 62, + "rows": 63, "readers": [ - "mofin_news", - "xiaoguo_news_processor", "trend_detector", + "xiaoguo_news_processor", + "per_stock_reassess", "mofin_db", + "mofin_news", "strategy_lifecycle" ], "writers": [ @@ -1641,31 +1710,21 @@ } } }, - { - "name": "stock_weekly", - "desc": "周线行情", - "rows": 1303, - "readers": [], - "writers": [], - "has_input": false, - "has_output": false, - "orphan": true, - "flow_status": "orphan", - "warn": true, - "flow_detail": {} - }, { "name": "stocks", "desc": "全量股票代码", - "rows": 90, + "rows": 5572, "readers": [ - "mofin_news", "trend_detector", "xiaoguo_news_processor", - "mofin_db" + "mofin_db", + "mofin_news", + "accumulation_scanner", + "import_full_stocks" ], "writers": [ - "mofin_db" + "mofin_db", + "import_full_stocks" ], "has_input": true, "has_output": true, @@ -1690,9 +1749,9 @@ "desc": "策略重评历史记录", "rows": 217, "readers": [ - "verify_reassess_pipeline", + "mofin_db", "system_audit", - "mofin_db" + "verify_reassess_pipeline" ], "writers": [ "mofin_collect" @@ -1746,18 +1805,19 @@ "desc": "自愈任务队列", "rows": 68, "readers": [ - "self_todo_executor", - "morning_health_check", "intraday_health_check", - "strategy-staleness-check" + "strategy-staleness-check", + "self_todo_executor", + "morning_health_check" ], "writers": [ - "preflight_verify", + "strategy-staleness-check", "mofin_collect", - "intraday_health_check", "self_todo_executor", "morning_health_check", - "strategy-staleness-check" + "intraday_health_check", + "preflight_verify", + "cron_health_monitor" ], "has_input": true, "has_output": true, @@ -1786,20 +1846,20 @@ "desc": "自选股列表", "rows": 43, "readers": [ - "per_stock_reassess", - "xiaoguo_signal_consumer", - "mo_alphasift_bridge", - "refresh_mtf_cache", - "trend_detector", - "mofin_db", "mofin_collect", - "stock_quote", + "trend_detector", + "mo_alphasift_bridge", + "run_all_tests", + "stale_detector", "price_monitor", - "xiaoguo_scanner" + "per_stock_reassess", + "refresh_mtf_cache", + "xiaoguo_scanner", + "stale_push_wlin" ], "writers": [ - "per_stock_reassess", - "mofin_db" + "mofin_db", + "per_stock_reassess" ], "has_input": true, "has_output": true, @@ -1823,10 +1883,10 @@ { "name": "xiaoguo_scan_tracker", "desc": "小果扫描跟踪", - "rows": 526, + "rows": 527, "readers": [ - "server", - "xiaoguo_scanner" + "xiaoguo_scanner", + "server" ], "writers": [ "xiaoguo_scanner" @@ -1942,19 +2002,19 @@ { "name": "growth_registry.json", "desc": "", - "size_kb": 1.6, + "size_kb": 1.7, "readers": [], "writers": [], - "last_modified": "07-09 12:45", + "last_modified": "07-10 00:45", "warn": true }, { "name": "hardcode_audit.json", "desc": "", - "size_kb": 3394.4, + "size_kb": 3401.1, "readers": [], "writers": [], - "last_modified": "07-08 17:26", + "last_modified": "07-09 17:26", "warn": true }, { @@ -1996,19 +2056,19 @@ { "name": "macro_risk_state.json", "desc": "宏观风险状态(采集器写入)", - "size_kb": 1.2, + "size_kb": 0.9, "readers": [], "writers": [], - "last_modified": "07-09 13:30", + "last_modified": "07-09 16:00", "warn": true }, { "name": "mofin_health.json", "desc": "健康监控数据", - "size_kb": 82.4, + "size_kb": 85.5, "readers": [], "writers": [], - "last_modified": "07-09 13:15", + "last_modified": "07-10 01:01", "warn": true }, { @@ -2050,28 +2110,28 @@ { "name": "price_events.json", "desc": "", - "size_kb": 112.8, + "size_kb": 121.8, "readers": [], "writers": [], - "last_modified": "07-09 13:30", + "last_modified": "07-09 15:02", "warn": true }, { "name": "price_history.json", "desc": "", - "size_kb": 4.1, + "size_kb": 8.3, "readers": [], "writers": [], - "last_modified": "07-09 13:30", + "last_modified": "07-09 22:52", "warn": true }, { "name": "push_cooldown.json", "desc": "", - "size_kb": 0.6, + "size_kb": 0.9, "readers": [], "writers": [], - "last_modified": "07-08 15:33", + "last_modified": "07-09 14:01", "warn": true }, { @@ -2080,7 +2140,7 @@ "size_kb": 0.1, "readers": [], "writers": [], - "last_modified": "07-09 13:30", + "last_modified": "07-09 15:45", "warn": true }, { @@ -2149,10 +2209,10 @@ { "name": "system_audit_report.json", "desc": "", - "size_kb": 1.8, + "size_kb": 2.0, "readers": [], "writers": [], - "last_modified": "07-08 17:30", + "last_modified": "07-09 17:30", "warn": true }, { @@ -2199,7 +2259,7 @@ "script": "monitor_300308.py", "schedule": "*/2 13-14 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30:51", + "last_run": "2026-07-09T14:58:29", "profile": "position-analyst" }, { @@ -2208,7 +2268,7 @@ "script": "300308_monitor.py", "schedule": "*/2 13-14 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30:52", + "last_run": "2026-07-09T14:58:28", "profile": "position-analyst" }, { @@ -2217,7 +2277,7 @@ "script": "cron_watchdog.py", "schedule": "*/15 9-16 * * 1-5", "status": "error", - "last_run": "2026-07-09T13:15:31", + "last_run": "2026-07-09T16:45:15", "profile": "default" }, { @@ -2235,7 +2295,7 @@ "script": "bot_monitor.sh", "schedule": "every 60m", "status": "ok", - "last_run": "2026-07-09T12:53:59", + "last_run": "2026-07-10T01:00:20", "profile": "default" }, { @@ -2244,7 +2304,7 @@ "script": "cron_to_xmpp.py", "schedule": "* 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:29:53", + "last_run": "2026-07-09T16:59:55", "profile": "default" }, { @@ -2253,7 +2313,7 @@ "script": "cron_to_xmpp.py", "schedule": "*/5 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:25:33", + "last_run": "2026-07-09T16:55:25", "profile": "position-analyst" }, { @@ -2262,7 +2322,7 @@ "script": null, "schedule": "0 * * * *", "status": "ok", - "last_run": "2026-07-09T13:12:45", + "last_run": "2026-07-10T00:12:46", "profile": "default" }, { @@ -2289,7 +2349,7 @@ "script": "xiaoguo_quick_scan.py", "schedule": "*/15 * * * *", "status": "ok", - "last_run": "2026-07-09T13:15:33", + "last_run": "2026-07-10T01:00:18", "profile": "default" }, { @@ -2298,16 +2358,52 @@ "script": "xiaoguo_tunnel_watchdog.sh", "schedule": "*/5 * * * *", "status": "error", - "last_run": "2026-07-09T13:27:47", + "last_run": "2026-07-10T01:02:18", "profile": "default" }, + { + "name": "主力建仓扫描-每15分", + "type": "no_agent", + "script": "accumulation_scanner.py", + "schedule": "*/10 9-15 * * 1-5", + "status": null, + "last_run": "None", + "profile": "position-analyst" + }, { "name": "价格监控-高频", "type": "no_agent", "script": "price_monitor.py", "schedule": "*/2 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:28:01", + "last_run": "2026-07-09T16:58:30", + "profile": "position-analyst" + }, + { + "name": "候选股自动推广-盘中", + "type": "no_agent", + "script": "promote_candidates.py", + "schedule": "0,30 9-15 * * 1-5", + "status": null, + "last_run": "None", + "profile": "position-analyst" + }, + { + "name": "候选股自动提拔-每30分", + "type": "no_agent", + "script": "promote_candidates.py", + "schedule": "*/30 9-15 * * 1-5", + "status": null, + "last_run": "None", + "profile": "position-analyst" + }, + { + "name": "候选股过滤管道-每30分", + "type": "no_agent", + "script": "candidate_filter.py", + "schedule": "*/30 9-15 * * 1-5", + "status": null, + "last_run": "None", "profile": "position-analyst" }, { @@ -2316,7 +2412,7 @@ "script": "mofin_health.py", "schedule": "*/15 9-16,20-22 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:15:28", + "last_run": "2026-07-09T22:45:27", "profile": "position-analyst" }, { @@ -2325,7 +2421,7 @@ "script": "meta_growth.py", "schedule": "45 0,12 * * 1-5", "status": "ok", - "last_run": "2026-07-09T12:45:41", + "last_run": "2026-07-10T00:45:46", "profile": "position-analyst" }, { @@ -2334,7 +2430,7 @@ "script": "cron_health_monitor.py", "schedule": "*/10 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:20:59", + "last_run": "2026-07-09T16:50:53", "profile": "position-analyst" }, { @@ -2343,7 +2439,7 @@ "script": "prune_branches.py", "schedule": "0 21 * * 1-5", "status": "ok", - "last_run": "2026-07-08T21:00:18", + "last_run": "2026-07-09T21:01:03", "profile": "position-analyst" }, { @@ -2352,7 +2448,7 @@ "script": "branch_scanner.py", "schedule": "15,30,45,00 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30:52", + "last_run": "2026-07-09T15:45:53", "profile": "position-analyst" }, { @@ -2361,7 +2457,7 @@ "script": "prepare_report_data.py", "schedule": "0 20 * * 4", "status": "ok", - "last_run": "2026-07-02T20:12:33", + "last_run": "2026-07-09T20:17:38", "profile": "position-analyst" }, { @@ -2369,8 +2465,8 @@ "type": "no_agent", "script": "refresh_mtf_cache.py", "schedule": "0 9,11,14 * * 1-5", - "status": "error", - "last_run": "2026-07-09T11:03:19", + "status": "ok", + "last_run": "2026-07-09T14:00:38", "profile": "position-analyst" }, { @@ -2379,7 +2475,7 @@ "script": "", "schedule": "{'kind': 'cron', 'expr': '*/10 * * * *'}", "status": "ok", - "last_run": "2026-07-09T13:20:54", + "last_run": "2026-07-10T01:02:23", "profile": "default" }, { @@ -2388,7 +2484,7 @@ "script": "refresh_macro_context.py", "schedule": "*/30 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:01:09", + "last_run": "2026-07-09T15:30:17", "profile": "position-analyst" }, { @@ -2397,7 +2493,7 @@ "script": "macro_context_collector.py", "schedule": "*/30 8-16 * * *", "status": "ok", - "last_run": "2026-07-09T13:01:12", + "last_run": "2026-07-09T16:30:55", "profile": "position-analyst" }, { @@ -2406,7 +2502,7 @@ "script": "macro_signal_consumer.py", "schedule": "5,20,35,50 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:20:35", + "last_run": "2026-07-09T15:51:05", "profile": "position-analyst" }, { @@ -2436,40 +2532,13 @@ "last_run": "2026-07-05T10:09:55", "profile": "position-analyst" }, - { - "name": "小果信号消费-盘中", - "type": "no_agent", - "script": "xiaoguo_signal_consumer.py", - "schedule": "0,15,30,45 9-15 * * 1-5", - "status": "ok", - "last_run": "2026-07-09T13:15:25", - "profile": "position-analyst" - }, { "name": "小果市场筛选-全市场", "type": "no_agent", "script": "market_screener.py", "schedule": "35 15 * * 1-5", "status": "ok", - "last_run": "2026-07-08T22:58:17", - "profile": "position-analyst" - }, - { - "name": "小果情感分析", - "type": "LLM", - "script": null, - "schedule": "0 16 * * 1-5", - "status": "ok", - "last_run": "2026-07-08T16:12:11", - "profile": "position-analyst" - }, - { - "name": "小果独立扫描", - "type": "no_agent", - "script": "xiaoguo_scanner.py", - "schedule": "*/5 9-15 * * 1-5", - "status": "ok", - "last_run": "2026-07-09T13:25:45", + "last_run": "2026-07-09T15:35:38", "profile": "position-analyst" }, { @@ -2478,7 +2547,7 @@ "script": "market_watch.py", "schedule": "*/10 9-11,13-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:20:39", + "last_run": "2026-07-09T15:51:15", "profile": "position-analyst" }, { @@ -2487,7 +2556,7 @@ "script": "market_watch.py", "schedule": "0,30 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:00:14", + "last_run": "2026-07-09T16:30:57", "profile": "default" }, { @@ -2496,7 +2565,7 @@ "script": null, "schedule": "0 16 * * 1-5", "status": "ok", - "last_run": "2026-07-08T16:15:43", + "last_run": "2026-07-09T16:10:57", "profile": "position-analyst" }, { @@ -2526,13 +2595,22 @@ "last_run": "2026-07-09T09:50:00", "profile": "position-analyst" }, + { + "name": "批量补全九维分析-一次性", + "type": "no_agent", + "script": "batch_reassess.py", + "schedule": "once at 2026-07-09 23:00", + "status": null, + "last_run": "None", + "profile": "position-analyst" + }, { "name": "持仓情报-盘后", "type": "LLM", "script": null, "schedule": "0 20 * * 1-5", "status": "ok", - "last_run": "2026-07-08T20:16:37", + "last_run": "2026-07-09T20:15:18", "profile": "default" }, { @@ -2541,7 +2619,7 @@ "script": "generate_report.py closing_brief", "schedule": "10 16 * * 1-5", "status": "ok", - "last_run": "2026-07-08T16:15:01", + "last_run": "2026-07-09T16:14:13", "profile": "position-analyst" }, { @@ -2568,7 +2646,7 @@ "script": "collect_evaluation_data.py", "schedule": "30 20 * * 1-5", "status": "ok", - "last_run": "2026-07-08T22:54:44", + "last_run": "2026-07-09T20:30:56", "profile": "position-analyst" }, { @@ -2577,7 +2655,7 @@ "script": null, "schedule": "0 22 * * *", "status": "ok", - "last_run": "2026-07-08T22:36:11", + "last_run": "2026-07-09T22:33:59", "profile": "default" }, { @@ -2586,7 +2664,7 @@ "script": "intraday_health_check.py", "schedule": "*/15 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:15:25", + "last_run": "2026-07-09T15:45:52", "profile": "position-analyst" }, { @@ -2613,7 +2691,7 @@ "script": "market_insight.py", "schedule": "35 15 * * 1-5", "status": "ok", - "last_run": "2026-07-08T15:35:42", + "last_run": "2026-07-09T15:35:27", "profile": "position-analyst" }, { @@ -2622,7 +2700,7 @@ "script": null, "schedule": "0 22 * * *", "status": "ok", - "last_run": "2026-07-08T22:19:31", + "last_run": "2026-07-09T22:18:37", "profile": "default" }, { @@ -2631,7 +2709,7 @@ "script": "hardcode_scanner.py", "schedule": "25 17 * * 1-5", "status": "ok", - "last_run": "2026-07-08T17:26:04", + "last_run": "2026-07-09T17:26:04", "profile": "position-analyst" }, { @@ -2640,7 +2718,7 @@ "script": "strategy_review.py", "schedule": "0 20 * * 1-5", "status": "ok", - "last_run": "2026-07-08T22:54:47", + "last_run": "2026-07-09T20:00:50", "profile": "position-analyst" }, { @@ -2667,7 +2745,7 @@ "script": "stale_detector.py", "schedule": "0 21 * * 1-5", "status": "ok", - "last_run": "2026-07-08T21:21:10", + "last_run": "2026-07-09T21:16:00", "profile": "position-analyst" }, { @@ -2676,7 +2754,7 @@ "script": "review_needed_watchdog.py", "schedule": "0,30 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30:50", + "last_run": "2026-07-09T15:30:15", "profile": "position-analyst" }, { @@ -2694,7 +2772,7 @@ "script": "system_audit.py", "schedule": "30 17 * * 1-5", "status": "ok", - "last_run": "2026-07-08T17:35:21", + "last_run": "2026-07-09T17:37:16", "profile": "position-analyst" }, { @@ -2703,7 +2781,7 @@ "script": "self_todo_executor.py", "schedule": "*/10 8-22 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:30:52", + "last_run": "2026-07-09T22:50:25", "profile": "position-analyst" }, { @@ -2712,7 +2790,7 @@ "script": "relay_knowledge_report.py", "schedule": "10 22 * * *", "status": "ok", - "last_run": "2026-07-08T22:10:46", + "last_run": "2026-07-09T22:10:14", "profile": "default" }, { @@ -2721,7 +2799,7 @@ "script": "stale_push_wlin.py", "schedule": "1,31 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:01:59", + "last_run": "2026-07-09T15:31:31", "profile": "position-analyst" }, { @@ -2729,8 +2807,8 @@ "type": "no_agent", "script": "per_stock_reassess.py", "schedule": "0 9,12,15 * * 1-5", - "status": "error", - "last_run": "2026-07-09T12:02:59", + "status": "ok", + "last_run": "2026-07-09T15:01:32", "profile": "position-analyst" }, { @@ -2784,7 +2862,7 @@ "script": "capital_flow_collector.py", "schedule": "1,31 9-15 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:01:59", + "last_run": "2026-07-09T15:31:18", "profile": "position-analyst" }, { @@ -2793,7 +2871,7 @@ "script": "divergence_detector.py", "schedule": "*/30 8-15 * * *", "status": "ok", - "last_run": "2026-07-09T13:01:03", + "last_run": "2026-07-09T15:30:16", "profile": "position-analyst" }, { @@ -2811,7 +2889,7 @@ "script": "verify_reassess_pipeline.py", "schedule": "*/30 9-16 * * 1-5", "status": "ok", - "last_run": "2026-07-09T13:01:04", + "last_run": "2026-07-09T16:30:53", "profile": "position-analyst" }, {