TradingView-only: strategy backtest
stock_backtestBacktest trading strategies like RSI, MACD, or EMA cross on stocks and coins using TradingView data, returning performance metrics and optional trade logs or equity curves.
Instructions
Backtest a strategy on a symbol (TradingView-only, single-source).
Finviz has no OHLCV history endpoint, so this cannot be cross-verified. The
response is labelled TRADINGVIEW and the notice says so.
Args:
symbol: Ticker or coin.
strategy: One of rsi, bollinger, macd, ema_cross,
supertrend, donchian, rsi_pullback, keltner_breakout,
triple_ema.
period: 6mo, 1y, 2y, 5y, …
initial_capital: Starting cash.
interval: 1d or 1h.
include_trade_log: Include the per-trade log.
include_equity_curve: Include the equity curve.
Returns:
Envelope labelled TRADINGVIEW with performance metrics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | 1y | |
| symbol | Yes | ||
| interval | No | 1d | |
| strategy | Yes | ||
| initial_capital | No | ||
| include_trade_log | No | ||
| include_equity_curve | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||