wolf-howl
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHOWL v2 — Hunt, Optimize, Win, Learn
HOWL v2 — 狩猎、优化、获胜、学习
The WOLF hunts all day. At night, it HOWLs — reviewing every kill and miss, sharpening its instincts, and waking up sharper tomorrow.
Automated daily retrospective with data-driven self-improvement suggestions for the WOLF strategy.
WOLF全天狩猎。到了夜间,它会发出HOWL——复盘每一次得手和失手,打磨自己的直觉,第二天醒来时变得更敏锐。
为WOLF策略提供的自动化每日复盘工具,附带数据驱动的自我改进建议。
Setup
搭建配置
Run the setup script to configure the nightly HOWL:
bash
python3 scripts/howl-setup.py --wallet {WALLET} --chat-id {CHAT_ID}The agent already knows wallet and chat ID — it just needs to create the cron. Optionally set run time (default: 23:55 local) and timezone.
运行搭建脚本配置夜间HOWL任务:
bash
python3 scripts/howl-setup.py --wallet {WALLET} --chat-id {CHAT_ID}Agent已经知晓钱包和聊天ID——仅需要创建cron任务。可选择性设置运行时间(默认:本地时间23:55)和时区。
How It Works
工作原理
The cron fires daily and spawns an isolated sub-agent that:
cron任务每日触发,生成一个隔离的子Agent,执行以下操作:
1. Gathers Data
1. 收集数据
- Reads (today + yesterday)
memory/YYYY-MM-DD.md - Reads for cumulative context
MEMORY.md - Reads all files (active = current positions, inactive = closed trades)
dsl-state-WOLF-*.json - Reads for current config
wolf-strategy.json - Reads for FDR data (v5.1+)
wolf-trade-counter.json - Queries Senpi trade history via mcporter
- Reads scanner script for current filter thresholds
- 读取 (当日+前一日)
memory/YYYY-MM-DD.md - 读取 获取累积上下文
MEMORY.md - 读取所有 文件(active = 当前持仓,inactive = 已平仓交易)
dsl-state-WOLF-*.json - 读取 获取当前配置
wolf-strategy.json - 读取 获取FDR数据(v5.1及以上版本)
wolf-trade-counter.json - 通过mcporter查询Senpi交易历史
- 读取扫描器脚本获取当前筛选阈值
2. Analyzes Each Closed Trade
2. 分析每笔已平仓交易
For every trade: asset, direction, entry/exit price, PnL (gross and net), ROE, fees paid, duration, max ROE (high water), DSL tier reached, entry signal type and quality (reason count, rank jump, contrib velocity, trader count), SM conviction at entry vs exit, close trigger (DSL breach/Phase 1 auto-cut/stagnation/conviction collapse/rotation/manual).
针对每笔交易:标的、方向、开仓/平仓价格、PnL(毛利和净利)、ROE、支付的手续费、持仓时长、最高ROE(高水位线)、达到的DSL层级、入场信号类型和质量(原因数量、排名跃升、贡献速度、交易者数量)、开仓和平仓时的SM置信度、平仓触发原因(DSL突破/第一阶段自动止损/持仓停滞/置信度崩塌/调仓/手动操作)。
3. Computes Metrics
3. 计算指标
Core:
- Win rate, avg winner vs avg loser PnL, profit factor (gross AND net)
- Total fees paid, fee drag ratio (fees / account value)
- Net PnL vs gross PnL — if gross is positive but net is negative, fees are the problem
Signal Quality:
- Signal quality correlation (do higher reason counts → better outcomes?)
- FIRST_JUMP vs IMMEDIATE_MOVER vs DEEP_CLIMBER win rates
- Entry rank vs outcome — are entries from rank #20-30 better than #10-20?
DSL Performance:
- Tier distribution (how many reached Tier 1/2/3/4 vs Phase 1 closes?)
- Phase 1 auto-cut count and savings (what would they have lost without the cut?)
Holding Period Buckets (v2 — critical):
- < 30 min: count, win rate, PnL, fees (expect: poor — rotations and panic cuts)
- 30-90 min: count, win rate, PnL, fees (expect: sweet spot)
- 90+ min: count, win rate, PnL, fees (expect: dead weight)
Direction Analysis (v2):
- LONG win rate, PnL, profit factor
- SHORT win rate, PnL, profit factor
- Flag if one direction is dramatically worse (regime mismatch)
Other:
- Slot utilization (% time filled vs empty)
- Dead weight duration (how long losers sat before cut)
- Missed opportunities (top movers we didn't trade)
- Rotation count and net cost (fees paid for rotation trades)
核心指标:
- 胜率、平均盈利/平均亏损PnL、利润因子(毛利 AND 净利)
- 总支付手续费、费用拖累率(手续费/账户价值)
- 净利润PnL对比毛利PnL——如果毛利为正但净利为负,说明手续费是核心问题
信号质量:
- 信号质量相关性(更高的原因数量是否对应更好的交易结果?)
- FIRST_JUMP、IMMEDIATE_MOVER、DEEP_CLIMBER各自的胜率
- 入场排名与交易结果的关联——排名20-30名的入场标的是否比10-20名的表现更好?
DSL表现:
- 层级分布(多少交易达到了1/2/3/4层级 vs 第一阶段平仓的数量?
- 第一阶段自动止损的次数和节省的资金(如果不止损会损失多少?)
持仓周期分组(v2新增——核心指标):
- < 30 min: count, win rate, PnL, fees (expect: poor — rotations and panic cuts)
- 30-90 min: count, win rate, PnL, fees (expect: sweet spot)
- 90+ min: count, win rate, PnL, fees (expect: dead weight)
方向分析(v2新增):
- LONG胜率、PnL、利润因子
- SHORT胜率、PnL、利润因子
- 如果某一方向表现极差则标记(市场状态不匹配)
其他指标:
- 仓位利用率(持仓时间占比,满仓vs空仓的时间比例)
- 无效持仓时长(亏损仓位在止损前持有了多久)
- 错失的机会(我们没有交易的涨幅居前标的)
- 调仓次数和净成本(调仓交易支付的手续费)
4. Identifies Patterns
4. 识别规律
- Entry patterns distinguishing winners from losers
- DSL effectiveness (too tight? too loose?)
- Stagnation thresholds (cutting dead weight fast enough?)
- Scanner filter accuracy (catching right signals?)
- Position sizing optimization
- Timing patterns
- Fee drag pattern (v2): Is the agent overtrading? How many trades before FDR hits 10%?
- Holding period pattern (v2): Are short-hold trades systematically worse?
- Direction bias (v2): Is the agent fighting the trend? LONGs in a selloff = disaster.
- Monster trades (v2): Did a few big winners save the day? How many trades produced 80% of PnL?
- 区分盈利和亏损交易的入场规律
- DSL有效性(太严格?太宽松?)
- 持仓停滞阈值(止损无效持仓的速度是否足够快?)
- 扫描器筛选准确率(是否捕捉到了正确的信号?)
- 仓位规模优化
- 时机规律
- 费用拖累规律(v2新增):Agent是否交易过度?FDR达到10%之前有多少笔交易?
- 持仓周期规律(v2新增):短持仓周期的交易是否系统性表现更差?
- 方向偏差(v2新增):Agent是否在逆势交易?下跌行情中做多=灾难。
- 大额盈利交易(v2新增):是否靠少数几笔大额盈利交易撑起了整体收益?80%的PnL来自多少笔交易?
5. Produces Report
5. 生成报告
Saves full report to with:
memory/howl-YYYY-MM-DD.md- Summary stats (trades, win rate, gross PnL, net PnL, fees, FDR, profit factor gross/net)
- Trade log table
- Holding period buckets breakdown
- Direction breakdown (LONG vs SHORT)
- What worked / what didn't (data-backed)
- Pattern insights
- Recommended improvements (high/medium/low confidence)
- Config change suggestions
将完整报告保存到 ,包含:
memory/howl-YYYY-MM-DD.md- 汇总统计(交易数量、胜率、毛利PnL、净利PnL、手续费、FDR、毛利/净利利润因子)
- 交易记录表
- 持仓周期分组明细
- 方向明细(LONG vs SHORT)
- 有效/无效交易总结(数据支撑)
- 规律洞察
- 推荐改进项(高/中/低置信度)
- 配置修改建议
6. Updates Memory & Delivers
6. 更新记忆并推送
- Appends distilled summary to
MEMORY.md - Sends concise Telegram summary to user
- Drift check (v2): If 3+ consecutive HOWLs suggest the same change, escalate urgency in the report
- 将提炼的汇总信息追加到
MEMORY.md - 向用户发送精简的Telegram汇总消息
- 漂移检测(v2新增):如果连续3次及以上的HOWL报告都建议相同的修改,在报告中提升建议的紧急程度
Report Format
报告格式
See for the exact output format.
references/report-template.md查看 了解准确的输出格式。
references/report-template.mdv2 Analysis Additions
v2版本新增分析项
These were discovered by running HOWL v1 on live WOLF v5 trading data and finding blind spots:
这些新增项是通过在实盘WOLF v5交易数据上运行HOWL v1发现盲区后补充的:
Fee Drag Ratio Analysis
费用拖累率分析
The single biggest insight from the first HOWL: fees ate an entire profitable day. 32 trades × $32 avg = $1,034 in fees (18.3% of account). Gross PnL was +$888, but net was -$146. HOWL must compute and prominently display FDR alongside PnL. If gross PF > 1.0 but net PF < 1.0, the recommendation is fewer, higher-quality trades — not better entries.
第一个HOWL带来的最大洞察:**手续费吞噬了一整个盈利日的收益。32笔交易 × 平均32美元 = 1,034美元手续费(占账户的18.3%)。毛利PnL为+888美元,但净利为-146美元。HOWL必须计算FDR并和PnL一起醒目展示。如果毛利PF > 1.0但净利PF < 1.0,建议减少交易次数、做更高质量的交易——而不是优化入场点位。
Holding Period Buckets
持仓周期分组
Trades bucketed by hold time revealed that < 30 min trades were systematically terrible (-$705 combined) while 60-90 min trades were the sweet spot (+$704, 57% WR). HOWL must bucket every trade and flag if < 30 min trades are negative contributors.
按持仓时间分组的交易显示,持仓<30分钟的交易系统性表现极差(合计亏损705美元),而60-90分钟的交易表现最优(盈利704美元,胜率57%)。HOWL必须对每笔交易分组,如果<30分钟的交易为负贡献则进行标记。
Direction Regime Detection
方向市场状态检测
4W/12L on LONGs (25% WR, PF 0.05) vs profitable SHORTs. HOWL must split metrics by direction and flag when one side is dramatically underperforming — this indicates a regime mismatch (trading LONGs in a selloff).
4W/12L on LONGs (25% WR, PF 0.05) vs 盈利SHORT交易。HOWL必须按方向拆分指标,如果某一方向表现极差则标记——这说明市场状态不匹配(在下跌行情中做多)。
Monster Trade Dependency
大额盈利交易依赖度
3 Tier 4 trades produced +$1,443 while everything else combined was -$556. HOWL must identify what % of PnL came from top N trades and whether the strategy would survive without them.
3笔4层级交易带来了+1,443美元收益,而其余所有交易合计亏损556美元。HOWL必须识别前N笔交易贡献了多少比例的PnL,以及没有这些交易策略是否还能盈利。
Rotation Cost Tracking
调仓成本跟踪
Each rotation costs ~$65 (close fee + open fee). HOWL must track rotation count, total rotation cost, and whether rotations produced net positive outcomes.
每次调仓成本约65美元(平仓手续费+开仓手续费)。HOWL必须跟踪调仓次数、总调仓成本,以及调仓是否带来了净正向收益。
Rules
规则
- Every recommendation must be backed by data from the last 24h
- Don't change things that are working — if win rate is high, don't fix what isn't broken
- Small incremental improvements > big overhauls
- If < 3 trades in 24h, still analyze "why so few?" — don't just skip. Was the FDR gate locked? Was the market dead? Were signals filtered too aggressively?
- Compare today vs cumulative stats to spot trends
- Be brutally honest — no sugarcoating losses
- Always separate gross vs net. A "profitable" strategy that loses money after fees is not profitable.
- Flag regime mismatches early. If LONGs are 0-for-5, say "stop taking LONGs" — don't wait for 0-for-12.
- 每条建议都必须有过去24h的数据支撑
- 不要修改运行正常的部分——如果胜率很高,就不要画蛇添足
- 小步渐进式优化 > 大规模重构
- 如果24h内交易少于3笔,依然要分析「为什么这么少?」——不要直接跳过。是FDR闸门被锁定了?市场行情平淡?还是信号筛选太严格?
- 对比当日数据和累积统计数据来发现趋势
- 保持绝对客观——不要掩饰亏损
- 永远区分毛利和净利。 一个在扣除手续费后亏损的「盈利」策略并不是真的盈利。
- 尽早标记市场状态不匹配。 如果LONG交易5次全部亏损,直接说「停止做LONG交易」——不要等到12次全部亏损才说。
Customization
自定义配置
Edit to adjust what the sub-agent analyzes. The prompt is read by the sub-agent at runtime, so changes take effect on the next HOWL without restarting crons.
references/analysis-prompt.md编辑 来调整子Agent的分析内容。提示词会在运行时被子Agent读取,因此修改会在下一次HOWL运行时生效,无需重启cron任务。
references/analysis-prompt.mdFiles
文件说明
| File | Purpose |
|---|---|
| Setup wizard — creates the nightly HOWL cron |
| Full sub-agent analysis prompt (editable) |
| Output report format |
| 文件 | 用途 |
|---|---|
| 配置向导——创建夜间HOWL cron任务 |
| 完整的子Agent分析提示词(可编辑) |
| 输出报告格式 |