๐ ็ฎไฝไธญๆ
Victor is a personified AI day-trading execution agent for Hong Kong and US equities, built on Claude Code. It watches the market, analyzes tickers, computes position sizing and stop levels, and emits structured trading signals โ while a human executes every order in the broker app.
This is not a traditional software project. There is no application to
npm installorcargo run. The repository is the agent: its entire behavior is shaped by theskillsandrulesunder.claude/, which Claude Code loads as Victor's operating discipline.
The agent is personified as Victor โ a disciplined intraday trading execution assistant for the Hong Kong and US markets. Victor is less a program and more a rule-shaped persona: everything about how it thinks and acts โ when to stay flat, how tightly to trail a stop, why it never places an order itself โ is encoded in the skills and rules in this repo, not in application code.
The name Victor ("conqueror, winner") reflects the project's aspiration toward profitable trading. But Victor's edge does not come from reckless aggression. It comes from factual rigor and iron discipline:
- Verify before stating. No factual or numeric claim leaves Victor's mouth unchecked.
- EV โฅ 0. Every entry is gated on positive expected value (win-rate ร payoff).
- Signal mode. Victor analyzes, watches, and signals โ it never touches an order. Execution belongs to the human.
The operating principle, in one line: losing money on a trade is acceptable risk; stating an unverified fact or breaking a guardrail is a bug โ and bugs are unacceptable.
Under the hood. The LLM driving Victor is GLM-5.2, presented to the outside world disguised as Opus-4.8. The model label is camouflage; what truly makes Victor Victor is the discipline encoded in this repo โ its skills, rules, and guardrails โ not the name on the underlying model.
| Principle | What it means |
|---|---|
| Facts first | Verify entity identity, arithmetic, trading calendar, API fields, and fees before asserting. Never pass a guess off as a fact. |
| Signal mode | Since 2026-07-07, Victor only emits signals (๐ข open / ๐ด close / ๐ก trailing stop / ๐ trailing take-profit). It never calls any order-placement command. |
| EV-driven | Every entry requires win-rate > 50% and payoff ratio > 1; otherwise no signal. |
| Signal-level review | Win-rate / payoff / EV tracked at the signal level (account-independent); actual account P&L is the user's to compute. |
| Knowledge sedimentation | AutoMemory persists in project-level .claude/memory/; hard rules distill into rules/ and skills/. The sediment self-check hook was removed 2026-07-15. |
Victor is activated by Claude Code whenever the user asks to watch the market, emit a signal, run a post-trade review, or analyze a ticker. On activation it loads the trade skill and runs its guardrails.
Standard watch sequence (scripts under .claude/skills/trade/scripts/):
preflight.pyโ verify time, market session, Futu OpenD porthot_list.pyโ pull the heat board (the mandatory first step for ticker selection)static+classify_hk_security.pyโ confirm the ticker's true identity and security typesnapshot.py/kline.pyโ snapshot + trend / Fibonacci retracementmonitor.pyโ dense sampling (default 6 rounds ร 10s) during the session
When a setup meets the EV bar, Victor emits a signal as a table in the chat (emoji-marked), with the stop price computed, then appends it to the day's signal log (HK / US split) for later review. The account is the user's choice โ Victor does not manage accounts or verify buying power; the human executes in their own broker app.
DayTradingAgent/
โโโ CLAUDE.md # Entry point โ points Claude at the rules & trade skill
โโโ LICENSE.md # MIT
โโโ README.md # This file (English)
โโโ README_cn.md # Chinese README
โ
โโโ .claude/
โ โโโ settings.local.json # Local-only: permissions + autoMemoryDirectory (gitignored)
โ โโโ settings.local.example.json # Template for settings.local.json (tracked)
โ โโโ memory/ # AutoMemory store (project-level, tracked โ not gitignored)
โ โ
โ โโโ rules/ # General working discipline (cross-domain)
โ โ โโโ verify-facts-before-stating.md
โ โ โโโ output-and-writing-style.md
โ โ โโโ knowledge-sedimentation.md
โ โ
โ โโโ skills/
โ โโโ trade/ # Domain execution spec โ the heart of Victor
โ โโโ SKILL.md # Master file: execution spec + hard guardrails
โ โโโ classify_hk_security.py # HK security-type classifier (stock/ETF/REIT/derivative)
โ โโโ config.example.json # Risk / monitoring config template
โ โโโ accounts.example.json # Tiger credential template
โ โโโ accounts.md # Tiger SDK config + HK code format
โ โโโ tiger-websocket.md # Tiger SDK WebSocket skeleton
โ โโโ hk-level2-sources.md # HK Level-2 data-source survey
โ โโโ futu-opend-level2.md # Futu OpenD Level-2 skeleton
โ โโโ quant/ # Quant data layer (schema, sources, README)
โ โโโ scripts/ # Watch-market script library
โ โโโ preflight.py
โ โโโ hot_list.py
โ โโโ snapshot.py
โ โโโ kline.py
โ โโโ monitor.py
โ โโโ alert.sh # Sound alert on signal output
โ
โโโ signals/ # Per-day signal logs at project root (HK / US split, HKT/ET suffix) + ring-log.csv
โโโ archive/ # Local-only history (gitignored): past memory snapshots (pre-refactor)
The real
config.jsonandaccounts.json(containing Tiger credentials) are gitignored โ only the*.example.jsontemplates ship in the repo. Thearchive/directory is likewise local-only.
Victor trades through and reads from three broker data sources:
| Source | Role | Notes |
|---|---|---|
Futu OpenD (futu-api) |
Primary market data (HK + US) | Free HK Level-2 (10-depth book + broker queue + capital flow) + US 10-depth + US capital flow; local gateway 127.0.0.1:11111 |
Tiger Brokers SDK (tigeropen) |
HK backup data + WebSocket push | HK Lv1/Lv2 verified; no US quote permission |
Victor only emits signals โ it never places orders. Which broker / account to use is the user's choice; the human executes in their own broker app. Market data comes from Futu + Tiger above.
Victor self-checks these before emitting any signal (full list in SKILL.md):
- One ticker at a time โ never open a new position while another is held.
- Position sizing from stop โ size =
max_loss_per_tradeรท per-share max loss, rounded to lot size; loss is capped by config, not by % of equity. - Stop price mandatory in every open signal โ set as a technical level; the human places it in the app.
- No derivatives โ stocks, ETFs (incl. 2ร/3ร leveraged), and REITs only; no options/warrants/CBBCs/futures.
- HK intraday / US 24h โ HK: regular session only (09:30-12:00 / 13:00-16:00), positions flattened before the 12:00 lunch break and the 15:45 close. US (since 2026-07-15): signals allowed around the clock โ pre / regular / after / overnight.
- Short allowed by default โ assume shortable unless told otherwise.
- Flat by end of day โ never carry a position overnight.
To actually run Victor, you need โ outside this repo:
- Claude Code
- Tiger SDK (
tigeropen) configured at~/.tigeropen/ - Futu OpenD local gateway running (HK Level-2 + US depth)
- A local
config.jsonandaccounts.jsonfilled in from the*.example.jsontemplates (accounts.json only needs the Tiger section); optionally copy.claude/settings.local.example.jsonโ.claude/settings.local.jsonand setautoMemoryDirectoryto your machine's absolute path to store AutoMemory inside the project (it defaults to Claude Code's global path otherwise)
Without these, the repo still reads as a complete spec of how a disciplined trading agent should behave.
Victor is currently in signal mode: AI signals, human executes โ the arrangement that (since 2026-07-07) rooted out the order-failure / reverse-position / stop-failure problems of direct AI ordering. Graduation to direct ordering requires sustained signal win-rate, payoff, and EV plus positive returns, and explicit user authorization.
Day trading involves substantial risk of loss. Victor emits analysis and signals for the account holder's decision โ it is not financial advice, and it does not execute trades. All orders are placed manually by the user in their own brokerage account. Past performance does not guarantee future results. The authors and contributors assume no liability for trading losses.
This project is released under the MIT License, and you are additionally asked to credit the author and cite the source whenever you use, redistribute, or build upon it:
- Author: All Contributors
- Project: Victor โ Day-Trading Agent (HK / US Equities)
- Source: https://github.com/xhqing/DayTradingAgent
If you fork, reference, or derive from this repository, please retain this attribution โ the author name, the project name, and the repository URL โ in your documentation, README, or acknowledgements.
MIT ยฉ 2026 All Contributors.