Skip to main content
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.
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.
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.
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 (live perp not yet available on Robinhood testnet)
--strategy-clonenoneStrategy clone address (required for hyperliquid-perp)

Live Execution (Hyperliquid Perp)

Live Hyperliquid-perp execution requires a chain where the Hyperliquid strategy is deployed. It is not yet available on Robinhood testnet (chain 46630), Sherwood’s current deployment target. The agent paper-trades here; live execution comes online as Sherwood expands to more chains.
To run the agent in live mode against a deployed HyperliquidPerpStrategy:
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.
Fetches live prices from CoinGecko to update unrealized PnL for open positions.

agent history

Show trade history and performance metrics.
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.
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.
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)