{"uid":"cap_GTaH0eIfUMn0-cfj1-Kf4","slug":"tasignal-backtest-ad7e2872","name":"TASignal Backtest","description":"Technical analysis, risk analytics and backtests for trading agents in one x402 API: RSI, MACD, EMA 20/50/200, Bollinger Bands, ATR, ADX, stochastic, realized volatility and a descriptive technical bias score for any crypto asset on 15m/1h/4h/1d candles; historical VaR/CVaR, max drawdown, Sharpe/Sortino and ATR-based position sizing; and rule backtests (SMA/EMA cross, RSI reversion, Donchian breakout, MACD cross) with fees, next-open fills, trade list and equity curve. Candles from Hyperliquid with dYdX v4 fallback. Read-only analytics; free preview and remote MCP. Not financial advice. Not financial advice. Past performance does not guarantee future results. Technical indicators, risk metrics and backtests describe historical prices only; they are not predictions or trade recommendations. TASignal never trades, holds funds or keys.","url":"https://tasignal.agentgate.workers.dev/v1/backtest?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["symbol","strategy"],"properties":{"bars":{"type":"integer","description":"Candles to test, 100-2000 (default 500)"},"fast":{"type":"integer","description":"Fast period (sma_cross/ema_cross default 20, macd_cross 12)"},"slow":{"type":"integer","description":"Slow period (sma_cross/ema_cross default 50, macd_cross 26)"},"lower":{"type":"number","description":"RSI entry level for longs (default 30)"},"upper":{"type":"number","description":"RSI entry level for shorts / exit (default 70)"},"period":{"type":"integer","description":"RSI period (default 14) or breakout lookback (default 20)"},"signal":{"type":"integer","description":"MACD signal period (default 9)"},"symbol":{"type":"string","description":"Base asset ticker, e.g. BTC, ETH, SOL, HYPE (BTC-PERP, ETH-USD and SOLUSDT are accepted too)"},"fee_bps":{"type":"number","description":"Fee per side in basis points (default 5)"},"strategy":{"enum":["sma_cross","ema_cross","rsi_reversion","breakout","macd_cross"],"type":"string","description":"Strategy rule"},"direction":{"enum":["long_only","long_short"],"type":"string","description":"default long_only"},"timeframe":{"enum":["15m","1h","4h","1d"],"type":"string","description":"Candle timeframe: 15m, 1h, 4h or 1d (default 1h; risk default 4h)"}},"description":"Search intents: crypto backtest api, backtest trading strategy, sma crossover backtest, rsi strategy test, trading strategy api, quant backtesting"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"tier":"backtest","market":"SOL","result":{"period":{"to":"2026-10-22T16:00:00.000Z","bars":450,"from":"2026-08-08T16:00:00.000Z"},"trades":2,"assumptions":"Signals on candle close, fills at the next candle open, fees per side as set; no slippage, funding, borrow or liquidity limits; position size 100% of equity, no leverage.","last_trades":[{"exit":99.676,"side":"long","entry":76.373,"exit_time":"2026-09-10T16:00:00.000Z","entry_time":"2026-08-08T16:00:00.000Z","return_pct":30.447},{"exit":115.84,"side":"long","entry":105.74,"exit_time":"2026-10-07T20:00:00.000Z","entry_time":"2026-09-18T12:00:00.000Z","return_pct":9.497}],"equity_curve":[["2026-08-08T16:00:00.000Z",0.99632],["2026-08-23T16:00:00.000Z",1.24486],["2026-09-07T16:00:00.000Z",1.36524],["2026-09-22T16:00:00.000Z",1.45808],["2026-10-07T16:00:00.000Z",1.42764],["2026-10-22T12:00:00.000Z",1.42693]],"exposure_pct":69.78,"win_rate_pct":100,"avg_trade_pct":19.972,"profit_factor":null,"sharpe_annual":3.869,"current_position":"flat","max_drawdown_pct":-10.327,"total_return_pct":42.693,"fees_bps_per_side":5,"annualized_return_pct":464.18,"buy_and_hold_return_pct":36.933,"excess_vs_buy_and_hold_pct":5.759},"source":"hyperliquid","symbol":"SOL","strategy":{"name":"ema_cross","params":{"fast":20,"slow":50},"direction":"long_only"},"timeframe":"4h","checked_at":"2026-10-22T19:00:54.904Z","confidence":"high","disclaimer":"Not financial advice. Past performance does not guarantee future results. Technical indicators, risk metrics and backtests describe historical prices only; they are not predictions or trade recommendations. TASignal never trades, holds funds or keys.","candles_used":500,"sources_failed":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__E4I88NCpBqLo5JWla4XB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs rule-based strategy backtests (SMA/EMA cross, RSI reversion, Donchian breakout, MACD cross) on crypto assets using historical candle data, returning trade list, equity curve, and performance metrics.","exampleAgentPrompt":"Run a backtest on SOL using an EMA cross strategy with fast period 20 and slow period 50 on 4-hour candles, long only, with 5 bps fees per side, over the last 500 bars — give me the total return, Sharpe ratio, max drawdown, and trade list.","exampleUseCases":[{"title":"EMA crossover strategy evaluation on BTC","prompt":"Backtest a 20/50 EMA cross strategy on BTC using 1-hour candles over 1000 bars, long only, with 5 bps fees — I want to see the total return, Sharpe, max drawdown, and how it compares to buy and hold."},{"title":"RSI reversion strategy for altcoin","prompt":"Can you run an RSI reversion backtest on ETH using 4-hour candles, long-short direction, with the RSI entry for longs at 30 and shorts at 70, 14-period RSI, over 500 bars with 7 bps fees per side?"},{"title":"Donchian breakout test on SOL","prompt":"Test a Donchian breakout strategy on SOL with a 20-bar lookback on daily candles, long only, 500 bars, 5 bps fees — show me the equity curve, win rate, and whether it beats buy and hold."}],"resultDescription":"Returns a JSON object with backtest period metadata, strategy parameters used, trade count, list of last trades (entry/exit price, return %, timestamps), a sampled equity curve, win rate, profit factor, Sharpe ratio (annualized), max drawdown, total and annualized return, buy-and-hold return, excess return vs buy-and-hold, exposure percentage, current position, fees applied, data source, confidence level, and a disclaimer.","failureModes":["Invalid or unrecognized symbol returns error — use base ticker like BTC, ETH, SOL","Unsupported strategy enum value returns validation error","Bars outside 100-2000 range rejected","Hyperliquid data unavailable and dYdX v4 fallback also fails — returns source error","Insufficient candle history for the requested bars/timeframe combination","Fast period >= slow period may produce degenerate results"],"whenToPreferThis":"Use this endpoint when you need a rapid quantitative backtest of a rule-based strategy on a crypto asset with realistic fee modeling, next-open fill assumptions, and standard performance metrics (Sharpe, drawdown, win rate) — especially when you want to compare strategy performance vs. buy-and-hold. Prefer this over manual analysis when the user wants to evaluate SMA/EMA cross, RSI reversion, Donchian breakout, or MACD cross rules across multiple timeframes without building their own data pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T19:03:51.383Z","isFirstParty":false,"canonicalSlug":"tasignal-backtest-ad7e2872"}