Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sherwood.sh/llms.txt

Use this file to discover all available pages before exploring further.

The sherwood agent command group runs an autonomous trading agent that uses multi-signal scoring (technical analysis, sentiment, on-chain data) to make paper-trading decisions. Currently operates in dry-run mode — no real trades are executed.

agent analyze

Analyze one or more tokens using the multi-signal scoring engine.
# Analyze specific tokens
sherwood agent analyze ethereum bitcoin solana

# Analyze the full default watchlist
sherwood agent analyze --all

# Output as JSON
sherwood agent analyze ethereum --json
The analysis combines 5 signal categories:
  • Technical (20%) — RSI, MACD, Bollinger Bands, EMA crossovers, ATR, VWAP
  • Sentiment (20%) — Fear & Greed index, social sentiment Z-score
  • On-Chain (15%) — TVL momentum, DEX flow analysis
  • Fundamental (10%) — Token unlock events, funding rates
  • Smart Money (25%) — Nansen-style smart money flow (when available)
Each signal produces a score from -1.0 (strong sell) to +1.0 (strong buy). The weighted composite determines the trade action: STRONG_BUY, BUY, HOLD, SELL, or STRONG_SELL.

agent signals

Show detailed signal breakdown for a single token.
sherwood agent signals ethereum
Displays raw technical indicators (RSI, MACD, BB width, EMAs, ATR, VWAP), sentiment data (Fear & Greed, Z-score), and computed signal scores with visual bar charts.

agent start

Start the autonomous trading loop in paper-trading mode.
# Default: 4h cycle, dry-run, default watchlist
sherwood agent start

# Custom configuration
sherwood agent start \
  --cycle 1h \
  --tokens ethereum,bitcoin,solana,aave \
  --log ~/agent-logs
OptionDefaultDescription
--cycle4hAnalysis cycle interval (15m, 1h, 4h)
--dry-runtruePaper trading mode (default)
--tokensethereum,bitcoin,solana,aave,uniswapComma-separated token watchlist
--lognonePath to write cycle log JSONL files
--modedry-runExecution mode: dry-run or hyperliquid-perp
--strategy-clonenoneStrategy clone address on HyperEVM (required for hyperliquid-perp)
--chainethereumChain for live execution (hyperevm, hyperevm-testnet)

Live Execution (Hyperliquid Perp)

To run the agent in live mode against a deployed HyperliquidPerpStrategy:
SHERWOOD_PROPOSER_KEY=0x... sherwood agent start \
  --mode hyperliquid-perp \
  --strategy-clone 0x... \
  --chain hyperevm \
  --tokens ethereum \
  --cycle 1h
The agent will call updateParams() on the strategy clone to open/close positions and manage stop-losses. The proposer private key is read from the SHERWOOD_PROPOSER_KEY environment variable (never passed as a CLI argument). The loop loads any persisted risk configuration from ~/.sherwood/agent/config.json (written by agent config --set). Each cycle:
  1. Resets daily/weekly/monthly PnL counters at boundaries
  2. Updates prices for open positions
  3. Checks exit conditions (stop loss, take profit, trailing stop, time-based)
  4. Analyzes each token in the watchlist
  5. Executes paper trades for high-conviction signals
  6. Logs results to disk
Press Ctrl+C for graceful shutdown.

agent status

Show current portfolio, open positions, and daily PnL.
sherwood agent status
Fetches live prices from CoinGecko to update unrealized PnL for open positions.

agent history

Show trade history and performance metrics.
# Last 30 days (default)
sherwood agent history

# Custom lookback period
sherwood agent history --days 7
Displays a table of closed trades with entry/exit prices, PnL, and exit reasons, followed by performance metrics: win rate, Sharpe ratio, max drawdown, best/worst trades.

agent config

Show or update risk management parameters.
# Show current config
sherwood agent config

# Set a parameter
sherwood agent config --set maxSinglePosition=0.15
sherwood agent config --set dailyLossLimit=0.03
sherwood agent config --set maxConcurrentTrades=5
Configuration is persisted to ~/.sherwood/agent/config.json and loaded automatically when agent start runs.
ParameterDefaultBoundsDescription
maxPortfolioRisk15%1-50%Maximum aggregate portfolio risk
maxSinglePosition10%1-25%Maximum size per position
maxCorrelatedExposure20%5-50%Max exposure to correlated tokens
maxConcurrentTrades81-20Maximum open positions
hardStopPercent12%1-30%Hard stop-loss per position
trailingStopAtr1.5x0.5-5xTrailing stop distance in ATR multiples
dailyLossLimit5%1-30%Daily loss limit (pauses trading)
weeklyLossLimit10%1-50%Weekly loss limit
monthlyLossLimit15%1-60%Monthly loss limit
riskPerTrade2%0.5-5%Risk per trade (Kelly-adjacent sizing)

agent backtest

Backtest strategies on historical CoinGecko data.
sherwood agent backtest bitcoin \
  --from 2024-01-01 \
  --to 2024-12-31 \
  --capital 10000 \
  --cycle 1d
OptionDefaultDescription
--from2024-01-01Start date (YYYY-MM-DD)
--to2024-12-31End date (YYYY-MM-DD)
--capital10000Initial capital in USD
--cycle1dCandle interval (1h, 4h, 1d)
--strategiesallComma-separated strategy filter
Reports total return, Sharpe ratio, max drawdown, win rate, and an equity curve summary.

Data Storage

All agent data is stored in ~/.sherwood/agent/:
FileDescription
config.jsonRisk configuration overrides
portfolio.jsonCurrent portfolio state (positions, cash, PnL)
trades.jsonTrade history (all closed trades)
cycles.jsonlCycle logs (if --log is set)