Commit Graph
100 Commits
Author SHA1 Message Date
jackyu66gitandCursor 6c627f009a docs(ECR-008): record implementation commit in TRACEABILITY
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 15:09:48 +08:00
jackyu66gitandCursor dbb6202325 feat(ECR-008): 拆分主站 chart_tv.js 为多模块薄门面
行为冻结物理拆分;保留 initTradingView/dispose 对外 API;无打包器。node --check 全绿。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 15:09:48 +08:00
jackyu66gitandCursor efad2bb333 docs(ECR-007): archive LOOP-RUN-005 and sync STATE
关门收尾:归档 loop/gate 产物至 docs/runs,同步 CURRENT/MEMORY/PROFILE,并忽略工作目录 .gates/loop。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 15:02:54 +08:00
jackyu66gitandCursor 2964d6f230 docs(ECR-007): mark LOOP-RUN-005 DONE after Final Approval
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 03:20:39 +08:00
jackyu66gitandCursor 7991a6b2bf docs(ECR-007): record implementation commit in TRACEABILITY
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 03:14:19 +08:00
jackyu66gitandCursor 276481e02c feat(ECR-007): Wyckoff Live Structure with Confirmed/Live isolation
Add live.py lifecycle and event candidates; assemble confirmed vs live
in engine; Summary partition; execution_signal source=confirmed only.
Keep strategies untouched; do not lower Confirmed thresholds for Live.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 03:14:19 +08:00
jackyu66gitandCursor 1e60ab3bfa docs: 补强 ECR-004 CODE_REVIEW 复审记录
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:47:18 +08:00
jackyu66gitandCursor d3188ca83c fix: ECR-004 威科夫区间评分硬化与 VP 绘图减负(已审)
评分选 TR、阶段最小跨度、elements_only 门闩、Top-8 VP;无币种独立参数。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:46:08 +08:00
jackyu66gitandCursor ac6be80278 docs: 开启 ECR-004 威科夫硬化与 VP 减负(Draft)
跟进 ECR-003 Review Findings;待 Approve 后实现。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:35:25 +08:00
jackyu66gitandCursor 081a57a90e feat: ECR-003 主站威科夫分析与图表叠层(已审)
独立 wyckoff 引擎 + 按需 include_wyckoff;主站 Lightweight 绘制区间/阶段/事件/VP。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:33:57 +08:00
jackyu66gitandCursor df27b4dde8 refactor: ECR-002 拆分 runtime 包并加深 analyze 契约(已审)
将 web/services/runtime.py 拆为 runtime/ 子模块并保持门面兼容;补齐 ESS 文档、门面/契约/TF_DF 测试与 CODE_REVIEW Approve。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:15:23 +08:00
jackyu66gitandCursor 9f1e7361b6 fix: 修复主站自动刷新内存泄漏,并完善 chan_tv 图表体验
主站重建前完整 dispose、去掉重复 sync 监听,自动刷新默认增量更新;顺带消除首屏重复 analyze、复用 ChanMACD,以及全版 TV 指标/未完成中枢/布局本地缓存。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 16:09:48 +08:00
jackyu66gitandCursor 6b0f3b5837 release: 发布系统版本 v1.0.0(ECR-001)
落盘 CODE_REVIEW Approve 与 RELEASE_REPORT,标记首个正式 release。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:53:04 +08:00
jackyu66gitandCursor 74dec4e50b refactor: 缠论引擎包化与 Web 分层(ECR-001)
将根目录引擎迁入 chanlun/ 并保留兼容 shim;拆分 TF_DF 与 web 服务;
前端模块化;strategies 改用 chanlun 导入;补充 ESS 文档与 golden 回归。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:48:20 +08:00
jackyu66gitandCursor e2e45bc1bc chore: 移除不再使用的 ChanMacro、system、tests。
这些目录已废弃,从仓库中清理。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:11:29 +08:00
jackyu66gitandCursor f2e77e1bdb chore: 将 data_provider 拆出为独立仓库。
数据服务已迁移至 jack/data_provider,不再随 chan 维护。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:10:29 +08:00
jackyu66gitandCursor b31215057e chore: 将 bsp_monitor 拆出为独立仓库。
监控服务已迁移至 jack/bsp_monitor,不再随 chan 维护。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:09:43 +08:00
jackyu66git 7b91f459d7 scheduler: auto-detect new signals once per day, deduplicate existing
- scheduler tick runs detect after fetch+score (once per UTC day)
- ChanSignalDetector skips already-recorded signals
- Prevents duplicate signal_features entries on repeated runs
2026-06-24 19:19:40 +08:00
jackyu66git 3c72aa1310 chan_integration: auto-detect BSP signals from daily+4h Chan pipeline
- ChanSignalDetector: runs TF_DF pipeline on historical OHLCV
- Extracts B1/B2/B3/S1/S2/S3 with entry price, date, signal grade
- Populates signal_features via SignalTracker with forward outcomes
- CLI: python main.py detect --from 2024-01-01
- 15 signals detected (5 daily + 10 4h), all directionally correct
- Expectancy API now returns real conditional probabilities
2026-06-24 19:19:11 +08:00
jackyu66git 8d916371e2 backfill: historical breadth + regime computation from TOP50 OHLCV
- Step 1: fetch BTC OHLCV
- Step 2: fetch TOP50 daily data → compute breadth per date → store breadth_daily
- Step 3: compute Price/Breadth/OI/Vol → detect regime → store regime_history
- 175 days backfilled (2026-01-01 to 2026-06-24)
2026-06-24 18:37:20 +08:00
jackyu66git 7e19c9858e scheduler: auto fetch+score every 60min, integrated into web and CLI 2026-06-24 18:35:47 +08:00
jackyu66git efb721b39f fix: persist regime to DB in shared _build_state, deduplicate save logic
- _build_market_state (CLI) now saves regime_history automatically
- _build_state (web) now saves regime_history automatically
- Remove duplicate regime save from cmd_score
- Remove unused imports (timedelta, get_connection)
- Fix: web dashboard never updated regime_history table
2026-06-24 18:31:00 +08:00
jackyu66git 7813e319b4 web: professional trading-terminal redesign — dark theme, chart grid, progress bars 2026-06-24 18:28:40 +08:00
jackyu66git f391020f78 web: fix dark theme readability — explicit bright colors for all factor values 2026-06-24 18:27:41 +08:00
jackyu66git 0ba5b3bd71 chanmacro: add web dashboard (Flask + Chart.js, port 8124)
- /api/state: current market state with all factor scores
- /api/history: regime + breadth history for charts
- /api/expectancy: signal expectancy query
- Bootstrap 5 + Chart.js dark theme, Chinese UI
- Factor cards, regime timeline, breadth chart, expectancy table
2026-06-24 18:25:33 +08:00
jackyu66git 50a609f7b9 chanmacro: connect to production provider, fix Breadth symbol list and regime crash
- Change provider_url to https://provider.jackyu66.com
- Update top50_symbols to match provider's actual 20 symbols
- Fix cmd_score crash: all_scores keys are already strings, not enums
- Add .gitignore to exclude data/ directory
2026-06-24 18:23:27 +08:00
jackyu66git 48e69179b3 data_provider: add /api/derivatives endpoint documentation 2026-06-24 17:47:42 +08:00
jackyu66gitandClaude 71951019fb chanmacro: Signal Expectancy Engine V1 — Market Memory System
Phase A-C complete: 4 core factors, regime detection, signal tracking, Bayesian expectancy.

chanmacro/ (32 files, ~4000 lines):
- models: 12 enums + 15 Pydantic v2 models (DateAwareModel, MarketStateVector, etc.)
- fetchers: OHLCV + Breadth (from data_provider) + Derivatives (new endpoint)
- scoring: Price Structure / Breadth (quantile buckets) / OI Matrix (5 discrete states) / Volatility Regime
- regime_detector: 3-state (TREND/RANGE/PANIC), factor-locked (Price+Breadth+Vol), versioned, 2-day confirmation
- expectancy: SignalTracker (record+outcomes), TimeDecay (half-life=180d), BayesianExpectancyEngine (Empirical Bayes, Leveled, SufficiencyGuard)
- validation: FactorValidator (IC/ICIR/Hit Ratio), RegimeValidator (MI/KL/ANOVA), TransitionValidator (stability)
- CLI: fetch|score|regime|track|backfill|expectancy|validate|serve
- tests: 52 passing (models, scoring, regime, expectancy)

data_provider:
- /api/derivatives endpoint: funding rate, OI, OI change, basis
- _derivatives storage: same persist pattern as K-line (merge→lock→snapshot→atomic write)
- background refresh every 60s

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-24 17:44:55 +08:00
jackyu66git e1116edb7b 更新了本地数据拉取 2026-05-26 14:49:31 +08:00
jackyu66gitandClaude Opus 4.7 8bc23c0507 notify: 移除持久化去重,BSP 由新笔确认驱动不重复
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:46:10 +08:00
jackyu66gitandClaude Opus 4.7 c75d5e11fc notify: Telegram token/chatid 直接硬编码
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:45:41 +08:00
jackyu66gitandClaude Opus 4.7 8eb50e3eae bsp_monitor: 多周期 BSP 推送 (1m/5m/15m/1h),中枢监控代码保留但暂停
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:42:53 +08:00
jackyu66gitandClaude Opus 4.7 42296ef971 refactor: BSP推送提取公共函数 + 清理
- _push_bsp() 提取重复的key构造+推送逻辑
- bsp.klc None防护
- getattr替代hasattr+属性访问
- 修正首轮日志(不再写"不推送")

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:05:20 +08:00
jackyu66gitandClaude Opus 4.7 a84a80cb62 Revert: BSP独立跟踪confirmed[-1],不与中枢监控耦合
B1/B2依赖中枢存在,不能等中枢更新才查BSP。
保持独立bi_id跟踪confirmed[-1]变化,分型确认时即查BSP。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:02:07 +08:00
jackyu66gitandClaude Opus 4.7 63787b173a fix: 新笔确认即查BSP(反向二类分型触发),首轮也查confirmed[-1]
笔被反向二类分型确认时is_sure=True,不需要等下一笔。
- 跟踪confirmed[-1]变化→查新确认那笔自身的BSP
- 首轮也查confirmed[-1],避免漏掉监控启动前刚确认的BSP

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 13:59:02 +08:00
jackyu66gitandClaude Opus 4.7 07f079067f fix: 跟踪confirmed[-1],新笔确认时查上一轮confirmed[-1]的BSP
以前跟踪bi_list[-1](含未确认)导致时序不对。
现在跟踪confirmed[-1]的稳定ID,变化时在bi_list中精确定位
上一轮的那笔,查其end_klc是否为BSP。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 13:55:48 +08:00
jackyu66gitandClaude Opus 4.7 ae4c79c133 fix: BSP检测用last_bi_id精确定位旧笔,替代confirmed[-2]索引
管线重算后笔列表可能变化,confirmed[-2]不一定是刚结束的笔。
改为用上一轮的last_bi_id在当前bi_list中精确查找,
找到后再检查其end_klc是否为BSP。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 13:35:20 +08:00
jackyu66gitandClaude Opus 4.7 743c5d342e fix: review修复 — 补回last_df_ts、枚举替换魔数、移除死代码
- SymbolState 补回 last_df_ts,无效新K线时跳过管线
- _bi_id 添加 start_klc None 防护
- last_bi.dir.value == 1 改为 Chan_BI_DIR.UP 枚举比较
- notify.py 移除未使用的 register_bsp_keys

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 12:56:17 +08:00
jackyu66gitandClaude Opus 4.7 78d02cf2ef refactor: BSP检测改为新笔驱动,不再逐tick对比BSP列表
- 用 last_bi_id (start_klc.start_time) 跟踪最后一笔
- 新笔确认时检查上一笔终点是否为 BSP → 推送
- 中枢更新同样在新笔产生时触发
- 移除时间过滤、BSP列表diff、持久化去重等冗余逻辑
- 无新笔时快速跳过,tick从40s降到15s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 12:52:36 +08:00
jackyu66gitandClaude Opus 4.7 cf9097a540 fix: zs_id 使用稳定时间戳替代 DataFrame 位置索引
_make_zs_id 原来用 start_klc.index,每次新K线导致 index 偏移,
monitor 误判为新中枢,每 tick 都推送。改为 start_klc.start_time,
时间戳不随 DataFrame 窗口偏移变化。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 12:07:58 +08:00
jackyu66gitandClaude Opus 4.7 881c9d5eac bsp_monitor: 支持全部20个币对 + 数据源切换至data_provider + Python 3.9兼容
- fetcher.py: 数据源从CCXT改为data_provider HTTP API,新增get_symbols()自动获取所有币对
- main.py: 重构为多币对架构,每个币对独立SymbolState(pivot_monitor/BSP去重/首轮抑制)
- engine.py: format_bsp_detail()支持动态币对名
- ChanPivotMonitor/Classifier: 修复Python 3.9类型注解兼容(X|None → Optional[X])
- 首轮初始化时不推送中枢和BSP,避免启动时20条消息轰炸

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 11:55:23 +08:00
jackyu66gitandClaude Opus 4.7 b1cbdca707 ChanPivotMonitor: 实时中枢特征跟踪 + Telegram推送
- ChanPivotClassifier: 提取 calc_duration/contraction/shift 为 @staticmethod,新增 compute_features()
- ChanPivotMonitor: 实时追踪当前中枢,bi_count 增长时重新计算 shift/contraction/duration
- bsp_monitor/fetcher: 改用 data_provider HTTP API 替代直连 CCXT
- bsp_monitor/notify: 新增 send_telegram_message() 通用推送
- bsp_monitor/main: 集成 ChanPivotMonitor,有新笔或 BSP 时推送到 Telegram

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 11:35:09 +08:00
jackyu66gitandClaude Opus 4.6 5ad761fad4 添加 ChanPivotClassifier: 中枢结构特征提取 + 标签化
Phase 1 训练数据集构建工具,从笔中枢提取 3 特征 (duration_norm, contraction, shift_norm) + 1 标签 (break_direction)。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-25 18:33:56 +08:00
jackyu66git 9eae12f07d 修改了一点 2026-05-20 02:02:53 +08:00
jackyu66git 9b876c45ed 修改了bsp state,继续测试 2026-05-20 00:49:53 +08:00
jackyu66git 91148a648a 添加新的策略 2026-05-19 09:58:33 +08:00
jackyu66git bc085171f4 添加新策略用第三类买卖点 2026-05-17 14:54:00 +08:00
jackyu66git 050ebeb849 添加tradingview advanced chart lib和实现chan_tv网页 2026-05-14 14:16:06 +08:00
jackyu66gitandClaude Opus 4.6 ebcb3dce73 添加 StructureZone 结构价值区系统,支持多周期支撑/阻力分析
- 新增 ChanZone.py: 从笔中枢/线段中枢/EMA52 提取价格区,聚类评分
- ChanLun.py 新增 get_structure_zones() 方法
- web/app.py: 独立拉取多周期数据 + 缓存 + limit 传参避免全量传输
- web/index.html: 结构区勾选框 + K线数量输入 + 半透明填充区绘制
- tests/test_chan_zone.py: 24 个单元测试

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-12 01:31:56 +08:00
jackyu66gitandClaude Opus 4.6 d8069e977f 添加 CLAUDE.md,为 Claude Code 提供项目指引
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-06 09:52:05 +08:00
jackyu66git 3f68a8305a 修改了一点 2026-05-03 15:43:56 +08:00
jackyu66git deeea55237 ignore update 2026-05-02 02:12:46 +08:00
jackyu66git 5ab69c2a64 更新data_provider逻辑,能够更快开始提供服务,添加说明 2026-05-01 17:13:24 +08:00
jackyu66git 425d513a37 修改笔中枢第三类卖卖点识别,识别好后直接完成笔中枢 2026-04-30 15:20:37 +08:00
jackyu66git 8ff1515f8b 改了ema的颜色 2026-04-24 10:13:30 +08:00
jackyu66git d8e3cdd9e9 修改小周期笔无法显示bug 2026-04-16 23:53:40 +08:00
jackyu66git 04d8f73b94 修正了刷新图表缩放和位置不变的bug 2026-04-16 02:31:48 +08:00
jackyu66git 7815eada00 添加动能理论,修改klc整体显示 2026-04-10 13:01:07 +08:00
jackyu66git 957ef62407 修改bug 2026-04-08 01:27:57 +08:00
jackyu66git 3fbcc354d8 去掉trim data,修改check_fx回去 2026-04-06 01:02:42 +08:00
jackyu66git ee9b573762 添加macd周期参数设置 2026-04-05 19:12:31 +08:00
jackyu66git c17539a7a5 web端进行优化,减少内存开销,data provider提供websocket服务 2026-04-05 18:24:08 +08:00
jackyu66git 2bf9fe5825 添加中枢延续 2026-04-05 17:55:09 +08:00
Porter 6a6d24f601 添加中枢识别在klc和笔 2026-04-05 11:43:30 +08:00
jackyu66git ea317fb6f9 增加了新的笔中枢,但是还是线段的好些 2026-04-02 15:29:15 +08:00
jackyu66git 6538982d24 添加识别klc_state,macd参数调整
macd调整为26,52
顶底之间间隔7个klc
2026-04-01 11:11:51 +08:00
jackyu66git b6b6cb94c0 添加波浪理论和klc状态识别 2026-03-31 01:07:18 +08:00
jackyu66git 89269198a0 添加None确认 2026-03-24 16:33:49 +08:00
jackyu66git cc9dc1f79f 终于搞定中枢了 2026-03-24 01:24:34 +08:00
jackyu66git 2b10c889bc 添加分型确认 2026-03-21 01:40:25 +08:00
jackyu66git 0bc36e066f 添加识别中继分型 2026-03-20 18:39:02 +08:00
jackyu66git f1b0daa55f 添加次次周期显示按钮 2026-03-16 16:26:14 +08:00
jackyu66git e61af7b1a8 添加了次次周期的显示 2026-03-15 17:07:15 +08:00
jackyu66git 1c17cf1f11 添加分型识别 2026-03-14 02:03:27 +08:00
jackyu66git aeced3c618 找到klc生成bug 2026-03-13 01:21:33 +08:00
jackyu66git 72196329d1 增加缠论说明,优化线段中枢 2026-03-12 17:20:57 +08:00
jackyu66git ea47bfe9b7 中枢终于画对了,可以交易了 2026-03-11 11:33:21 +08:00
jackyu66git 5226c551d5 修改了线段中枢逻辑 2026-03-11 03:08:10 +08:00
jackyu66git 1c099be23e 添加移除fillna警告提示 2026-03-06 22:21:11 +08:00
jackyu66gitandGitHub 512da40c96 Merge pull request #11 from jackyu66git/dev
添加新的策略
2026-03-06 22:09:04 +08:00
jackyu66git d2107db6c0 添加新的策略 2026-03-06 22:08:24 +08:00
jackyu66gitandGitHub 7376675e1c Merge pull request #10 from jackyu66git/dev
添加识别笔破坏
2026-02-28 19:29:27 +08:00
jackyu66git d8f2269a49 添加识别笔破坏 2026-02-28 19:27:36 +08:00
jackyu66gitandGitHub 57464f4de6 Merge pull request #9 from jackyu66git/dev
本地测试和本地实盘测试分开配置,需要加载startup candles才能得到ema26和ema52数据
2026-02-27 12:10:43 +08:00
jackyu66git a7ab32133b 本地测试和本地实盘测试分开配置,需要加载startup candles才能得到ema26和ema52数据 2026-02-27 12:10:05 +08:00
jackyu66gitandGitHub 041db0dea5 Merge pull request #8 from jackyu66git/dev
添加ema26和ema52交叉策略,今年可以,还需要再看看细节
2026-02-26 17:45:43 +08:00
jackyu66git eb039e9987 添加ema26和ema52交叉策略,今年可以,还需要再看看细节 2026-02-26 17:45:04 +08:00
jackyu66gitandGitHub 29ee73b244 Merge pull request #7 from jackyu66git/dev
添加.config.json文件
2026-02-24 20:53:34 +08:00
jackyu66git ba639901e8 添加.config.json文件 2026-02-24 20:52:53 +08:00
jackyu66gitandGitHub 5a13e0c916 Merge pull request #6 from jackyu66git/dev
Dev
2026-02-24 20:31:29 +08:00
jackyu66git 59afabb5cf 添加新的时间周期 2026-02-24 20:30:10 +08:00
jackyu66git 377f23a9ec 添加新的bb2633,笔识别改回去了 2026-02-24 01:01:19 +08:00
jackyu66gitandGitHub c6886e239a Merge pull request #5 from jackyu66git/dev
修改了笔形成方式,现在顺畅多了,接下来实现缠论中多级别顶底分型和笔趋势形成原理的买卖点(1,0),(-1,0),(1,1),(-1,1)来判断
2026-02-22 14:26:24 +08:00
jackyu66git 85609d2758 修改了笔形成方式,现在顺畅多了,接下来实现缠论中多级别顶底分型和笔趋势形成原理的买卖点(1,0),(-1,0),(1,1),(-1,1)来判断 2026-02-22 14:25:59 +08:00
jackyu66gitandGitHub 6f55641477 Merge pull request #4 from jackyu66git/dev
添加三类买卖点识别和图上标注,还不错,感觉可以赚钱了,明天继续优化一下
2026-02-20 01:38:39 +08:00
jackyu66git 01e71b7098 添加三类买卖点识别和图上标注,还不错,感觉可以赚钱了,明天继续优化一下 2026-02-20 01:37:39 +08:00
jackyu66gitandGitHub e483140bdb Merge pull request #3 from jackyu66git/dev
Dev
2026-02-19 00:45:20 +08:00
jackyu66git e2726db9c1 添加一个新的厕率 2026-02-19 00:44:53 +08:00
jackyu66git d76e9d47a6 修改了分型,笔,笔中枢方式,添加三类买卖点的识别 2026-02-16 02:18:01 +08:00
jackyu66gitandGitHub 5cab039956 Merge pull request #2 from jackyu66git/dev
禁止warning
2026-02-13 13:08:45 +08:00