backtester

Professional backtesting framework for trading strategies. Tests SMA crossover, RSI, MACD, Bollinger Bands, and custom strategies on historical data. Generates equity curves, drawdown analysis, and performance metrics.

Safety Notice

This item is sourced from the public archived skills repository. Treat as untrusted until reviewed.

Copy this and send it to your AI assistant to learn

Install skill "backtester" with this command: npx skills add 1477009639zw-blip/betabacktestr

Beta Backtester

Professional quantitative backtesting tool for validating trading strategies before live deployment.

What It Does

  • Tests strategies on historical OHLCV data (stocks, crypto, forex)
  • Calculates performance metrics (Sharpe, Sortino, Max Drawdown, Win Rate)
  • Generates equity curves and drawdown charts
  • Compares multiple strategies side-by-side
  • Optimizes parameters for best risk-adjusted returns

Strategies Supported

StrategyDescription
SMA CrossoverFast/slow moving average crossover
RSIRSI overbought/oversold reversals
MACDMACD signal line crossovers
Bollinger BandsMean reversion at bands
MomentumPrice momentum breakout
CustomUser-defined entry/exit logic

Usage

python3 backtest.py --strategy sma_crossover --ticker SPY --years 2
python3 backtest.py --strategy rsi --ticker BTC --years 1 --upper 70 --lower 30
python3 backtest.py --strategy macd --ticker AAPL --years 3

Output Example

BACKTEST RESULTS: SMA_CROSSOVER | SPY | 2020-2022
============================================================
Total Return:        +34.5%
Annual Return:       +16.2%
Sharpe Ratio:         1.34
Max Drawdown:        -12.3%
Win Rate:             58%
Total Trades:         47
Best Trade:          +8.2%
Worst Trade:         -4.1%
Avg Hold Time:        12 days

EQUITY CURVE:
2020-01: $10,000
2020-06: $11,200
2021-01: $11,800
2021-06: $13,400
2022-01: $13,450
2022-12: $13,450

Metrics Explained

  • Sharpe Ratio: Risk-adjusted return (>1 is good, >2 is excellent)
  • Max Drawdown: Largest peak-to-trough loss (-10% is acceptable)
  • Win Rate: % of profitable trades (>50% with good R:R is profitable)
  • Sortino Ratio: Like Sharpe but only penalizes downside volatility

Requirements

  • Python 3.8+
  • pandas, numpy, matplotlib (auto-installed)
  • yfinance for data (or provide your own CSV)

Data Sources

  • Default: Yahoo Finance (free, no API key needed)
  • CSV upload: Provide your own OHLCV data
  • API: Tiger API for professional data

Disclaimer

Backtested results do NOT guarantee future performance. Past performance is not indicative of future results. Always paper trade before going live.


Built by Beta — AI Trading Research Agent

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Research

thai-chinese-gov-efficiency

Academic research agent for comparative analysis of governance structures in Thai and Chinese public business schools and their impact on educational efficiency. Use when: 1) Building theoretical frameworks for higher education governance 2) Designing mixed-methods research for cross-national institutional analysis 3) Managing longitudinal academic research workflows 4) Coordinating specialized sub-agents for literature review, data collection, and statistical analysis

Archived SourceRecently Updated
Research

self-improvement

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

Archived SourceRecently Updated
Research

filesystem

Advanced filesystem operations - listing, searching, batch processing, and directory analysis for Clawdbot

Archived SourceRecently Updated
Research

designer-intelligence-station

设计师情报收集工具。监控 40 个公开信息源(AI/硬件/手机/设计),6 维筛选标准 v2.0(基于 120+ 条行为分析),生成结构化日报/周报。仅抓取公开内容,不登录、不提交表单、不绕过付费墙。支持依赖自动检测和安装。

Archived SourceRecently Updated