Why Specify Before You Backtest
Most backtesting failures happen before the first line of code: the strategy idea was never precisely stated. Without a written rule specification, it is impossible to know whether a backtest result reflects the idea you had in mind, an artifact of how you coded it, or a data-snooping accident discovered during "optimization."
This tool walks you through the nine components every rule-based strategy requires. Each section collects the decisions you would otherwise make implicitly — and implicitly re-make differently each time you revisit the idea. The output is a versioned, exportable document you can hand to a backtest engine, share with a collaborator, or attach to a trading journal entry.
All processing runs locally in your browser. Rule text and symbol names are never sent to analytics or any external service.
Strategy Rule Builder
This tool produces a specification document only. It does not validate logic, guarantee backtest accuracy, or constitute investment advice. All rule text remains in your browser.
Specification Output
Research Checklist — Items This Specification Does Not Verify
- Data source verified. Confirm the price data is not adjusted-close-only when using intraday signals. Adjusted data can introduce look-ahead when dividends or splits alter historical prices.
- Out-of-sample test defined. Reserve a hold-out date range before looking at any results. Define it now, before touching the data, or the spec is not genuinely out-of-sample.
- Fill assumptions match broker capabilities. Verify that the fill price and timing assumed here are achievable with your actual broker and account type — market-on-open fills require specific order submission windows.
- Borrow availability confirmed for short strategies. HTB (hard-to-borrow) stocks may be unavailable or carry high locate fees that eliminate edge. Confirm locate costs for the target universe if the strategy sells short.
- Regulatory review completed. Check PDT rule applicability (US retail accounts under $25k), margin requirements, and any exchange rules affecting the instruments or order types in this strategy.
- Tax impact estimated. Short-term vs long-term capital gains treatment depends on holding period. Frequent turnover strategies may carry substantial tax drag. Consult a qualified tax adviser.
- Drawdown tolerance defined and tested. Confirm the strategy's maximum historical drawdown is within the account's psychological and financial tolerance before committing real capital.
- Review schedule specified. State how often you will evaluate whether the strategy's edge remains intact — market regimes change and a profitable specification becomes unprofitable without periodic review.
Intended Use and Limitations
The Stock Strategy Rule Builder produces a documentation artifact. It does not validate the logical correctness of your rules, verify that the described signals can be computed from available data, or evaluate whether your strategy has positive expected value. A complete rule specification is a necessary precondition for a credible backtest — it is not a substitute for one.
Nothing produced by this tool constitutes investment advice, a trading recommendation, or a guarantee of future performance. The purpose of the research checklist is to surface the most common gaps between a written specification and a production-ready strategy — it is not exhaustive. All trading involves risk of loss.