backtest strategy builder

    1

    Convert trading ideas into auditable, bias-controlled backtest specifications and objective rulebooks.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    backtest strategy builder

    Example session with this skill installed

    I want to backtest a strategy that buys the S&P 500 when the RSI is oversold and sells when it's overbought on the daily chart. Account for costs.

    • Read your context and instructions
    • Compiled the backtest strategy builder

    I have formalized your RSI mean-reversion idea into a deterministic backtest specification, incorporating slippage and institutional bias controls.

    Strategy Rulebook

    PhaseLogicNote
    Market UniverseSPY (S&P 500 ETF)High liquidity reduces slippage impact.
    Entry TriggerClose < 30 on 14-period RSIEvaluated at daily close for next-bar open.
    Exit TriggerClose > 70 on 14-period RSIPrevents "holding forever" in trending markets.
    Position Sizing100% Equity, no leverageBaseline for unleveraged performance.

    Data Specification

    • Resolution: Daily OHLCV data.
    • Source: Adjusted for dividends and stock splits to prevent artificial price gaps.
    • Period: Minimum 10 years to capture multiple market cycles (2014-2024).

    Bias Checklist

    • Look-ahead Bias: Rules use T-0 close to execute at T+1 open.
    • Slippage: Modeled at 1 cent per share + 5 bps for market impact.
    • Transaction Costs: $0.005 per share commission baseline.

    Metric Set

    • Risk-Adjusted: Sharpe Ratio, Sortino Ratio.
    • Drawdown: Maximum Drawdown (MDD) and Ulcer Index.
    • Efficiency: Profit Factor and Win/Loss Ratio.

    Robustness Tests

    Sensitivity Analysis: Vary RSI levels (e.g., 25/75 vs 30/70) to ensure the edge isn't a "fluke" of specific numbers.
    2. Walk-Forward: Optimize on 2014-2020 data; validate on 2021-2024 data.

    Interpretation Guide

    If the result shows high performance only in low-volatility regimes, the strategy is likely a "carry" proxy. Pay close attention to the Recovery Factor (Net Profit / Max Drawdown) to gauge emotional tradability.

    Next steps

    1. Export this spec to a Python/Backtrader script or Pine Script.
    2. Source split-adjusted daily SPY data.
    3. Run the sensitivity analysis on the RSI periods (10 to 20).

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Trading strategies often fail because they lack the objective rules required for valid historical testing. This skill takes raw trading ideas and converts them into rigorous, implementation-ready backtest specifications. It forces clarity on entry and exit logic while embedding professional controls to prevent common pitfalls like look-ahead bias and overfitting.

    What it does

    • Rule Formalization converts vague technical or fundamental ideas into deterministic, auditable trading rules.
    • Bias Prevention identifies and mitigates look-ahead bias, survivorship bias, and selection bias before you write a line of code.
    • Data Specification defines the exact market universe, timeframe, and data quality requirements needed for a valid test.
    • Risk Modeling integrates slippage, transaction costs, and liquidity constraints into the strategy design.
    • Robustness Testing outlines methods like walk-forward analysis and parameter sensitivity checks to ensure strategy stability.

    How it works

    1. Input Analysis identifies your core strategy concept and separates established facts from underlying assumptions.
    2. Structural Mapping builds a professional framework following institutional standards for historical research.
    3. QA Validation runs the design through quality gates to ensure all rules are objective and testable.
    4. Artifact Generation produces a complete specification including a rulebook, data requirements, and metric sets.

    Frameworks & tools

    This skill is framework-agnostic, providing logic compatible with Python (Pandas/Backtrader), Pine Script, MetaTrader, or specialized platforms like QuantConnect.

    Why this beats prompting it yourself

    Generic prompts often overlook subtle biases and produce "wishful thinking" rules that cannot be coded. This skill enforces institutional-grade rigor, ensuring your strategy is actually testable and not just a collection of discretionary observations.

    Use cases

    • Strategy Auditing before committing capital to a new algorithmic approach.
    • Logic Debugging for discretionary traders looking to automate their process.
    • Research Design for quantitative analysts building a new hypothesis test.
    • Platform Migration by defining logic clearly before porting to a new language.

    Known limitations

    Does not execute live trades or provide real-time market data. Cannot guarantee future profitability or optimize parameters automatically. Requires the user to provide the basic strategy logic.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.

    Does not execute trades, provide live market data, or perform the actual computation. Requires manual strategy logic input.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Permissions

    No special permissions declared or detected

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    The skill produces a comprehensive, implementation-ready PDF or Markdown rulebook that includes deterministic entry/exit logic, data specifications, and a bias-prevention checklist.

    This skill is logic-based and platform-agnostic, meaning the resulting specifications are designed to be easily coded into Python, Pine Script, MetaTrader, or QuantConnect by a developer.

    Yes, the builder is specifically designed to identify 'look-ahead' and 'survivorship' biases by forcing you to define exactly when data becomes available to the strategy versus when the trade is executed.

    No technical setup is required; you simply provide your strategy concept or discretionary rules, and the agent guides you through the formalization process through a structured dialogue.

    The skill includes a dedicated Risk Modeling module that requires you to define slippage, commission structures, and liquidity constraints to ensure your backtest reflects realistic market conditions.

    While the builder creates the rigorous framework and rulebook for testing, it does not provide the historical price data itself or execute the actual backtest simulation.

    New in Trading & Investing