backtester

backtester is a skill for Claude Code, Codex from Signal-Execution-Labs/forex-trading-ai-agent. It costs 18 tokens per session (3,292 once invoked), scanned A, original, MIT.

A tool for testing trading strategies against historical market data before using them with live money. Backtesting simulates past trades and reports measures such as win rate, Sharpe ratio, and drawdown.

In plain words
What is it for?
Use it to load exchange OHLCV data—open, high, low, close, and volume—simulate strategy rules, calculate performance metrics, and generate reports.
Why use it?
It helps reveal how a strategy would have behaved in earlier market conditions and exposes losses or weaknesses before live deployment.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to load exchange OHLCV data—open, high, low, close, and volume—simulate strategy rules, calculate performance metrics, and generate reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/signal-execution-labs/forex-trading-ai-agent/backtester
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Signal-Execution-Labs/forex-trading-ai-agent --skill backtester
Clone the repo
git clone --depth 1 https://github.com/Signal-Execution-Labs/forex-trading-ai-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backtester

README.md
[![agentmods](https://agentmods.dev/badge/skills/signal-execution-labs/forex-trading-ai-agent/backtester/github.svg)](https://agentmods.dev/skills/signal-execution-labs/forex-trading-ai-agent/backtester)
Your own site
<a href="https://agentmods.dev/skills/signal-execution-labs/forex-trading-ai-agent/backtester"><img src="https://agentmods.dev/badge/skills/signal-execution-labs/forex-trading-ai-agent/backtester/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backtester

Your own site · 80×15
<a href="https://agentmods.dev/skills/signal-execution-labs/forex-trading-ai-agent/backtester"><img src="https://agentmods.dev/badge/skills/signal-execution-labs/forex-trading-ai-agent/backtester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,292 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.03292
Opus 5 $0.00009 $0.01646
Sonnet 5 $0.00004 $0.00658
Haiku 4.5 $0.00002 $0.00329

Measured 12d ago against content hash e19a4084325d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

backtester scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/backtest_runner.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/backtester/SKILL.md · 368 lines

How it starts

The opening of the file, as written. The whole thing — 368 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

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)}')
"

Read the full file on GitHub · 368 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 368 lines · 18 tokens per session scan A e19a4084325d

Subscribe to this mod's changes

backtester is a skill published in the GitHub repository Signal-Execution-Labs/forex-trading-ai-agent (136 stars, last pushed 8d ago), licensed MIT. It adds 18 tokens to every session and 3,292 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.