Skip to content
Agentmart
Submit a tool

backtester

Backtest trading strategies with historical data.

Skill by Signal-Execution-Labs

IndexedMIT★ 176
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/signal-execution-labs-backtester

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Backtest trading strategies with historical data. Calculate performance metrics and generate reports.

Use cases: data, finance

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/backtester

What's inside

Skill name
backtester
Description
Backtest trading strategies with historical data. Calculate performance metrics and generate reports.
License
MIT
Instructions
356 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (2)

  • SKILL.md
  • backtest_runner.py · scripts/

SKILL.md (first lines)

# Backtester

Test trading strategies against historical data before risking real money.

## Overview

- **Historical Data** - Load OHLCV from exchanges
- **Strategy Testing** - Simulate trades with rules
- **Performance Metrics** - Win rate, Sharpe, drawdown
- **Report Generation** - Detailed analysis

## Commands

### Load Historical Data

```bash
python3 -c "
import ccxt
import pandas as pd
from datetime import datetime, timedelta

symbol = 'BTC/USDT'
timeframe = '1d'
exchange = ccxt.binance()

# Fetch 1 year of data
since = exchange.parse8601((datetime.now() - timedelta(days=365)).isoformat())
ohlcv = exchange.fetch_ohlcv(symbol, timeframe, since=since, limit=365)

df = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
df['date'] = pd.to_datetime(df['timestamp'], unit='ms')

print(f'📊 HISTORICAL DATA: {symbol}')
print('=' * 50)
print(f'Timeframe: {timeframe}')
print(f'Period: {df[\"date\"].iloc[0].date()} to {df[\"date\"].iloc[-1].date()}')
print(f'Candles: {len(df)}')
print(f'Price Range: \${df[\"low\"].min():,.2f} - \${df[\"high\"].max():,.2f}')

# Save for backtesting
# df.to_csv(f'{symbol.replace(\"/\", \"_\")}_{timeframe}.csv', index=False)
"
```

### Simple RSI Backtest

```bash
python3 -c "
import ccxt
import ta
import pandas as pd
import numpy as np

# Load data
symbol = 'BTC/USDT'
exchange = ccxt.binance()
ohlcv = exchange.fetch_ohlcv(symbol, '1d', limit=365)
df = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])

# Calculate RSI
df['rsi'] = ta.momentum.RSIIndicator(df['close'], 14).rsi()

# Strategy: Buy RSI < 30, Sell RSI > 70
initial_capital = 10000
capital = initial_capital
position = 0
trades = []

for i in range(1, len(df)):
    rsi = df['rsi'].iloc[i]
    price = df['close'].iloc[i]
    
    if rsi < 30 and position == 0:  # Buy signal
        position = capital / price
        capital = 0
        trades.append({'type': 'buy', 'price': price, 'rsi': rsi})
    
    elif rsi > 70 and position > 0:  # Sell signal
        capital = position * price
        position = 0
        trades.append({'type': 'sell', 'price': price, 'rsi': rsi})

# Close final position
if position > 0:
    capital = position * df['close'].iloc[-1]

final_value = capital
total_return = ((final_value - initial_capital) / initial_capital) * 100
buy_hold_return = ((df['close'].iloc[-1] - df['close'].iloc[0]) / df['close'].iloc[0]) * 100

print(f'📊 RSI STRATEGY BACKTEST: {symbol}')
print('=' * 50)
print(f'Period: {len(df)} days')
print(f'Initial Capital: \${initial_capital:,.2f}')
print(f'Final Value: \${final_value:,.2f}')
print()
print(f'Strategy Return: {total_return:+.2f}%')
print(f'Buy & Hold Return: {buy_hold_return:+.2f}%')
print(f'Outperformance: {total_return - buy_hold_return:+.2f}%')
print()
print(f'Total Trades: {len(trades)}')
"
```

### Moving Average Crossover Backtest

```bash
python3 -c "
import ccxt
import ta
import pandas as pd
import numpy as np

symbol = 'BTC/USDT'
exchange = ccxt.binance()
ohlcv = exchange.fetch_ohlcv(symbol, '4h', limit=500)
df = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])

# Calculate EMAs

From Signal-Execution-Labs/forex-trading-ai-agent, MIT.

More from Signal-Execution-Labs/forex-trading-ai-agent

Signals

Stars
176
Forks
879
Open issues
1
Last commit (this folder)
Feb 9, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from Signal-Execution-Labs

Cite this page

backtester skill. Agent Mart. https://agentmart.dev/skills/signal-execution-labs-backtester (last updated 2026-10-24)