CRYPTYX x Coinbase — Autonomous Portfolio Manager
An autonomous portfolio manager that runs multiple strategies simultaneously, validates edges with walk-forward statistics, sizes positions with correlation-aware drawdown math, manages open positions as regimes evolve, and compounds its own alpha by persisting discovered edges as signals.
The 5-Phase Autonomous Loop
Phase 1: REVIEW ──────────────────────────────────────────────
│ Check every open position
│ Regime changed? → Close
│ Stop hit? → Close
│ Horizon expired? → Close
│ +15% profit? → Take half
│ Thesis intact? → Hold
│
Phase 2: DISCOVER (10 strategies in parallel) ───────────────
│ LONG: efficiency breakout, trend momentum, stealth
│ accumulation, correlation divergence, put/call
│ extreme, vol compression, capitulation reversal
│ SHORT: trend exhaustion, distribution breakdown,
│ funding squeeze
│ Each: composite backtest → universe scan → regime filter
│ Strategies that fail validation are skipped
│
Phase 3: CORRELATE & SIZE ────────────────────────────────────
│ Collect ALL candidates across ALL strategies
│ Compute pairwise correlation via factor scores
│ Penalize correlated positions (avoid concentration)
│ 7-component conviction score (0-100):
│ backtest + regime + factors + signals
│ + walk-forward bonus + correlation penalty + liquidity
│ Drawdown-based sizing with correlation adjustment
│
Phase 4: EXECUTE ─────────────────────────────────────────────
│ Preview orders (check fees/slippage)
│ Place orders with full conviction notes
│ Max 5 positions, 25% each, 75% total deployed
│
Phase 5: SIGNAL FACTORY (the compounding loop) ──────────────
Find closest existing signal to today's winning strategy
Fork it with discovered parameters
Backtest the fork over 90 days
If quality passes → ready for walk-forward validation
Next cycle benefits from the richer signal catalog
Strategy Library (10 strategies)
The agent runs all 10 strategies in parallel during Phase 2. Each maps to a concrete set of metric conditions across different factor classes.
Long (7)
| Strategy | Factor Classes | Thesis | Regime |
|---|---|---|---|
| Efficiency Breakout | EFF + TR | High price efficiency + trend acceleration | Trending |
| Trend Momentum | TR + FUT | Price above long MA + sustained positive funding | Trending |
| Stealth Accumulation | FLOW + VOL | Net buying pressure + suppressed volatility | Any |
| Correlation Divergence | CORR + EFF | BTC decorrelation + independent efficiency | Any |
| Put/Call Extreme | OPT + VOL | Elevated put/call ratio + vol spike (BTC/ETH only) | Mean-reverting |
| Volatility Compression | VOL + FLOW | Compressed RV + accumulation flow | Any |
| Capitulation Reversal | VOL + FLOW + FUT | Vol spike + selling pressure + funding stress | Mean-reverting |
Short (3)
| Strategy | Factor Classes | Thesis | Regime |
|---|---|---|---|
| Trend Exhaustion | TR + EFF | Far above MA + collapsing efficiency | Volatile |
| Distribution Breakdown | FLOW + TR | Heavy net selling + price below MA | Trending |
| Funding Squeeze | FUT + VOL | Extreme positive funding + elevated volatility | Volatile |
Conviction Scoring (0-100, 7 components)
| Component | Range |
|---|---|
| Backtest quality | 0-30 |
| Regime alignment | 0-20 |
| Factor support | 0-15 |
| Signal confirmation | 0-10 |
| Walk-forward bonus | 0-15 (if matching signal passed IS/OOS validation) |
| Correlation penalty | -20 to 0 (penalize if >0.7 correlated with existing position) |
| Liquidity bonus | 0-10 |
The correlation penalty is the key: it ensures the portfolio doesn't concentrate in correlated assets even if each individually scores well. Two 80-conviction assets that are 0.9 correlated is worse than one 80 and one 60 that are uncorrelated.
Signal Factory — The Compounding Loop
Cycle 1: Discover capitulation reversal edge on SUI
Fork CORR_SPIKE_BTC_30D with discovered params
Backtest: 12% trigger rate, 0.62 avg confidence
→ Signal proposed for validation
Cycle 2: Signal catalog now includes the forked signal
Cross-check finds it confirming a vol compression setup
→ +15 conviction bonus from walk-forward validation
→ Higher conviction → bigger position → more alpha
Cycle N: Signal catalog has grown from 29 to 45+ signals
Each was discovered by a previous cycle
Each was statistically validated (paired t-test, bootstrap CI)
The system is literally building its own intelligence
The compounding effect: Each cycle discovers edges → persists as signals → future cycles have richer cross-checking → higher conviction → better trades → discover more edges. This is a flywheel, not a one-shot.
Position Management (Regime-Adaptive)
Open positions are actively managed, not fire-and-forget:
| Condition | Action | Example |
|---|---|---|
| Stop-loss hit | Close | Entry $85k, stop $69.7k, current $69.5k |
| Regime flipped | Close | Entered on reversal, regime now trending |
| Horizon expired | Close | 30d hold target, day 31 |
| +15% unrealized | Trim 50% | Take profits, trail stop on remainder |
| -10% with >50% horizon left | Trim 50% | Reduce exposure, preserve capital |
| Thesis intact | Hold | PnL within range, regime stable |
Correlation-Aware Sizing
Raw size: risk_budget / max_dd_p95
(same as Kraken)
Correlation factor:
corr > 0.85 with existing position → × 0.3
corr > 0.70 → × 0.5
corr > 0.50 → × 0.75
corr < 0.50 → × 1.0
Deployment factor:
> 60% already deployed → × 0.5
> 40% deployed → × 0.75
< 40% deployed → × 1.0
Final size = raw × correlation × deployment
Example: $100k portfolio, 40% deployed, candidate correlated 0.75 with existing BTC position:
- Raw size: 1.5% / 8% = 18.75%
- Correlation: × 0.5 = 9.375%
- Deployment: × 0.75 = 7.03%
- Final: $7,030
Strategy Scorecard
Representative backtests from the composite metric slicer. Asset selection reflects metric scope — CORR metrics require a comparison asset, OPT metrics are Deribit-scope (BTC and ETH).
Long
| Strategy | Asset | Sharpe | Hit Rate | Episodes | Horizon | DD P95 |
|---|---|---|---|---|---|---|
| Efficiency Breakout | BTC | 3.47 | 77% | 102 | 14d | 17.5% |
| Efficiency Breakout | ETH | 2.56 | 69% | 91 | 14d | 25.2% |
| Trend Momentum | BTC | 2.68 | 65% | 52 | 30d | 17.6% |
| Correlation Divergence | ETH | 2.62 | 55% | 92 | 1d | 8.9% |
Short
| Strategy | Asset | Short Win Rate | Episodes | Horizon | DD P95 |
|---|---|---|---|---|---|
| Distribution Breakdown | BTC | 64% | 28 | 30d | 29.8% |
Backtests run against the CRYPTYX composite slicer API, April 2026, and independently validated. Full methodology — Sharpe calculation, horizon selection, episode independence, inclusion criteria — lives on the CRYPTYX methodology page. Strategies absent from the scorecard remain part of the agent's runtime library; they are excluded from the public view where episode counts or risk-adjusted returns at the best horizon fall outside the bar used for external publication.
Coverage across all 8 factor classes (CORR, EFF, FLOW, FUT, OB, OPT, TR, VOL), both directions, horizons from 1d to 365d.
Setup
cd integrations/coinbase
npm install
# Required
export ANTHROPIC_API_KEY="sk-ant-..."
export CRYPTYX_API_KEY="cx_..."
# Required for live mode only
export COINBASE_KEY_NAME="organizations/..."
export COINBASE_KEY_ID="..."
export COINBASE_PRIVATE_KEY="-----BEGIN EC PRIVATE KEY-----\n...\n-----END EC PRIVATE KEY-----"
# Demo mode (default)
npm run demo
# Live mode
npm run trade:live
File Structure
integrations/coinbase/
├── types.ts # Portfolio manager types (multi-strategy, correlation, validation)
├── coinbase-symbols.ts # CRYPTYX ↔ Coinbase pair mapping (BTC-USD format)
├── coinbase-auth.ts # JWT ES256 signing + REST client
├── portfolio-manager.ts # Multi-strategy orchestrator + correlation sizing + position review
├── signal-factory.ts # Fork → backtest → validate → persist loop
├── conviction-trader.ts # 5-phase autonomous agentic loop (27 tools)
├── test-strategies.ts # Backtest all strategies against real data
├── package.json # Standalone npm project
├── claude-desktop-config.json
└── README.md # This file
Technical Notes
Coinbase Auth (JWT ES256)
Coinbase uses short-lived JWTs (2-minute expiry) signed with ECDSA ES256 using an EC private key. Each request generates a fresh JWT — more secure but operationally complex for long-running agents.
Why 10 Strategies Simultaneously
The market doesn't present one clean thesis. On any given day:
- Efficiency Breakout might find 5 trending assets (EFF + TR)
- Trend Momentum might find 3 assets with structural funding (TR + FUT)
- Trend Exhaustion might find 1 short candidate (overextended + decaying efficiency)
- Put/Call Extreme might find BTC or ETH at a fear peak (OPT + VOL)
- Correlation Divergence might find 3 decorrelated movers (CORR + EFF)
- The other 5 strategies might find 0
Running 10 strategies (7 long + 3 short) across all 8 factor classes maximizes the opportunity surface. The correlation check prevents concentration even when multiple strategies identify the same asset. Every strategy has been backtested — no theoretical setups, only validated edges.
Walk-Forward Validation
The validation service uses paired t-tests and bootstrap CIs with a 70/30 IS/OOS split to test whether a signal's edge persists out-of-sample. This is the standard institutional approach to preventing overfitting — and it's built into the conviction score as a bonus, not just a gate. Signals that pass validation get +15 conviction points.