mcpField
W
wolf-strategy

wolf-strategy

github.com/senpi-aiOther140354 installsUpdated today
Repository

About wolf-strategy

Wolf is a two-book trading system that rotates according to a cross-asset market regime, for operators running risk-on and risk-off strategies. A shared regime detector gates entries; both books stand down in NEUTRAL conditions.

Key features

  1. 01Cross-asset regime detection
  2. 02Risk-on and risk-off books
  3. 03Regime-gated signals and entries
  4. 04Multi-timeframe trend and momentum scoring
  5. 05Per-book risk controls and exit rules

Use cases

  1. 01Rotate books as the macro regime changes
  2. 02Screen risk-asset longs in RISK_ON
  3. 03Trade defensive longs and risk shorts in RISK_OFF
  4. 04Run two separately configured trading daemons

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/senpi-ai/senpi-skills --skill wolf-strategy

After installing, type/wolf-strategyin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
runtime-risk_off.yaml
runtime-risk_on.yaml
config/
wolf-risk_off-config.json
wolf-risk_on-config.json
references/
skill-attribution.md
scripts/
wolf_config.py
wolf-producer.py

Details

From the project README

🐺 WOLF v1.0 — Event-Driven / Regime-Rotation Hedge Fund

Wolf trades the turn. It computes a single market-wide regime from cross-asset confirmation — equities, oil, gold, BTC, the dollar — and a book only fires when the regime agrees with its mandate. So the fund rotates: in a confirmed risk-on regime the risk-on book works and the risk-off book stands down; when the regime flips, they swap. No single asset can flip the book — the whole macro complex has to lean one way. One producer script (wolf-producer.py) serves both books; the WOLF_LEG env var selects which.

BookStyleFires whenWallet envRuntimeScanner
risk_onLong beaten-down betaregime == RISK_ONWOLF_RISK_ON_WALLETruntime-risk_on.yamlwolf_risk_on_signals
risk_offLong defensives + short riskregime == RISK_OFFWOLF_RISK_OFF_WALLETruntime-risk_off.yamlwolf_risk_off_signals

The two books are mutually exclusive in practice: at any moment one regime is (usually) in force, so one book trades while the other waits in cash. That is the rotation. In NEUTRAL (no net cross-asset agreement) both stand down.

What makes Wolf different

  • vs. a Thesis Fund (e.g. "Bet against the Trump economy"): a Thesis Fund takes a fixed side. Wolf is adaptive — it detects which way the regime is shifting and takes that side, flipping as conditions change.
  • vs. Elephant (global macro): Elephant trades each asset on its own trend. Wolf gates every entry on a market-wide regime read — its edge is the cross-asset transition, not the per-asset trend.
  • vs. Coyote (regime classifier): Coyote tags BTC's regime, crypto-only, single agent. Wolf reads the whole macro complex and runs a two-wallet long/short fund off it.

The shared regime detector (the brain)

Each tick, before either book scores anything, Wolf reads the 4h trend of a basket of cross-asset probes and tallies risk-on vs. risk-off votes:

ProbeVotes RISK-ON whenVotes RISK-OFF when
Equities (xyz:XYZ100 → SP500 fallback)4h BULLISH4h BEARISH
Oil (xyz:BRENTOIL)4h BEARISH (falling)4h BULLISH (spiking)
Gold (xyz:GOLD)4h BEARISH (safe-haven soft)4h BULLISH (bid)
BTC4h BULLISH4h BEARISH
Dollar (xyz:DXY)4h BEARISH (soft $)4h BULLISH (bid)

net = on_votes − off_votes. RISK_ON if net ≥ regimeThreshold (default 2); RISK_OFF if net ≤ −regimeThreshold; else NEUTRAL. A book whose regime isn't in force emits a STANDING DOWN tick and trades nothing.

RISK-ON book — long beaten-down beta (LONG only)

Universe = the risk complex (riskAssets: BTC/ETH/SOL/HYPE/SUI + growth indices). Fires only in RISK_ON, then scores each name for a clean turn up:

ComponentPts
4h BULLISH backbone+2 (required — skip if not BULLISH)
1h confirmation+2 (BULLISH) / −1 (BEARISH)
24h momentum+2 (≥momThresholdPct 1.0%) / +1 (≥0)
RSI room+1 (< overbought)

minScore 5. The regime is the green light; the name still has to be turning up.

RISK-OFF book — defensives + short-risk (both directions)

Fires only in RISK_OFF. LONG the defensives (defensives: gold/silver/oil/dollar/yen) that are trending up; SHORT the riskAssets that are rolling over. Same trend/confirm/momentum/RSI scoring, evaluated in the mandated direction (LONG wants 4h BULLISH; SHORT wants 4h BEARISH). minScore 5.

Execution & exit

  • both books: slots 3, strict 5x clamp (indices/metals/FX cap low at venue), tick 300s
  • RISK-ON margin_pct 20% — DSL wide let-it-run (a relief rally runs): phase1 max_loss 14%, all time-cuts OFF, hard_timeout 5d; phase2 12%→0 / 25%→45 / 45%→65 / 80%→80 / 130%→90
  • RISK-OFF margin_pct 18% — DSL tighter (risk-off moves are sharp + reverse fast): phase1 max_loss 10%, weak_peak_cut ON (4h @ 1.5), dead_weight_cut ON (8h), hard_timeout 3d; phase2 8%→35 / 15%→55 / 30%→70 / 50%→85

A regime flip is handled on the entry side (the losing-regime book stops adding); open winners trail out via the phase2 ladder — Wolf does not dump a book just because the regime turned.

XYZ handling

Much of the universe + every regime probe except BTC is XYZ — candle fetches route with dex="xyz" (the producer keys off the xyz: prefix). XYZ trades 24/7 (no market-hours gating). The main/xyz clearinghouse sections are two VIEWS of ONE cross-margined wallet, so get_positions() takes accountValue ONCE via max() — never sums.

Risk gates (risk.guard_rails)

Gaterisk_onrisk_off
daily_loss_limit_pct1210
max_entries_per_day58
max_consecutive_losses44
cooldown_minutes9060
drawdown_halt_pct2218
per_asset_cooldown_minutes240180
data_retention_hours168120
drawdown_reset_on_day_rollovertruetrue

Entries and exits both use FEE_OPTIMIZED_LIMIT (ensure_execution_as_taker true).

Files

FilePurpose
runtime-risk_on.yamlRisk-on-book runtime spec (wide let-it-run DSL)
runtime-risk_off.yamlRisk-off-book runtime spec (tighter DSL)
scripts/wolf-producer.pyBook-aware producer daemon (shared regime detector + both books)
scripts/wolf_config.pyLeg resolution + SenpiClient wrapper + helpers
config/wolf-risk_on-config.jsonRisk-on tunables (riskAssets, regimeThreshold)
config/wolf-risk_off-config.jsonRisk-off tunables (defensives + riskAssets)

Operator install

See README.md — the two books are two daemons (WOLF_LEG=risk_on and WOLF_LEG=risk_off) on two wallets (default 50/50 funding so each regime has equal firepower), each with its own runtime YAML.

Hard rule for user-conversation Claude sessions

User-conversation Claude sessions MUST NOT call any of: create_position, close_position, edit_position, ratchet_stop_add, ratchet_stop_edit, ratchet_stop_delete, cancel_order, strategy_close, strategy_close_positions.

These tools are reserved for the producer daemon (entry path) and the DSL ratchet engine (exit path). User-conversation sessions are read-only. Each producer daemon handles real signals on its next tick.

License

Apache-2.0 — Copyright 2026 Senpi (https://senpi.ai)

Comments

Markdown supported