Skip to content

Feat/otc fund support - #7

Open
vickingwu wants to merge 49 commits into
jorben:masterfrom
vickingwu:feat/otc-fund-support
Open

Feat/otc fund support#7
vickingwu wants to merge 49 commits into
jorben:masterfrom
vickingwu:feat/otc-fund-support

Conversation

@vickingwu

Copy link
Copy Markdown

No description provided.

vickingwu added 30 commits June 3, 2026 13:09
- 数据层由 Tsanghi 替换为免费 AkShare(新浪主源/东财兜底,带磁盘缓存)

- 去头部/水印/底部,首页精简,支持个股,统一标的名称,去分享按钮

- 修复编辑参数500、回测网格区间对齐(0成交)、回测说明动态文案

- 性能优化(全量历史缓存+名称表磁盘缓存)

- 首页支持分析前自定义网格参数

- 生产模式后端托管前端(单端口),新增 start.bat/start.command 一键启动
vickingwu and others added 19 commits June 23, 2026 14:07
Remove category and trade-count columns from the MA screener results table to reduce crowding (category filter chips remain); change per-row action link text from '详细回测' to 'more'.
场外(开放式)基金代码为6位数字,与场内个股/ETF/指数代码空间重叠
(如 000001 既是上证指数也是多只场外基金),无法从代码本身区分。
约定在代码开头或结尾加字母 F/O 作为标记,例如 F007339 / 007339F。
仅当剥离标记后剩余恰为6位数字时才判定为场外基金,避免误伤美股纯字母代码。

后端:
- helper: 新增 parse_otc_marker / resolve_ticker,统一解析标记 + 判定市场
- data_service: 识别 type=FUND;新增开放式基金净值取数
  (fund_open_fund_info_em 单位净值走势),净值填充 OHLC、volume=0;
  新增基金名称表 (fund_name_em) 内存+磁盘长缓存;基金直接用日线净值做回测K线
- etf_analysis_service / backtest_service: 贯通 sec_type_hint;
  基金手续费按 ETF 口径(不套用个股最低5元佣金)
- suitability_analyzer: 修复零成交量导致成交量变异系数为 NaN
  (会使响应 JSON 序列化非法,网格分析失败)
- routes: 网格分析 / 均线回测 / 标的信息三个入口改用 resolve_ticker

前端:
- 各代码输入框 maxLength 6→7,补充"场外基金加F"提示与占位符
- validateETFCode 与分析页路由正则放宽到7位
  (原先卡在6位导致 /analysis/F007339 无法解析)
- 重新构建并同步 static/

实测 F007339(易方达沪深300ETF联接C):
均线回测 SMA20 覆盖 1590 个交易日正常;网格分析 + 网格回测正常
(区间收益 4.29%、超额 4.11%、37 笔交易、胜率 76%)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant