Releases: kunkundi/niuone
Release list
NiuOne v0.0.12 — 退出反馈闭环与候选监控升级 / Exit Feedback Loop and Candidate Monitoring Upgrade
中文
NiuOne v0.0.12 聚焦于牛牛持仓管理、卖后反馈闭环、模拟账户一致性和日内候选可观测性。本版本新增可选的持仓快周期,将非结构性退出统一为分段软退出并持续记录 1/3/5/10 个交易日的卖后结果;在受约束参数网格、样本门槛和自动回退保护下,默认启用五日卖后反馈调参。同时新增“今日候选”监控视图,强化成交账本对账、回测复用、通知可读性、容器资源边界和模型失败恢复。
主要更新
- 持仓快周期与统一仓位上限:新增默认关闭的持仓快周期,可在 60~900 秒范围内仅重评当前持仓,并继续复用完整扫描的策略评分、盘面总结、模型决策、SELL 优先和成交风控;快周期不会发现或首次买入新股票,BUY 只允许对执行时仍存在的仓位加仓。牛牛模型提示、剩余槽位、满仓换仓、最终成交复核、管理员回测和严格前向证据统一使用
DASHBOARD_MAX_OPEN_POSITIONS。 - 分段软退出与卖后观察:普通未兑现、卖出评分、题材/行业转弱和盈利回撤改为先减仓 50%,至少等待下一交易日确认后再清余仓;4~5 分卖飞评分可否决首日软退出,结构止损、主线失活和市场硬停止仍即时执行。满仓换仓要求至少 3 分优先级优势,SQLite 按每笔 SELL 持久更新 1/3/5/10 日 MFE、MAE、收盘/基准超额和换仓相对收益;软退出清仓后的五日影子观察只有在价格、量能和原题材逻辑全部恢复时才允许完整扫描重开。
- 受约束的退出反馈闭环:未显式配置的部署默认启用五日卖后自动调参,设置
DASHBOARD_EXIT_FEEDBACK_AUTO_TUNE_ENABLED=0仍可关闭。反馈 v2 只使用最近 120 个有效样本,同股同日成交按簇去重、按成交资金加权,并要求 90% 置信区间越过最小经济效果;至少 30 个有效样本簇、覆盖 3 个月且每新增 10 个样本后,每次最多移动一个预声明档位。只有软退出确认/减仓比例、换仓优势和卖后再入门槛可变,结构止损、T+1、仓位和全部组合风险冻结;显著恶化的版本自动回退。模拟交易页在首次盘后复盘前也会显示学习、等待或关闭状态。 - 成交账本与账户收益一致性:自动退出增加执行占用和幂等保护,避免重叠周期重复卖出;日收益从耐久成交和交易日边界重新对账,日内权益曲线从已校验账本与真实现金/持仓重建,不再让过期账户快照或不完整缓存覆盖真实记录。加载账户时会与 SQLite 的活动反馈版本对账,跨文件提交中断后仍以耐久状态恢复。
- 今日候选监控与并发扫描收敛:Dashboard 新增“今日候选”页面,汇总当天各轮进入可交易候选池的股票,展示当前仍有效数量、策略筛选、排序、状态变化、分数指标和有界分时图;390px 与 320px 移动端同步优化。重叠的 Practice 扫描会复用正在运行的同一任务,避免重复模型调用和账户竞争。
- 回测、设置与模型恢复:管理员回测增加确定性选股回放缓存,可查看占用并按需清理;命中缓存时跳过重复的题材截面重建和评分,写入失败则保留本轮内存结果并明确降级。设置页恢复独立分组渲染;模型流式输出因长度截断时执行一次有界的完整响应重试,仍失败则保留可诊断错误。
- 富通知与运行资源边界:飞书使用可分片的结构化交互卡片,钉钉和企业微信使用 Markdown,Telegram 使用安全 HTML,并保留更完整的模拟成交原因。Docker 构建减少临时缓存占用,Compose 为 Dashboard、Scheduler 和 NewsNow 增加日志轮转边界;发布文档明确功能变更验证后必须重新构建受影响服务。
- 移除美股机构评级模块:Dashboard 的美股机构评级页面、FMP 评级/目标价配置、报告入口和相关兼容层已移除,隔夜美股摘要及其他市场、消息和模拟交易能力不受影响。
安全与兼容性
DASHBOARD_EXIT_FEEDBACK_AUTO_TUNE_ENABLED的默认值为1。不希望自动学习的部署应在升级前或下一次盘后复盘前显式设置为0;样本门槛、有界网格、自动回退和冻结风控不会被该开关绕过。- 牛牛同时持仓上限现在跟随
DASHBOARD_MAX_OPEN_POSITIONS,默认值为 6;单票/主题/组合风险、主题敞口、总仓、现金、涨停、结构止损和 T+1 继续在成交层复核。 - 严格前向证据升级为
niuone-strict-forward-v47,管理员回测升级为niuone-backtest-v40,新队列从2026-08-31开始。部署前应归档旧协议锁、报告和回测结果,不得与 v0.0.11 及更早协议证据混算。 - 旧的 FMP 评级环境变量和
/us-ratings页面不再生效;升级后无需迁移评级缓存,隔夜美股摘要配置保持原语义。 - 账户修复和收益对账优先保留耐久成交、现金与持仓,不使用不完整推导结果重写真实历史。所有外部行情、模型和通知路径继续采用有界超时、重试、并发和消息大小限制。
- 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 1512 项自动化测试完成(1511 通过,1 项按条件跳过)。
- Python、Dashboard JavaScript、Vue 生产构建、Shell 与 Windows BAT 检查通过。
- GitHub Actions 主分支 CI、发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.12 focuses on holding management, a post-exit feedback loop, consistent simulated-account accounting, and observable intraday candidates. This release adds an optional holdings-only fast cycle, unifies non-structural exits under a staged policy, and persists 1/3/5/10-session post-exit outcomes. Five-session feedback tuning is now enabled by default behind bounded parameter grids, evidence gates, and automatic rollback. It also introduces a Today's Candidates monitoring view and improves ledger reconciliation, backtest reuse, notification readability, container resource bounds, and model-failure recovery.
Highlights
- Holding fast cycle and one position ceiling: A disabled-by-default fast cycle can re-evaluate current holdings every 60–900 seconds while retaining the complete scan's strategy scoring, market summary, model decision, exit-first ordering, and execution controls. It cannot discover or open a new symbol; BUY is add-only for a position that still exists at execution. NiuOne prompts, free-slot calculation, full-book replacement, final execution checks, administrator backtests, and strict-forward evidence now share
DASHBOARD_MAX_OPEN_POSITIONS. - Staged soft exits and post-exit observations: Ordinary no-progress, sell-score, theme/sector weakening, and profit-giveback exits trim 50% first and wait for a later-session confirmation before closing the runner. A 4–5 sell-fly score may veto the first soft-exit session, while structural stops, inactive themes, and market hard stops remain immediate. Full-book replacement requires at least a three-point priority advantage. SQLite durably refreshes MFE, MAE, close/benchmark excess, and replacement-relative returns at 1/3/5/10 sessions after every SELL. A five-session shadow watch after a staged full close permits reopening from a complete scan only after price, volume, and the original theme thesis recover.
- Bounded exit-feedback loop: Deployments without an explicit setting now enable five-session post-exit tuning by default;
DASHBOARD_EXIT_FEEDBACK_AUTO_TUNE_ENABLED=0opts out. Feedback v2 uses only the latest 120 valid observations, clusters same-security/same-day fills, weights by executed capital, and requires 90% confidence intervals to clear minimum economic effects. After at least 30 valid clusters spanning three months, and then every ten new samples, one evaluation can move at most one declared grid step. Only soft-exit confirmation/trim behavior, replacement advantage, and post-exit re-entry gates can change; structural stops, T+1, position limits, and every portfolio-risk boundary remain frozen. Materially worse versions roll back automatically, and the Practice page shows learning, waiting, or disabled state even before the first post-close review. - Ledger and account-return consistency: Automatic exits now use execution claims and idempotency protection so overlapping cycles cannot sell the same position twice. Daily P&L is reconciled from durable fills and trading-day boundaries, while the intraday equity curve is rebuilt from the verified ledger plus actual cash and positions instead of stale account snapshots or incomplete caches. Account loads reconcile the active SQLite feedback version, preserving durable state after an interrupted cross-file commit.
- Today's Candidates monitoring and converged scans: The Dashboard adds a Today's Candidates page that combines stocks admitted to the trade-ready pool across all scans, including the currently active count, strategy filters, sorting, state transitions, score metrics, and bounded intraday charts. The 390px and 320px mobile layouts are covered as well. Overlapping Practice scans join the same running task, avoiding duplicate model requests and account contention.
- Backtesting, settings, and model recovery: Administrator backtests gain a deterministic selection replay cache with usage and clear controls. A cache hit skips repeated theme-cross-section reconstruction and scoring, while a persistence failure retains the current in-memory replay and reports an explicit degraded state. The settings page restores independent group rendering. When a streamed model response is truncated by its length limit, one bounded complete-response retry is attempted and any remaining failure stays diagnosable.
- Rich notifications and runtime resource bounds: Feishu uses chunkable structured interactive cards, DingTalk and WeCom use Markdown, and Telegram uses safe HTML, while more complete simulated-trade reasons are preserved. Docker builds reduce temporary cache use, and Compose applies log-rotation bounds to the Dashboard, Scheduler, and NewsNow. Release guidance now requires affected services to be rebuilt after functional validation.
- U.S. ratings removal: The Dashboard U.S. analyst-ratings page, FMP rating/price-target settings, report entrypoints, and compatibility layer have been removed. Overnight U.S. summaries and other market, messaging, and simulated-trading features are unaffected.
Safety and compatibility
DASHBOARD_EXIT_FEEDBACK_AUTO_TUNE_ENABLEDnow defaults to1. Deployments that do not want automatic learning should explicitly set it to0before upgrading or before the next post-close review. The switch cannot bypass sample gates, bounded grids, automatic rollback, or frozen risk controls.- NiuOne's concurrent-holding ceiling now follows
DASHBOARD_MAX_OPEN_POSITIONS, whose default is 6. Per-name/theme/portfolio risk, theme exposure, gross exposure, cash, price-limit, structural-stop, and T+1 checks remain enforced at execution. - Strict-forward evidence advances to
niuone-strict-forward-v47, administrator backtests advance toniuone-backtest-v40, and the new cohort begins on2026-08-31. Archive older protocol locks, reports, and backtest results before deployment; do not pool evidence from v0.0.11 or earlier protocols. - Legacy FMP rating environment variables and the
/us-ratingspage no longer take effect. No ratings-cache migration is required; overnight U.S. summary settings retain their previous meaning. - Account repair and return reconciliation prefer durable fills, cash, and holdings and never use an incomplete derived result to rewrite real history. External market-data, model, and notification paths retain bounded timeouts, retries, concurrency, and message-size limits.
- NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 1512 automated tests completed (1511 passed and 1 conditionally skipped).
- Python, Dashboard JavaScript, the Vue production build, Shell, and Windows BAT checks passed.
- GitHub Actions main-branch CI, release validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.11...v0.0.12
NiuOne v0.0.11 — 分阶段加仓与数据韧性升级 / Staged Adds and Data Resilience Upgrade
中文
NiuOne v0.0.11 聚焦于牛牛分阶段仓位管理、行情数据韧性、模拟账户持久化和长期部署可靠性。本版本解除牛牛试仓每日候选与同题材持仓的固定数量上限,修正共享盘面上下文对牛牛容量的干扰,将试仓上限提高到 10%,并由本地生命周期规则确定性生成 10%/20% 分级加仓;同时为 FMP 评级和 A 股日 K 增加有界分页与多源降级,确保账户规范状态先于 SQLite 投影提交,并改善停机恢复后的持仓日期、资金流刷新、移动端导航和容器数据卷运维说明。
主要更新
- 牛牛容量与分阶段加仓:牛牛试仓不再限制每日最多 2 个候选,也不再按同板块或同题材最多 2 只持仓硬截断;共享盘面上下文中的午盘持仓数和保留名额明确只作用于非牛牛策略。牛牛试仓绝对上限提高到 10%,轮动状态的试仓单笔权益风险和单主题风险提高到 1%。持仓满足跨日主升、强势领涨且浮盈位于 2%~12% 时,本地生命周期规则可确定性生成向 10%/20% 目标的分级加仓,不再依赖模型主动返回 ADD。
- 风险边界与前向证据同步:模型明确 SELL 时仍优先退出;所有新仓和加仓继续通过单票、主题风险、主题敞口、组合风险、总仓、现金、涨停和 T+1 复核,最多 5 只持仓保持不变。Practice 与管理员回测共享新的容量和分级加仓语义,严格前向协议升级为
niuone-strict-forward-v40,管理员回测升级为niuone-backtest-v38,默认前向队列从 2026-08-24 开始。 - FMP 与 A 股日 K 数据韧性:FMP 机构评级和目标价改为在总期限内按小页有界读取,遇到权限只允许最新 10 条时保留已取得记录并明确提示覆盖有限,补充目标价失败不会清空有效评级。A 股前复权日 K 依次尝试腾讯
proxy.finance、web.ifzq的newfqkline与旧fqkline入口,全部不可用时降级到东方财富;预热、研究扫描和工具入口复用同一套规范化结果。 - 账户提交顺序与容器启动保护:模拟账户完整 JSON 先通过临时文件原子替换提交,再写入成交、决策和持仓 SQLite 投影;延迟投影会在账户锁内重新读取规范状态,避免旧持仓覆盖新结果。若压缩写入失败,系统保留已经提交的完整历史。容器入口在启动业务进程前检查运行目录和核心状态文件的读写权限,无法安全持久化时以明确错误退出。
- 停机恢复与 Dashboard 修复:Dashboard 启动后会在不触发交易决策的前提下刷新持仓行情标记,并使用上游报价时间区分实时与历史价格;交易日历明确标记今天、未来日期和非交易日,停机后重新打开页面不会把旧行情误标为今日收益。行业资金流会重试字段不完整的成功响应,移动端主导航消除右侧多余留白并保持横向滚动。
- 持久化部署文档:中英文 README、运维和独立部署文档新增 Docker Compose 日常启动、重启、升级、健康检查、端口冲突和数据卷生命周期说明,明确 Docker 命名卷与原生
.local-data/不会自动同步,并提醒日常维护不要使用会删除真实运行数据的docker compose down -v。
安全与兼容性
- 本版本会提高牛牛试仓的仓位与轮动风险上限,但不会绕过最多 5 只持仓、单票/主题/组合风险、主题敞口、总仓、现金、涨停、结构止损或 T+1。其他策略的候选、行业持仓和风险规则保持原语义。
- 严格前向证据升级为
niuone-strict-forward-v40,管理员回测升级为niuone-backtest-v38。部署前应归档旧协议锁、报告和回测结果,不得将 v0.0.10 及更早协议的证据与新队列混算。 - 运行目录和账户状态文件必须对容器内
niuone用户可读写;旧部署若绑定了由 root 拥有的文件,升级后会在启动阶段明确失败,而不是在运行中产生不完整账户投影。命名卷niuone-data与newsnow-data应继续保留。 - 腾讯和东方财富日 K、FMP 评级/目标价/行情请求继续使用有界超时、重试、页数和结果数量。上游受限或失败时只使用已校验的数据并保留诊断,不以不完整响应覆盖账户、成交或已有有效记录。
- 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 1438 项自动化测试完成(1437 通过,1 项按条件跳过)。
- Python、Dashboard JavaScript、Vue 生产构建、Shell 与 Windows BAT 检查通过。
- GitHub Actions 主分支 CI、发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.11 focuses on staged NiuOne position management, market-data resilience, durable simulated-account state, and reliable long-running deployments. This release removes fixed daily probe-candidate and same-theme holding-count caps, prevents shared market context from constraining NiuOne capacity, raises the probe ceiling to 10%, and lets local lifecycle rules deterministically generate staged additions toward 10%/20% targets. It also adds bounded pagination and source fallback for FMP ratings and A-share daily bars, commits canonical account state before SQLite projections, and improves post-downtime portfolio dates, money-flow refreshes, mobile navigation, and container-volume operations guidance.
Highlights
- NiuOne capacity and staged additions: NiuOne probes are no longer capped at two candidates per day or two holdings per sector/theme, and midday position counts and reserved slots in shared market context are now explicitly limited to non-NiuOne strategies. The absolute probe ceiling rises to 10%, while rotational probe per-position equity risk and per-theme risk rise to 1%. When a holding has cross-day main-trend confirmation, remains a strong leader, and has a 2%–12% unrealized gain, local lifecycle rules can deterministically generate additions toward 10%/20% targets without requiring the model to return ADD.
- Risk boundaries and forward evidence: An explicit model SELL still takes exit priority. Every opening and addition remains subject to per-name risk, theme risk and exposure, portfolio risk, gross exposure, cash, price-limit, and T+1 checks; the five-holding ceiling remains unchanged. Practice and administration backtests share the new capacity and staged-add semantics. Strict-forward evidence advances to
niuone-strict-forward-v40, the administration backtest toniuone-backtest-v38, and the default forward cohort begins on 2026-08-24. - FMP and A-share daily-bar resilience: FMP ratings and price targets now use small bounded pages within the total deadline. If account access is limited to the latest ten records, the report preserves available data and explicitly marks limited coverage; unavailable target enrichment cannot erase valid ratings. Adjusted A-share daily bars try Tencent
proxy.finance, theweb.ifzqnewfqklineendpoint, and the legacyfqklineendpoint in order before falling back to Eastmoney. Cache prewarming, research scans, and utility callers share the same normalized result path. - Account commit ordering and container startup protection: The complete simulated-account JSON is atomically replaced through a temporary file before trade, decision, and position SQLite projections are written. Delayed position projection re-reads canonical state under the account lock so stale holdings cannot replace newer results. If optional compaction fails, the already committed full history is retained. The container entrypoint now checks runtime-directory and core state-file permissions before starting business processes and exits with a clear error when durable storage is unsafe.
- Downtime recovery and Dashboard fixes: On startup, the Dashboard refreshes open-position marks without triggering trading decisions and uses upstream quote time to distinguish live and historical prices. The trading calendar explicitly identifies today, future dates, and non-trading days, avoiding stale quotes being labeled as today's return after downtime. Industry money flow retries successful-but-incomplete payloads, while the mobile primary navigation removes the extra right-side gap and retains horizontal scrolling.
- Persistent deployment guidance: The Chinese and English README, operations, and standalone guides now document routine Docker Compose startup, restart, upgrade, health checks, port conflicts, and volume lifecycle. They clarify that Docker named volumes and native
.local-data/do not synchronize automatically and warn against usingdocker compose down -vfor routine maintenance because it deletes real runtime data.
Safety and compatibility
- This release raises NiuOne probe sizing and rotational risk limits, but it does not bypass the five-holding ceiling, per-name/theme/portfolio risk, theme exposure, gross exposure, cash, price-limit, structural-stop, or T+1 controls. Candidate, industry-capacity, and risk behavior for other strategies is unchanged.
- Strict-forward evidence advances to
niuone-strict-forward-v40and the administration backtest toniuone-backtest-v38. Archive old protocol locks, reports, and backtest results before deployment; do not combine evidence from v0.0.10 or earlier protocols with the new cohort. - Runtime directories and account-state files must be readable and writable by the container's
niuoneuser. An older bind-mounted file owned by root now causes a clear startup failure instead of allowing incomplete account projections during runtime. Preserve theniuone-dataandnewsnow-datanamed volumes. - Tencent and Eastmoney daily-bar requests and FMP rating, target, and quote requests retain bounded timeouts, retries, pages, and result counts. Restricted or failed upstream responses use only validated available data and preserve diagnostics; incomplete data cannot overwrite accounts, fills, or an existing valid record.
- NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 1438 automated tests completed (1437 passed and 1 conditionally skipped).
- Python, Dashboard JavaScript, the Vue production build, Shell, and Windows BAT checks passed.
- GitHub Actions main-branch CI, release validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.10...v0.0.11
NiuOne v0.0.10 — 共享模型与牛牛调仓升级 / Shared Models and NiuOne Rotation Upgrade
中文
NiuOne v0.0.10 聚焦于共享模型治理、结构化美股评级、可审计消息面预检和牛牛组合轮换。本版本将买卖决策、文字策略细化、问财消息判断及 A 股/隔夜美股盘面总结收敛到一套 OpenAI 兼容模型配置,引入流式模式与推理强度控制,并以 Financial Modeling Prep(FMP)结构化数据替代原 Grok 美股评级流程;同时统一牛牛持仓容量,增加确定性满仓换股、评分阶梯加仓和并发卖出幂等保护,并改善历史回放的终态指标、进度展示与峰值内存。
主要更新
- 共享模型配置与能力适配:买卖决策、文字策略 AI 细化、问财消息判断、A 股竞价/午盘/盘后总结和隔夜美股总结统一复用
DASHBOARD_DECISION_*。管理页新增流式模式和推理强度控件;auto默认使用非流式请求,只在网关明确要求时有界重试流式请求,已知 Qwen、MiniMax、GLM 和 MiMo 模型按本地能力表发送兼容字段,自定义别名继续保持自由配置。连接测试同步展示实际采用的模式并复用已保存密钥。 - FMP 结构化美股评级:美股机构评级日报不再依赖 Grok 网页搜索或独立评级模型,改用 FMP 的评级、目标价和行情数据,并在本地执行买入倾向筛选、重复事件合并、机构聚类和确定性排序。任务使用独立总期限、请求超时和结果上限;目标价或行情补充失败时保留可用评级主体,不让单个补充接口清空整份日报。
- 问财官方消息面预检:A 股候选和龙虎榜连板/连续上榜股票可通过问财官方
announcement-search、news-search与hithink-event-query获取最近 3 天的公告、新闻和结构化事件,按股票身份过滤并跨来源去重。存在有效证据时才调用共享模型判断利好、利空或中性;无证据直接记为中性。失败、超时、未检查、待判断或模型不可用均不进入决策消息证据,并统一按中性、权重 0 处理。 - 牛牛容量、换仓与评分阶梯加仓:取消上午/下午、单轮及单日新开仓数量限制,牛牛始终受最多 5 只持仓和既有单票、主题、组合、现金及市场硬停止约束。满仓时按战法确定性、信号分、主线阶段/分数和强势龙头身份形成可审计优先级;只有新候选严格更高且最低优先级旧仓全部批次已满足 T+1 时才先卖后买。同股同战法的后续 BUY 只有本次评分严格刷新持仓期实际买入最高分才可加仓,平分、降分和缺少基准分均失败关闭。
- 成交幂等与前向证据保护:并发退出检查现在通过账户级锁、耐久成交状态和通知钩子保证同一卖出只执行一次;真实成交、持仓路径和评分阶梯状态优先于缓存或重建信息。盘面总结不再改变牛牛开仓数量,消息预检缺失也不能降分、缩仓或单独触发不开仓、HOLD 或 SELL。严格前向协议升级为
niuone-strict-forward-v37,默认新队列从 2026-08-19 开始。 - 回测准确性、资源与运行可靠性:冻结文字策略回测将信号期后的最终平仓日纳入净值与风险指标,牛牛管理员回测同步容量、换仓和评分阶梯语义。运行页以单调时钟持续显示耗时、实际提交参数和更准确的剩余时间,终态进度不再回退;长生命周期任务可在回放引擎接管行情后释放完整历史序列以降低峰值内存。另修复总览资金流行溢出、行业资金刷新降级、NewsNow 公共访问 User-Agent 兼容及 Linux systemd 工作目录生成。
安全与兼容性
- 现有
DASHBOARD_DECISION_*配置继续优先。旧A_SHARE_MODEL_SUMMARY_*仅在共享配置尚未完整设置时作为兼容回退,并在下次保存模型配置时安全迁移;密钥仍只保存在受控环境变量或.local-data/私有文件中。 - 美股机构评级改用 FMP 后需配置
FMP_API_KEY;DASHBOARD_US_FEATURES_ENABLED默认仍为关闭。旧 Grok、独立美股评级模型和旧消息模型配置不再驱动这些流程,升级前应按新配置说明完成迁移。 IWENCAI_NEWS_PRECHECK_ENABLED默认关闭,且必须配合问财数据源使用。只有已完成且具备有效证据的利好、利空或中性结果参与现有模拟决策;所有失败或缺失状态均保持中性,不会覆盖账户、成交或龙虎榜主体数据。- 牛牛最多 5 只持仓、单票/主题/组合风险预算、现金储备、涨停禁买、T+1 和结构止损继续优先。换仓只在旧仓可整仓卖出且新候选严格更优时发生;本项目仍不连接券商或使用真实资金。
- 严格前向证据升级为
niuone-strict-forward-v37,牛牛管理员回测为niuone-backtest-v36,冻结文字策略回测为prompt-backtest-v2。部署前应归档旧协议锁、报告和旧回测结果,不得跨协议混算。 - 外部模型、FMP、问财、NewsNow 和行情请求继续使用有界超时、重试与并发;失败路径保留最近有效结果和可诊断状态,不记录密钥或完整私有响应。
- 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 1410 项自动化测试完成(1409 通过,1 项按条件跳过)。
- Python、Dashboard JavaScript、Vue 生产构建、Shell 与 Windows BAT 检查通过。
- GitHub Actions 主分支 CI、发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.10 focuses on shared model governance, structured U.S. ratings, auditable news prechecks, and NiuOne portfolio rotation. This release consolidates buy/sell decisions, prompt-strategy refinement, iWenCai news judgment, and A-share/overnight U.S. market summaries onto one OpenAI-compatible model configuration, adds streaming and reasoning controls, and replaces the former Grok-based U.S. ratings workflow with structured Financial Modeling Prep (FMP) data. It also unifies NiuOne capacity, adds deterministic full-book rotation, score-ladder additions, and idempotent concurrent exits, while improving terminal backtest metrics, progress reporting, and peak memory use.
Highlights
- Shared model configuration and capability adaptation: Buy/sell decisions, AI prompt refinement, iWenCai news judgment, A-share auction/midday/close summaries, and overnight U.S. summaries now share
DASHBOARD_DECISION_*. The administration page adds streaming-mode and reasoning-effort controls.autostarts with a non-streaming request and retries with streaming only when the gateway explicitly requires it; known Qwen, MiniMax, GLM, and MiMo models use locally mapped compatible fields, while custom aliases remain free-form. Connectivity tests report the effective mode and can reuse saved credentials. - Structured U.S. ratings through FMP: The institutional-ratings report no longer depends on Grok web search or a separate ratings model. It uses FMP ratings, price targets, and quotes, then applies local deterministic buy-intent filtering, event deduplication, institution clustering, and ranking. Independent total deadlines, request timeouts, and result limits bound the task; an unavailable price-target or quote enrichment cannot erase otherwise usable rating records.
- Official iWenCai news prechecks: A-share candidates and limit-up/consecutive Dragon-Tiger names can use the official iWenCai
announcement-search,news-search, andhithink-event-queryskills to retrieve the latest three days of announcements, news, and structured events, filtered by security identity and deduplicated across sources. The shared model is called only when valid evidence exists; no evidence resolves directly to neutral. Failed, timed-out, unchecked, pending, or unavailable judgments are excluded from decision evidence and normalized to neutral with zero weight. - NiuOne capacity, rotation, and score-ladder additions: Removed morning/afternoon, per-cycle, and daily new-opening limits. NiuOne remains bounded by five concurrent holdings and the existing per-name, theme, portfolio, cash, and market hard-stop controls. At full capacity, an auditable priority combines deterministic setup quality, signal score, mainline stage/score, and strong-leader status; rotation sells before buying only when the new candidate is strictly better and every batch of the lowest-priority holding is fully T+1 eligible. A later BUY in the same name and setup is allowed only when its score strictly exceeds the highest score actually bought during the holding lifecycle; ties, declines, and missing baselines fail closed.
- Idempotent fills and forward-evidence protection: Concurrent exit checks now use account-level locking, durable fill state, and notification hooks so the same sell executes only once. Real fills, holding paths, and score-ladder state take precedence over caches or reconstructed information. Market summaries no longer change NiuOne opening counts, and missing news prechecks cannot reduce scores or sizing or independently cause no-open, HOLD, or SELL decisions. The strict-forward identity advances to
niuone-strict-forward-v37, with a new default cohort beginning on 2026-08-19. - Backtest accuracy, resources, and runtime reliability: Frozen prompt-strategy backtests now include the final liquidation day after the signal range in equity and risk metrics, while the NiuOne administration backtest aligns capacity, rotation, and score-ladder semantics. The run view uses a monotonic clock for elapsed time, shows the submitted parameters and a better remaining-time estimate, and no longer regresses terminal progress. Long-lived tasks can release full historical sequences after the replay engine takes ownership to reduce peak memory. This release also fixes overview flow-row overflow, industry-flow fallback, NewsNow public-access User-Agent compatibility, and Linux systemd working-directory generation.
Safety and compatibility
- Existing
DASHBOARD_DECISION_*settings retain priority. LegacyA_SHARE_MODEL_SUMMARY_*values remain only as a compatibility fallback until the shared configuration is complete and are migrated safely on the next model-settings save. Credentials remain confined to controlled environment variables or private files under.local-data/. - U.S. institutional ratings now require
FMP_API_KEY, whileDASHBOARD_US_FEATURES_ENABLEDremains disabled by default. Legacy Grok, separate U.S.-rating model, and legacy news-model settings no longer drive these workflows; migrate deployments using the updated configuration guidance. IWENCAI_NEWS_PRECHECK_ENABLEDremains off by default and requires the iWenCai source. Only completed positive, negative, or neutral judgments backed by valid evidence participate in the existing simulated decision flow; failures and missing states stay neutral and cannot overwrite accounts, fills, or core Dragon-Tiger data.- The five-holding ceiling, per-name/theme/portfolio risk budgets, cash reserve, price-limit gate, T+1, and structural stops remain authoritative. Rotation occurs only when an old holding is fully sellable and a new candidate is strictly better. The project still does not connect to a brokerage or use real funds.
- Strict-forward evidence advances to
niuone-strict-forward-v37, the NiuOne administration backtest toniuone-backtest-v36, and frozen prompt-strategy backtesting toprompt-backtest-v2. Archive prior protocol locks, reports, and old backtest results before deployment; evidence must not be mixed across protocols. - External model, FMP, iWenCai, NewsNow, and market-data requests retain bounded timeouts, retries, and concurrency. Failure paths preserve the latest valid result and a diagnosable status without logging credentials or full private responses.
- NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 1410 automated tests completed (1409 passed and 1 conditionally skipped).
- Python, Dashboard JavaScript, the Vue production build, Shell, and Windows BAT checks passed.
- GitHub Actions main-branch CI, release validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.9...v0.0.10
NiuOne v0.0.9 — 浅色总览与数据韧性升级 / Light Overview and Data Resilience Upgrade
中文
NiuOne v0.0.9 聚焦于默认浅色体验、跨尺寸总览可用性、共享行情缓存预热和龙虎榜数据的分阶段持久化。本版本重新整理桌面与移动端总览布局,为指数、板块和热门股票接口增加会话内主动预热,强化问财龙虎榜在中断、重试和部分上游失败时的真实快照保护,并统一面向用户的中文策略理由;同时移除已停用的 X 关注源模块,简化 Dashboard 与容器运行面。
主要更新
- 默认浅色体验与响应式总览:没有保存外观偏好的新浏览器现在直接使用标准浅色主题,已有用户选择继续保留。总览页按宽屏、紧凑桌面、低高度窗口和移动端重新分配市场情绪、指数、资金流、主线、候选与快讯区域,修复 721px 边界、滚动锁定、内容挤压和窄容器题材列表问题;中英文 README 同步更新浅色产品导览、总览与实时快讯动画。
- 共享行情缓存主动预热:Dashboard 后台在对应市场活跃时段主动预热指数、板块与热门股票共享缓存,浏览器首次访问可立即复用最近有效快照并在后台刷新。预热复用带失效代次的响应缓存、互斥填充和单飞语义,失败采用有界退避,避免页面并发刷新形成重复上游请求;休市时不做无效轮询。
- 龙虎榜分阶段耐久快照:问财龙虎榜先保存主体榜单,再逐步补齐席位明细和消息增强;任一后续阶段中断都不会丢失已经取得的真实核心数据。同日重试不能把完整席位降级为部分结果,启动追补可继续未完成的核心快照,新交易日查询失败或为空后才补齐仍被保留的旧快照消息;失败路径继续保留最近一次有效结果。
- 策略理由中文化与证据版本隔离:模拟交易的主线阶段、个股角色、主线模式、成交理由、拦截说明和二次取舍理由在明确的中文策略上下文中统一显示中文。内部稳定枚举、专名、技术术语、错误文本、缩写和标识符保持不变,策略评分、资格、仓位和风控规则没有调整。严格前向协议升级为
niuone-strict-forward-v33,新队列默认从 2026-08-13 开始,避免把展示与提示词变更前后的证据混算。 - 监控与部署简化:移除内置 X/Twitter 关注源页面、轮询守护进程、兼容入口、旧启动脚本、配置项和容器生命周期钩子,保留 NewsNow 财经快讯、消息历史和既有报告链路。中英文架构、运维、独立部署、运行数据与策略说明已同步清理,容器构建面和长期运行服务入口更精简。
安全与兼容性
- 已保存的浅色、深色、通达信深色或通达信浅色偏好继续生效;只有没有保存偏好的浏览器改为默认浅色。
- 行情缓存预热只更新 Dashboard 共享展示缓存,不新增候选、不修改题材排序、账户、成交、仓位或风控;上游失败时保留最近有效快照,并使用有界超时、并发和退避。
- 龙虎榜恢复始终优先保留已落盘的真实主体、席位和消息阶段;空响应、部分失败或同日重试不会用不完整结果覆盖更完整快照,也不会改写账户或成交记录。
- 策略理由中文化不改变内部枚举或交易规则。v33 严格前向队列不得与 v32 证据混算;部署前应按现有运维流程归档旧协议锁和报告。
- v0.0.9 不再提供内置 X 关注源页面、相关 API、配置和启动脚本。升级不会删除
.local-data/中已有的账户、配置、数据库、缓存或历史文件;需要 X 数据的部署应改用独立外部集成。 - 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 1331 项自动化测试完成(1330 通过,1 项按条件跳过)。
- Python、Dashboard JavaScript、Vue 生产构建、Shell 与 Windows BAT 检查通过。
- GitHub Actions 发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.9 focuses on a light-by-default experience, responsive overview usability, proactive shared market-cache warming, and staged persistence for Dragon-Tiger data. This release reorganizes the overview across desktop and mobile sizes, prewarms index, sector, and popular-stock endpoints, protects real iWenCai snapshots through interruption, retry, and partial upstream failure, and consistently localizes user-facing strategy reasons. It also removes the retired X watchlist module to simplify the Dashboard and container runtime surface.
Highlights
- Light-by-default, responsive overview: New browsers without a saved appearance preference now start with the standard light theme, while existing user choices remain intact. The overview redistributes market breadth, indices, capital flow, mainlines, candidates, and news across wide, compact desktop, low-height, and mobile layouts. It fixes the 721px mode boundary, scroll locking, content compression, and narrow-container theme lists, while the Chinese and English READMEs gain refreshed light-theme, overview, and Market Flash walkthroughs.
- Proactive shared market-cache warming: During each market's active session, the Dashboard proactively warms shared caches for indices, sectors, and popular stocks. A first browser visit can return the latest valid snapshot immediately and refresh it in the background. Warming reuses generation-aware response caches, mutually exclusive fills, and single-flight behavior; failures use bounded backoff, and closed markets do not create wasteful polling.
- Staged durable Dragon-Tiger snapshots: iWenCai Dragon-Tiger collection now persists the core list first, then incrementally enriches seat details and news, so an interrupted later stage cannot discard real core data already obtained. Same-day retries cannot downgrade complete seats to partial results, startup catch-up can resume incomplete core snapshots, and retained older news is backfilled only after a new-date pull fails or returns empty. Failure paths continue serving the most recent valid snapshot.
- Localized strategy reasons with evidence isolation: Mainline stages, stock roles, mainline modes, fill reasons, blockers, and secondary-selection reasons are localized in explicit Chinese strategy contexts. Stable internal enums, proper names, technical terms, error text, abbreviations, and identifiers remain unchanged, with no change to scoring, eligibility, sizing, or risk rules. The strict-forward identity advances to
niuone-strict-forward-v33, with a new default queue beginning on 2026-08-13 so evidence from before and after the presentation/prompt change cannot be mixed. - Simplified monitoring and deployment: Removed the built-in X/Twitter watchlist page, polling daemons, compatibility entrypoints, legacy launch script, settings, and container lifecycle hooks, while retaining NewsNow Market Flash, message history, and existing report pipelines. Architecture, operations, standalone deployment, runtime-data, and strategy documentation are aligned in both languages, leaving a smaller container and long-running-service surface.
Safety and compatibility
- Saved light, dark, Tongdaxin dark, and Tongdaxin light preferences continue to apply; only browsers without a saved preference now default to light.
- Market-cache warming updates only shared Dashboard display caches. It cannot add candidates or modify theme ordering, accounts, fills, positions, or risk gates; upstream failures retain the latest valid snapshot under bounded timeouts, concurrency, and backoff.
- Dragon-Tiger recovery always prefers durable real core, seat, and news stages. Empty responses, partial failures, and same-day retries cannot overwrite a more complete snapshot and do not modify account or fill records.
- Strategy-reason localization does not change internal enums or trading rules. v33 strict-forward evidence must not be combined with v32; archive the previous protocol lock and reports through the existing operations procedure before deployment.
- v0.0.9 no longer includes the built-in X watchlist page, related APIs, settings, or launch scripts. Upgrading does not delete accounts, configuration, databases, caches, or historical files under
.local-data/; deployments that still require X data should use a separate external integration. - NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 1331 automated tests completed (1330 passed and 1 conditionally skipped).
- Python, Dashboard JavaScript, the Vue production build, Shell, and Windows BAT checks passed.
- GitHub Actions release validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.8...v0.0.9
NiuOne v0.0.8 — 可审计文字策略与盘面终端升级 / Auditable Prompt Strategies and Market Terminal Upgrade
中文
NiuOne v0.0.8 聚焦于可审计的文字策略闭环、更紧凑的 A 股盘面终端、可降级的实时快讯和可验证的盘中数据恢复。本版本新增冻结版本驱动的自然语言策略创建、模拟执行与历史回测,重构总览与多套 Dashboard 外观,并把 NewsNow 盘面快讯、市场情绪缺口恢复和资金活跃度证据接入现有研究与模拟交易体系。
主要更新
- 可审计文字策略闭环:管理设置页可将模糊自然语言流式细化为选股、入场、退出、仓位和缺数据规则;服务端用严格 schema、本地编译器、特征注册表和三态求值修复可确定的字段比较并拒绝不安全或含糊的计划。用户确认后以两阶段提交激活不可变版本,运行期只执行冻结的本地规则,不再调用模型;选股、买前复核、持仓监测和退出均保存可重放审计链、事实快照和计划指纹。
- 冻结策略历史回测:已激活或退役的文字策略可在独立回测账户中按
selection → entry → exit历史重放,支持 KDJ、EMA、RSI、MACD、布林带、ATR、区间高低点等带版本特征及明确的历史偏移。回测执行次日开盘成交、T+1、涨跌停、滑点、费用、仓位和现金约束,并展示交易、净值、审计清单与确定性重放结果;实时 K 线规则会明确拒绝,不用收盘日线伪造盘中证据。 - A 股总览与多套终端外观:新增聚合指数、市场情绪、主线、资金流、龙虎榜、模拟账户和盘面快讯的总览页;标准界面进一步压缩信息密度,并新增通达信风格深色与浅色终端主题。外观设置、导航、表格、弹层、图表、移动端排序和高度约束统一调整,亮色主题的指数、快讯、设置控件和交易标记可读性同步提升。
- NewsNow 盘面快讯:Compose 默认随 Dashboard 启动内网 NewsNow sidecar,管理页可搜索并多选财经来源;独立快讯页和总览共用进程内刷新器、重要信息筛选和按 ID 去重的有界滚动历史。单一来源失败时仅回退该来源缓存,全部失败也不会用空结果覆盖最近有效数据;最新快讯可进入模拟买卖决策情报包,页面与决策请求不会形成重复上游请求风暴。
- 市场情绪恢复与缓存治理:Dashboard 启动后可识别当日曲线开头、停机中段和收盘尾部缺口,通过腾讯逐股分钟线、指数成交额和至少三个真实采样点交叉验证后原子补齐;恢复有明确并发租约、覆盖率门槛、超时和重试,原始同时间戳记录始终优先。扫描历史同时停止重复归档,并限制为最近归档日的有界轮次,不触碰最新缓存、账户、成交或严格前向证据。
- 牛牛资金活跃门与回测体验:牛牛领涨、转强和启动新增全市场及题材内成交额分位硬门,成交额缺失时失败关闭;试仓保留早期发现能力并明确标注活跃度不足。候选、首次建仓和严格前向机会集持久化同一份资金活跃度证据,管理员回测结果页进一步整理组合表现、交易与诊断信息。
- 监控与部署可靠性:X 关注源轮询增加单轮总期限、子进程隔离与可恢复游标,避免单个上游或失效客户端长期阻塞;NewsNow 与 Dashboard 的容器生命周期、配置校验、缓存和状态说明同步完善。中英文 README、运维、架构、独立部署和策略文档已更新。
安全与兼容性
- 新文字策略只在创建阶段调用模型;激活版本在本地冻结执行,每个持仓绑定建仓版本,后续切换不会改写已有持仓。旧版预设文字配置继续作为无冻结版本时的兼容回退,缺少版本、事实、指纹或审计证据时失败关闭。
- 盘面快讯只进入研究展示和已有模拟决策情报包,不新增确定性候选、不绕过涨跌停、T+1、仓位、现金或风险硬门,也不连接券商或真实资金。
- 市场情绪恢复只处理北京时间当天,不插值、不跨历史交易日补洞;校验不足或上游失败时保留现有真实记录,不用推测数据覆盖原始样本。
- 外部行情、NewsNow、模型和监控请求继续使用有界超时、重试与并发;缓存写入保持原子化,失败路径保留可诊断状态而不记录密钥或完整私有响应。
- 已有显式配置继续优先;升级不会删除
.local-data/中的账户、配置、数据库、缓存或审计记录。密钥、日志、备份和运行状态继续保存在私有目录,不进入公开投影或发布产物。 - 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 1351 项自动化测试完成(1350 通过,1 项按条件跳过)。
- Python、Dashboard JavaScript、Vue 生产构建、Shell 与 Windows BAT 检查通过。
- GitHub Actions 发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.8 focuses on an auditable prompt-strategy lifecycle, a denser A-share market terminal, degradable real-time news, and verified intraday data recovery. This release adds immutable-version natural-language strategy creation, simulated execution, and historical backtesting; redesigns the overview and Dashboard themes; and integrates NewsNow Market Flash, market-breadth gap recovery, and capital-activity evidence with the existing research and simulated-trading system.
Highlights
- Auditable prompt-strategy lifecycle: The administration workspace can stream-refine ambiguous natural language into selection, entry, exit, sizing, and missing-data rules. A strict schema, local compiler, feature registry, and three-valued evaluator deterministically repair supported field comparisons while rejecting unsafe or ambiguous plans. Confirmation activates an immutable version through a two-phase commit; runtime selection, pre-trade review, position monitoring, and exits execute only frozen local rules and persist replayable audit chains, fact snapshots, and plan fingerprints.
- Historical backtesting for frozen strategies: Active and retired prompt strategies can replay
selection → entry → exitin an isolated account, using versioned features such as KDJ, EMA, RSI, MACD, Bollinger Bands, ATR, range extrema, and explicit historical offsets. The engine enforces next-session fills, T+1, price limits, slippage, fees, position sizing, and cash constraints, then reports trades, equity, an audit manifest, and deterministic replay results. Live-bar rules are rejected explicitly instead of being approximated with closing daily bars. - A-share overview and terminal themes: Added an overview that combines indices, market breadth, mainlines, capital flow, Dragon-Tiger data, the simulated account, and Market Flash. The standard interface is denser, with new Tongdaxin-inspired dark and light terminal themes. Appearance settings, navigation, tables, popovers, charts, mobile ordering, and height constraints are unified, with clearer light-theme index cards, news, settings controls, and trade markers.
- NewsNow Market Flash: Compose now starts an internal NewsNow sidecar with the Dashboard, and administrators can search and select supported financial sources. The dedicated feed and overview share one in-process refresher, important-item filtering, and bounded ID-deduplicated history. A failed source falls back only to its own cache, while an all-source failure never overwrites the last valid result with an empty payload. Recent flash items can enter the simulated buy/sell decision context without creating duplicate upstream request storms.
- Market-breadth recovery and cache governance: After startup, the Dashboard can detect leading, mid-session, and closing gaps in the current-day curve, then atomically recover them only after cross-validating Tencent per-stock minute bars, index turnover, and at least three real samples. Recovery uses a cross-process lease, coverage thresholds, bounded timeouts and retries, and always gives same-timestamp original observations precedence. Scan history also stops duplicate archival and retains a bounded number of rounds without touching current caches, accounts, fills, or strict-forward evidence.
- NiuOne capital-activity gate and backtesting UX: Leader, Re-strengthening, and Emerging paths now require both market-wide and selected-theme turnover percentiles and fail closed when turnover is missing. The Probe path preserves early discovery while disclosing unconfirmed activity. Candidates, first entries, and strict-forward opportunity sets persist the same capital-activity evidence, and the administrator backtest workspace presents portfolio performance, trades, and diagnostics more clearly.
- Monitoring and deployment reliability: X-watchlist polling gains a total per-cycle deadline, subprocess isolation, and recoverable cursors so one upstream or stale client cannot block the daemon indefinitely. NewsNow/Dashboard container lifecycle, configuration validation, cache behavior, and state documentation are aligned across the Chinese and English READMEs, operations, architecture, standalone deployment, and strategy guides.
Safety and compatibility
- New prompt strategies use the model only during creation. Activated versions execute frozen local rules, each position remains bound to its entry version, and later activation cannot rewrite existing holdings. The legacy preset-text setting remains a compatibility fallback when no frozen version exists; missing versions, facts, fingerprints, or audit evidence fail closed.
- Market Flash enters only research displays and the existing simulated-decision context. It cannot create deterministic candidates, bypass price-limit, T+1, position, cash, or risk gates, connect to a brokerage, or use real funds.
- Market-breadth recovery is limited to the current Beijing-calendar day and performs no interpolation or cross-session backfill. Insufficient validation or upstream failure retains real observations instead of overwriting them with inferred data.
- External market-data, NewsNow, model, and monitoring requests retain bounded timeouts, retries, and concurrency. Cache updates remain atomic, and failure paths preserve diagnosable state without logging credentials or complete private responses.
- Existing explicit configuration continues to take precedence. Updates do not remove accounts, settings, databases, caches, or audits under
.local-data/; credentials, logs, backups, and runtime state remain private and outside public projections and release artifacts. - NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 1351 automated tests completed (1350 passed and 1 conditionally skipped).
- Python, Dashboard JavaScript, the Vue production build, Shell, and Windows BAT checks passed.
- GitHub Actions release validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.7...v0.0.8
NiuOne v0.0.7 — 策略回测与题材归因升级 / Strategy Backtesting and Theme Attribution Upgrade
中文
NiuOne v0.0.7 聚焦于可复现的策略验证、牛牛生命周期执行和确定性题材归因。本版本新增管理员策略回测工作台与严格前向诊断,统一五阶段主线生命周期和四类交易动作,并加强多概念归因、模拟成交持久化、投影缓存、冷启动与更新可靠性。
主要更新
- 管理员策略回测工作台:设置页为每个独立策略提供服务端回测入口,可自动构建股票范围、获取多源历史日 K、显示分阶段进度与 ETA,并支持刷新恢复和精确终止。牛牛战法使用独立资金、持仓与 T+1 状态机回放定仓、加减仓、止损和退出;结果展示净值、回撤、交易明细、月度阻断、阈值敏感性和门槛消融。
- 牛牛生命周期与执行升级:主线酝酿、主升、高潮、分歧、退幕五阶段与牛牛试仓、启动、领涨、转强四动作共用同一硬路由。试仓改用日线区间 V 型结构和题材延续证据;成熟路径不再使用固定单日涨幅线,只有实际执行价达到涨停才拒绝。防守状态新增最低风险档,并完善分级加仓、高潮减仓、回撤释放与重新转强补仓。
- 严格前向证据与研究诊断:模拟成交、决策槽、账户权益和生命周期路径以耐久证据交叉校验,记录每日新仓上限、观察到成交的完整漏斗、买卖裁单、入口/退出阶段和持仓期间阶段变化。报告增加交易级、日期×题材簇和组合层质量门;样本、运行日或账本不完整时失败关闭,绝不自动晋级策略。
- 确定性题材归因:东方财富
f100行业与f103题材分离保存,多概念股票按排除自身的同题材共振、历史先验和 20 日市场中性化收益波形形成归因。Softmax 权重保留未归因质量,首要高分题材可避免多标签机械稀释;题材广度、成交额、集中度和领涨股均按同一证据链重算,题材识别不调用消息检索或大模型。 - 题材强度展示与实时交叉验证:简化题材排名与卡片层级,保留“今日前 5”和“结构前 5”的不同含义,并新增东方财富概念板块榜的有界实时交叉验证;该数据只用于展示,不改变牛牛排序、跨日状态、回测或交易。布局、提示信息、移动端和亮色主题表现同步优化。
- 回测与看板性能:历史回放预计算因果技术指标,共享 ATR、V 型、突破和结构风险基础量;选股回放带按协议、日期范围、分类与实际行情内容寻址的压缩缓存,并在低优先级隔离子进程中执行。盘中 EMA 种子、紧凑候选/题材投影和 JSON 读取缓存减少重复计算与大对象解析。
- 账户数据与部署可靠性:模拟账户成交、决策和权益历史先追加到 SQLite,再原子更新有界 JSON;并发成交不会互相覆盖,旧账户历史会在保留真实记录的前提下归档。首次部署立即补齐全市场日 K 并通过
/readyz表达就绪状态;源码更新后托管服务会重启,品牌资源随前端构建打包,避免容器和独立部署缺失资源。 - 文档与品牌更新:重写中英文项目概览和冷启动排障说明,补充回测、严格前向、题材归因与容器运行文档;更新本地 banner、favicon、品牌标识和功能演示动画。
安全与兼容性
app/backtesting/是隔离的离线研究包,使用独立账户和任务状态,不读取或修改模拟持仓、生产订单、成交记录或策略候选缓存;历史行情请求带有界超时、重试、并发和覆盖率门槛。- 实时板块榜只进入公开展示字段;题材归因不发起消息检索或模型调用,两者都不会新增候选、改变交易门槛或触发模拟买卖。
- 新的题材 schema、严格前向和回测协议不会与旧证据混算;缺失、损坏或不匹配的缓存会明确重算或失败关闭,不会用不完整结果覆盖真实账户记录。
- 已有显式配置继续优先;升级与服务重启不会删除
.local-data/中的账户、配置或缓存。密钥、数据库、日志、回测状态和备份继续保存在私有运行目录,不进入公开投影或发布产物。 - 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 1173 项自动化测试完成(1172 通过,1 项按条件跳过)。
- Python、Dashboard JavaScript、Vue 生产构建、Shell 与 Windows BAT 检查通过。
- GitHub Actions 发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.7 focuses on reproducible strategy validation, lifecycle-aware NiuOne execution, and deterministic theme attribution. This release adds an administrator backtesting workspace and strict forward diagnostics, unifies the five-stage mainline lifecycle with four trading actions, and strengthens multi-concept attribution, simulated-fill persistence, projection caching, cold startup, and update reliability.
Highlights
- Administrator strategy backtesting workspace: Each standalone strategy now has a server-backed backtesting entry in Settings. It builds the configured universe automatically, fetches multi-source historical daily bars, reports staged progress and ETA, and supports refresh recovery and precise cancellation. The NiuOne suite replays sizing, adds, reductions, stops, and exits with isolated cash, positions, and T+1 state; results include equity, drawdown, trades, monthly blockers, threshold sensitivity, and gate ablations.
- NiuOne lifecycle and execution upgrade: Brewing, Advancing, Climax, Diverging, and Fading stages now share one hard routing contract with Probe, Emerging, Leader, and Re-strengthening actions. The probe uses a daily-range V structure plus theme-continuation evidence. Mature paths no longer use fixed daily-return rejection lines and reject only when the actual execution price reaches limit-up. Defensive markets gain a minimum-risk tier, with staged promotion adds, climax reductions, pullback releases, and re-strengthening replenishment.
- Strict forward evidence and research diagnostics: Durable simulated fills, decision slots, account equity, and lifecycle paths are cross-validated. Evidence covers the daily new-position cap, the full observation-to-fill funnel, capped orders, entry and exit stages, and each stage observed while held. Reports add trade-level, date-by-theme-cluster, and portfolio quality gates; incomplete samples, operating days, or ledgers fail closed and can never promote a strategy automatically.
- Deterministic theme attribution: Eastmoney
f100industries andf103themes are stored separately. Multi-concept stocks are attributed through leave-one-out peer resonance, causal priors, and 20-session market-neutral return-wave similarity. Softmax weights retain unattributed quality, while a uniquely highest high-confidence theme avoids mechanical dilution from many labels. Theme breadth, turnover, concentration, and leaders use the same evidence chain, with no news retrieval or model calls in theme identification. - Theme Strength presentation and live cross-check: Simplified rankings and card hierarchy while preserving the different meanings of “Today's Top 5” and “Structural Top 5.” A bounded Eastmoney concept-board leaderboard provides a live display-only cross-check and does not affect NiuOne ordering, cross-session state, backtests, or trading. Layout, explanatory popovers, mobile behavior, and light-theme rendering are also improved.
- Backtesting and Dashboard performance: Historical replay precomputes causal technical indicators and shares ATR, V-structure, breakout, and structural-risk primitives. Selection replay uses compressed content-addressed caches keyed by protocol, date range, classification, and actual market data, and runs in a low-priority isolated subprocess. Intraday EMA seeds, compact candidate/theme projections, and JSON read caches reduce repeated calculations and large-object parsing.
- Account-data and deployment reliability: Simulated fills, decisions, and equity history are appended to SQLite before bounded JSON state is replaced atomically; concurrent fills no longer overwrite each other, and older account history is archived without reconstructing real records. Fresh deployments immediately initialize full-market daily bars and expose readiness through
/readyz; managed services restart after source updates, and brand assets are bundled with the frontend for container and standalone deployments. - Documentation and branding: Reworked the Chinese and English project overview and cold-start troubleshooting, expanded backtesting, strict-forward, theme-attribution, and container documentation, and refreshed the local banner, favicon, brand mark, and feature walkthrough animations.
Safety and compatibility
app/backtesting/is an isolated offline research package with its own account and task state. It does not read or modify simulated positions, production orders, fills, or candidate caches; historical requests use bounded timeouts, retries, concurrency, and coverage thresholds.- The live board leaderboard only enters public display fields. Theme attribution makes no news or model requests; neither path can add candidates, change trading gates, or trigger simulated trades.
- New theme schemas and strict-forward/backtesting protocols are never mixed with older evidence. Missing, corrupt, or mismatched caches trigger explicit recomputation or fail closed instead of overwriting real account records with incomplete results.
- Existing explicit configuration continues to take precedence. Updates and managed-service restarts do not delete accounts, configuration, or caches under
.local-data/. Credentials, databases, logs, backtest state, and backups remain private and are excluded from public projections and release artifacts. - NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 1173 automated tests completed (1172 passed and 1 conditionally skipped).
- Python, Dashboard JavaScript, the Vue production build, Shell, and Windows BAT checks passed.
- GitHub Actions release validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.6...v0.0.7
NiuOne v0.0.6 — 日内题材与策略执行增强 / Intraday Themes and Strategy Execution Upgrade
中文
NiuOne v0.0.6 聚焦于盘中题材强度、牛牛战法早期机会识别和模拟执行可靠性。本版本把 30 秒全市场报价样本复用到题材快速刷新,新增两次确认的 V 形反转试仓,并完善策略风控、量能历史、版本提示、跨平台启动与 Dashboard 交互。
主要更新
- 30 秒日内题材刷新:市场情绪采样器取得覆盖有效的逐股行情后,题材快速计算器复用同一份报价与本地日 K、行业映射和最近完整研究扫描的慢速确认分量,不额外请求行情、新闻模型或交易接口;覆盖不足、报价过期或计算失败时保留上一份有效结果。
- 题材强度展示更清晰:页面分开呈现反映当日实时强弱的“今日前 5”和用于跨日确认的“结构前 5”,补充 V 形反转观察、代表股、有效广度与核心股延续,并改进卡片宽度、信息浮层和移动端布局。
- 牛牛反转试仓:新增题材 V 形修复的独立早期路径,要求有效覆盖、上涨广度、中位涨幅、低点反弹和核心股强度同时达标,并在同一交易日至少间隔 20 分钟完成两次确认;试仓使用更小风险预算、5% 单票绝对上限和 4%/1.2 ATR 结构止损,T+0 禁止加仓,未跨日延续或升级时按时退出。
- 策略与执行约束对齐:主线确认必须来自相邻交易日并保持核心股连续;牛牛领航、回踩和启动按市场状态调整追高边界,候选和执行层统一使用 14 日 ATR、动态风险预算与升级加仓校验;非有限评分输入被明确拒绝,空候选结果不会回退到旧候选。
- 账户风控与退出修复:日内亏损改为按本交易日会话盈亏计算,策略退出次数按 A 股交易日统计;牛牛升级加仓、结构止损、主题敞口、组合风险、持仓数量和时间退出在执行层再次硬性复核。
- 量能历史与图表可靠性:20 日五分钟累计成交分布会原子保存并在同一交易日重启后恢复;市场情绪图改善时间轴、提示框和量能对比,始终保留最新值可见;行业资金动画新增更快播放速度。
- 版本提示与运维体验:Dashboard 顶部和设置页展示当前版本、最新严格 SemVer 版本与检查状态,通过 15 分钟缓存查询 Docker Hub;自动检查可关闭,只提示更新而不会拉取、安装或重启。Windows 首次启动修复批处理变量过早展开和陈旧错误码问题,并补充中国大陆 pip 超时/镜像配置说明。
- 文档与演示更新:中英文 README、部署和策略文档同步更新,重制市场情绪、资金流、题材强度、模拟交易、设置、盘面监控、X 监控和美股评级演示动画。
安全与兼容性
- 30 秒题材快照是只读研究路径,不改变当前策略、候选缓存、交易范围或模拟账户,也不会触发买卖。
- V 形反转试仓不降低原有启动或主线确认门槛;只有跨日继续满足条件后才能升级为牛牛启动、领航或回踩。
- 行情覆盖不足、量能回源失败或评分字段异常时保留最近有效数据或明确拒绝,不用不完整结果覆盖账户和真实记录。
- 已有显式配置继续优先;版本检查默认只读且可关闭,不会自动修改源码部署、容器或本地运行数据。
- 密钥、数据库、账户状态、日志、缓存和备份继续保存在本地私有运行目录,不进入公开投影或发布产物。
- 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 830 项自动化测试完成(829 通过,1 项按条件跳过)。
- Python、Dashboard JavaScript、Vue 生产构建、Shell、Windows BAT 与 GitHub 主分支 CI 检查通过。
- GitHub Actions 容器发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.6 focuses on intraday theme strength, earlier NiuOne-strategy opportunity detection, and more reliable simulated execution. This release reuses the 30-second full-market quote sample for fast theme refreshes, adds a twice-confirmed V-reversal probe, and strengthens strategy risk controls, turnover history, version notices, cross-platform startup, and Dashboard interactions.
Highlights
- 30-second intraday theme refresh: After the market-breadth sampler obtains a coverage-valid per-stock quote set, the fast theme calculator reuses that same data with local daily bars, industry mappings, and slow confirmation factors from the latest full research scan. It makes no additional quote, news-model, or trading requests, and retains the last valid result when coverage, freshness, or computation checks fail.
- Clearer Theme Strength presentation: The page now separates the real-time “Today's Top 5” from the cross-session “Structural Top 5,” and adds V-reversal observations, representative stocks, effective breadth, and core-stock continuity, with improved card sizing, information popovers, and mobile layouts.
- NiuOne V-reversal probe: Added an independent early path for V-shaped theme recovery. Coverage, advancing breadth, median return, rebound from the intraday low, and core-stock strength must all qualify twice on the same session at least 20 minutes apart. The probe uses tighter risk budgets, a 5% absolute per-position cap, a 4%/1.2 ATR structural-stop limit, no T+0 add, and time exits when cross-session continuation or promotion fails.
- Aligned strategy and execution constraints: Mainline confirmation now requires adjacent trading sessions and continuing core stocks. Leader, Pullback, and Emerging paths apply market-regime-specific chase limits, while candidate and execution layers share 14-day ATR, dynamic risk budgets, and promotion-add checks. Non-finite scoring inputs are rejected explicitly, and an empty candidate result no longer falls back to stale candidates.
- Account-risk and exit fixes: Daily loss is calculated from the current trading session's P&L, and strategy exits are counted by A-share trading day. Promotion adds, structural stops, theme exposure, portfolio risk, holding counts, and time exits are revalidated in the execution layer.
- Turnover history and chart reliability: The 20-day five-minute cumulative turnover profile is atomically persisted and restored after a same-session restart. The market-breadth chart improves its time axis, tooltips, turnover comparisons, and latest-value visibility, while industry-flow playback adds faster speeds.
- Version notices and operations: The Dashboard header and settings page show the current version, newest strict SemVer release, and check state through a 15-minute Docker Hub cache. Automatic checks can be disabled and never pull, install, or restart anything. Windows first-run startup fixes early batch-variable expansion and stale error-level handling, with added mainland-China pip timeout and mirror guidance.
- Documentation and demos: Updated the Chinese and English READMEs, deployment guides, and strategy documentation, and refreshed walkthrough animations for market breadth, capital flow, Theme Strength, simulated trading, settings, market monitoring, X monitoring, and U.S. ratings.
Safety and compatibility
- The 30-second theme snapshot is a read-only research path; it does not change the active strategy, candidate cache, trading universe, or simulated account, and cannot trigger trades.
- The V-reversal probe does not lower the existing Emerging or Mainline confirmation thresholds. It can promote to Emerging, Leader, or Pullback only after qualifying across sessions.
- Insufficient quote coverage, turnover-source failures, or invalid scoring fields retain the last valid data or fail explicitly instead of overwriting account or real records with incomplete results.
- Existing explicit configuration continues to take precedence. Version checks are read-only by default, can be disabled, and never modify source deployments, containers, or local runtime data.
- Credentials, databases, portfolio state, logs, caches, and backups remain in the private local runtime directory and are excluded from public projections and release artifacts.
- NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 830 automated tests completed (829 passed and 1 conditionally skipped).
- Python, Dashboard JavaScript, Vue production build, Shell, Windows BAT, and GitHub main-branch CI checks passed.
- GitHub Actions container validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.5...v0.0.6
NiuOne v0.0.5 — 牛牛战法与全市场主线升级 / NiuOne Strategy and Market Mainline Upgrade
中文
NiuOne v0.0.5 聚焦于牛牛战法、全市场题材主线研究和盘面决策可靠性。本版本新增从强势股共振识别市场主线的完整工作流、独立题材强度研究页与全市场日 K 缓存,并统一盘面总结评价、候选展示和模拟执行约束;牛牛战法现为新安装和无显式配置场景的默认策略。
主要更新
- 牛牛战法与默认策略:新增牛牛领航、牛牛回踩和牛牛启动三类买点,通过跨交易日强势股共振确认主线与龙头梯队,并在模拟执行层硬性复核动态风险预算、总仓、主题敞口、单票上限、结构止损和时间退出;缺省策略切换为
niuone。 - 全市场题材强度研究:新增独立的“题材强度”页面和专用快照,展示市场状态、确认主线、日内观察主线、题材排名、核心股延续与数据覆盖原因;研究扫描与当前交易策略解耦,不会创建候选或触发模拟成交。
- 全市场日 K 缓存与扫描可靠性:交易日前预热支持范围内全部非 ST 股票最近 120 根前复权日 K,盘中复用日期有效缓存并合并实时行情,只对缺失或过期数据回源;失败时保留最近有效历史,避免不完整结果覆盖缓存。
- 盘面总结与决策统一:实战页统一“此刻盘面总结与评价”,定时和手动策略流程复用指数、行业资金、市场宽度、量能、盘面扫描与隔夜信息,候选资格、策略归属和不可交易原因展示更清晰。
- 量能模型与数据恢复:重构竞价及盘中成交额预测,按交易阶段使用竞价因子和五分钟累计分布;加强行业资金、隔夜行情、市场宽度和缓存历史在跨日、重启及外部接口异常时的保留与恢复。
- 龙虎榜与问财研究增强:补充涨停原因、席位与榜单信号,改进查询、归档和失败降级,让题材与候选研究获得更完整且可审计的上下文。
- 美股与消息面降级:增强美股板块行情、隔夜资金流和候选消息面预检的回退路径、上下文控制与错误边界,外部数据暂时不可用时保持明确状态。
- Dashboard 与跨平台细节:优化题材主线、实战候选、盘面总结和龙虎榜在移动端、亮色主题及响应式布局下的表现,并统一容器内 Python 解释器选择。
安全与兼容性
- 已显式设置的
DASHBOARD_ACTIVE_STRATEGY继续优先于新默认值,旧部署不会被静默改写。 - 牛牛战法的全市场非 ST 参考池仅用于识别主线,不会扩大
DASHBOARD_STOCK_UNIVERSE所限定的最终候选和新买入范围;已有持仓仍可执行卖出风控。 - 行情、K 线、问财、龙虎榜、新闻或模型数据缺失时采用有上限的重试、明确降级或最近有效数据,不用不完整响应重写真实记录。
- 密钥、数据库、账户状态、日志、缓存和备份继续保存在本地私有运行目录,不进入公开投影或发布产物。
- 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 787 项自动化测试通过。
- Python、Dashboard JavaScript、Vue 生产构建、Shell 与 Windows BAT 检查通过。
- GitHub Actions 容器发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.5 focuses on the NiuOne strategy suite, full-market theme-mainline research, and more reliable market decisions. This release adds an end-to-end workflow that derives market mainlines from strong-stock resonance, a standalone Theme Strength view, and a full-market daily-K-line cache, while unifying market evaluation, candidate presentation, and simulated-execution constraints. The NiuOne suite is now the default for new installations and environments without an explicit strategy setting.
Highlights
- NiuOne strategy and new default: Added Leader, Pullback, and Emerging setups that confirm mainlines and leader tiers through cross-session strong-stock resonance. The simulation layer enforces dynamic risk budgets, total and theme exposure, per-position caps, structural stops, and time exits. The default suite is now
niuone. - Full-market Theme Strength research: Added a standalone view and dedicated snapshot for market regime, confirmed and intraday-watch mainlines, theme rankings, core-stock continuity, and data-coverage reasons. Its research scan is decoupled from the active trading suite and cannot create candidates or simulated trades.
- Daily-K-line cache and scan reliability: Prewarms the latest 120 Tencent qfq daily bars for every supported non-ST stock before trading, reuses date-valid data intraday, merges live quotes, and fetches only missing or stale symbols. Failed refreshes retain the latest valid history.
- Unified market evaluation and decisions: The Practice view now uses one Current Market Summary and Evaluation across scheduled and manual workflows, combining indexes, industry flow, breadth, turnover, market scans, and overnight context. Candidate eligibility, strategy attribution, and trading blockers are clearer.
- Turnover modeling and data recovery: Rebuilt auction and intraday turnover projection with stage-specific auction factors and five-minute cumulative profiles. Industry flow, overnight quotes, market breadth, and historical caches now survive day rollovers, restarts, and upstream failures more safely.
- Dragon-Tiger and iWenCai research: Added limit-up reasons and richer seat and ranking signals, with more resilient querying, archival behavior, and explicit fallbacks for theme and candidate research.
- U.S. market and news fallbacks: Improved U.S. sector quotes, overnight money-flow retention, candidate-news prechecks, context limits, and failure boundaries so temporary upstream outages remain diagnosable.
- Dashboard and cross-platform refinements: Improved responsive and light-theme presentation for market mainlines, practice candidates, summaries, and Dragon-Tiger research, and unified Python interpreter selection in containers.
Safety and compatibility
- An explicit
DASHBOARD_ACTIVE_STRATEGYcontinues to override the new default, so existing deployments are not silently rewritten. - The full-market non-ST reference pool is used only for NiuOne mainline research; it does not expand final candidates or new entries beyond
DASHBOARD_STOCK_UNIVERSE. Existing positions remain eligible for risk exits. - Missing quote, K-line, iWenCai, Dragon-Tiger, news, or model data uses bounded retries, explicit fallbacks, or last-valid data instead of overwriting real records with incomplete responses.
- Credentials, databases, portfolio state, logs, caches, and backups remain in the private local runtime directory and are excluded from public projections and release artifacts.
- NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 787 automated tests passed.
- Python, Dashboard JavaScript, Vue production build, Shell, and Windows BAT checks passed.
- GitHub Actions container validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.4...v0.0.5
NiuOne v0.0.4 — Vue 看板与板块潮汐策略升级 / Vue Dashboard and Sector Tide Strategy Upgrade
中文
NiuOne v0.0.4 聚焦于 Dashboard 架构升级、A 股盘面研究和策略执行可靠性。本版本将公开看板与管理页迁移到 Vue 3 + Vite 和 FastAPI/Uvicorn,引入增量公开快照与按需加载,并新增板块潮汐策略、全市场宽度、行业主力资金流、龙虎榜研究和盘面复盘能力。
主要更新
- Vue + FastAPI 看板:公开页、模拟账户和管理页完成 Vue 3 组件化迁移,由 FastAPI/Uvicorn 在单端口提供页面与 API,保留原有访问入口和管理员安全边界。
- 增量快照与性能优化:新增字段白名单公开投影、内容寻址快照和区块摘要;前端仅在数据变化或栏目可见时加载,减少重复计算、轮询和公网传输。
- A 股盘面研究升级:覆盖完整 A 股涨跌宽度、盘中市场宽度图、20 日成交额投影、行业主力资金流,并新增每日盘面复盘及与实时行情的对比。
- 板块潮汐策略:新增基于市场状态、行业潮汐和板块内相对强度的独立策略套件,包含主线领航、轮动初升、冰点修复,以及模拟执行层的仓位、风险预算和退出约束。
- 龙虎榜与问财数据:新增问财连接测试、龙虎榜榜单与前五席位归档展示,并将上一交易日的有效数据作为板块潮汐候选确认信号;缺失或不完整数据保持中性降级。
- 选股范围配置:可在主板、创业板、科创板和 ST 范围间组合配置选股池,扫描、盘面宽度和决策上下文复用同一范围。
- 模型接入改进:新增模型连接测试,统一 Responses API 兼容路径,并完善 Grok 搜索工具、隔夜美股与候选消息面预检的上下文处理。
- 模拟交易可靠性:强化持仓策略归因、跨策略切换后的退出检查、收益曲线心跳与成交后恢复;公开读取保持无副作用,外部行情短暂失败会按上限重试。
- 主题与交互优化:新增亮色/暗色主题并同步公开页和管理页,优化移动端合规弹窗、导航计数、行业资金流过渡和图表布局。
- 容器与跨平台发布:Dashboard 可显示 Docker 镜像更新状态,Vue 构建支持 Shell 与 PowerShell;容器发布增加严格标签校验、可重试入口和双健康端点冒烟检查。
安全与兼容性
- 现有 Dashboard 地址、
/admin、环境变量优先级、支持的启动入口和历史模块兼容语义继续保留。 - 公开增量接口只发布字段白名单生成的数据;密钥、数据库、账户状态、日志和备份仍保存在本地私有运行目录。
- 外部行情、问财、龙虎榜、新闻或模型数据缺失时采用明确的重试、中性或历史有效数据降级,不用不完整响应覆盖真实记录。
- 本项目仅用于个人研究、模拟交易和信息展示,不连接券商、不使用真实资金,也不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 650 项自动化测试通过。
- Python、Dashboard JavaScript、Vue 生产构建、Shell 与 Windows BAT 检查通过。
- GitHub Actions 容器发布验证、amd64 冒烟测试和 amd64/arm64 镜像构建通过。
English
NiuOne v0.0.4 focuses on Dashboard architecture, A-share market research, and strategy-execution reliability. This release migrates the public Dashboard and admin page to Vue 3 + Vite and FastAPI/Uvicorn, introduces incremental public snapshots and on-demand loading, and adds the Sector Tide strategy, full-market breadth, industry main-fund flow, Dragon-Tiger research, and daily market recaps.
Highlights
- Vue + FastAPI Dashboard: The public page, simulated portfolio, and admin page are now componentized in Vue 3 and served with their APIs by FastAPI/Uvicorn on one port, while preserving existing entry points and admin security boundaries.
- Incremental snapshots and performance: Added allowlisted public projections, content-addressed snapshots, and section digests. The frontend loads only when data changes or a panel is visible, reducing repeated computation, polling, and public traffic.
- Expanded A-share market research: Added full-market advance/decline breadth, an intraday breadth chart, 20-day turnover projection, industry main-fund flow, and a daily recap that can be compared with live market data.
- Sector Tide strategy: Added an independent suite based on market regime, industry tide, and within-sector relative strength, with Main-theme Leader, Early Rotation, and Freeze Recovery setups plus simulation-layer sizing, risk-budget, and exit constraints.
- Dragon-Tiger and iWenCai data: Added iWenCai connectivity tests, Dragon-Tiger rankings, and top-five-seat archives. Valid prior-trading-day records can confirm Sector Tide candidates, while missing or incomplete data falls back neutrally.
- Configurable stock universe: Screening can combine main-board, ChiNext, STAR Market, and ST scopes; scans, market breadth, and decision context share the same configured universe.
- Model integration improvements: Added model connectivity tests, unified Responses API compatibility, and improved Grok search tools, overnight U.S. context, and candidate-news prechecks.
- More reliable simulated trading: Hardened position attribution, exits after strategy switches, equity-curve heartbeats, and post-trade recovery. Public reads remain side-effect free, and transient quote failures use bounded retries.
- Theme and interaction refinements: Added synchronized light and dark themes, and improved the mobile compliance dialog, navigation counts, industry-flow transitions, and chart layouts.
- Container and cross-platform releases: The Dashboard can report Docker image updates, Vue builds support Shell and PowerShell, and the release workflow now has strict tag verification, a safe retry path, and two-endpoint smoke checks.
Safety and compatibility
- Existing Dashboard URLs,
/admin, environment-variable precedence, supported launchers, and legacy module compatibility semantics remain available. - Incremental public APIs expose only allowlisted projection data; credentials, databases, portfolio state, logs, and backups remain in the private local runtime directory.
- Missing market, iWenCai, Dragon-Tiger, news, or model data uses bounded retries and explicit neutral or last-valid-data fallbacks instead of overwriting real records with incomplete responses.
- NiuOne is intended only for personal research, simulated trading, and information display. It does not connect to a brokerage, use real funds, provide investment advice, recommend securities, or serve as a basis for real buy or sell decisions.
Validation
- 650 automated tests passed.
- Python, Dashboard JavaScript, Vue production build, Shell, and Windows BAT checks passed.
- GitHub Actions container validation, the amd64 smoke test, and the amd64/arm64 image build passed.
Full Changelog: v0.0.3...v0.0.4
NiuOne v0.0.3 — 策略隔离与决策设置升级 / Strategy Isolation and Decision Settings Upgrade
中文
NiuOne v0.0.3 聚焦于策略隔离、交易风控和决策设置体验。本版本让不同策略的选股、买入、卖出与仓位规则保持独立,强化盘面风险与退出判断,并重新组织设置分组、保存流程和交易通知控制。
主要更新
- 策略方案隔离:基础策略、Z哥、李大霄和预设文字策略分别维护候选、买入、卖出、仓位与 Prompt 规则,避免不同策略相互混用。
- 交易风控优化:完善结构止损、组合盘面止跌确认和策略退出规则,移除不适合所有策略的固定止损约束。
- 手动交易周期:新增手动触发完整交易周期的能力,并优化相关状态和按钮文案。
- 候选数量控制:候选池展示数量与进入买卖决策的候选数量可分别配置。
- 综合决策参考:将指数、板块、资金流、热门股票等参考信息独立成设置分组,可控制启用状态、缓存周期和单类参考数据上限。
- 设置结构重整:新增“交易规则与风控”分组,将模型接入、风控纪律、选股与交易策略等职责清晰拆分。
- 保存体验改进:设置变更后显示悬浮保存栏,保存完成后自动收起,并支持 Ctrl/Cmd+S 快捷保存。
- 通知渠道控制:飞书、钉钉、企业微信和 Telegram 可分别启用或关闭;关闭渠道会保留配置但停止推送。
- 界面细节优化:调整设置卡片顺序、返回入口、状态开关表达和浏览器标题,并升级静态资源缓存版本。
- 数据可靠性修复:增强开盘竞价快照恢复与定时盘面总结的降级处理。
安全与兼容性
- 现有环境变量和配置键保持兼容,设置分组与显示名称调整不会导致已有配置丢失。
- 通知渠道关闭后不会发送测试或成交通知,Webhook、Bot Token 和签名密钥继续仅保存在本地运行目录。
- 本项目仅用于个人研究、模拟交易和信息展示,不构成投资咨询、投资建议、荐股服务或买卖依据。
验证
- 373 项自动化测试通过。
- Python、Dashboard JavaScript、Shell 与 Windows BAT 检查通过。
English
NiuOne v0.0.3 focuses on strategy isolation, trading risk controls, and decision-settings usability. This release keeps screening, entry, exit, position, and prompt rules separate across strategies, strengthens market-risk and exit handling, and reorganizes settings, saving, and notification controls.
Highlights
- Isolated strategy suites: Base, Z哥, 李大霄, and custom text strategies maintain independent screening, entry, exit, position, and prompt rules.
- Improved trading risk controls: Refined structural exits, composite market-stop confirmation, and strategy-specific exit handling while removing a universal fixed stop-loss rule.
- Manual trading cycle: Added a complete manually triggered trading cycle with clearer status and action labels.
- Candidate-count controls: Configure displayed candidate counts separately from candidates sent to the buy/sell decision model.
- Comprehensive decision reference: Market indices, sectors, money flow, hot stocks, and related context now have a dedicated settings group with enablement, cache duration, and per-category limits.
- Clearer settings structure: Added a dedicated trading-rules and risk-control group, separating model access, risk discipline, scheduling, and strategy configuration.
- Better saving workflow: A floating save bar appears only when changes exist, hides after successful saves, and supports Ctrl/Cmd+S.
- Independent notification channels: Feishu, DingTalk, WeCom, and Telegram can be enabled or disabled separately while retaining saved credentials.
- UI refinements: Improved settings-card ordering, back navigation, switch-state wording, browser titles, and static-asset cache versions.
- Data reliability fixes: Hardened opening-auction snapshot recovery and scheduled market-summary fallbacks.
Safety and compatibility
- Existing environment variables and configuration keys remain compatible; renamed or regrouped settings do not discard saved values.
- Disabled notification channels do not send test or trade notifications, while webhooks, bot tokens, and signing secrets remain local.
- NiuOne is intended for personal research, simulated trading, and information display only. It does not provide investment advice, stock recommendations, or a basis for real buy or sell decisions.
Validation
- 373 automated tests passed.
- Python, Dashboard JavaScript, Shell, and Windows BAT checks passed.
Full Changelog: v0.0.2...v0.0.3