real math strategy backtest lab
by nowrich
Rigorous historical backtesting for rule-based trading strategies with risk metrics and transaction cost analysis.
Secure checkout via Stripe
Works with the AI tools you already use
See it in action
You say
Backtest a strategy in crypto_prices.csv: buy when 50 EMA crosses above 200 EMA, sell when it crosses below. Assume 0.1% slippage.
Your agent does
Backtest Results:
- Total Return: 42.5%
- Annualized Return: 12.2%
- Sharpe Ratio: 1.45
- Max Drawdown: -18.4%
- Win Rate: 58% (42 trades)
- Cost Impact: Returns reduced by 4.2% due to slippage. Interpretation: The Sharpe ratio suggests good risk-adjusted returns, but the 18% drawdown is significant.
What you get
About this skill
The problem
Vague trading ideas often fail when exposed to real-world costs and historical volatility. Manual backtesting is slow, prone to look-ahead bias, and frequently ignores critical risk metrics like drawdown or slippage.
What it does
- Translates plain-language strategy rules into executable Python/pandas backtesting code.
- Simulates entry/exit signals, position sizing, and stop-loss logic against historical OHLCV data.
- Calculates risk-adjusted performance including Sharpe ratio, Sortino ratio, and Maximum Drawdown.
- Quantifies the specific impact of transaction costs, commissions, and slippage on net returns.
- Validates data integrity by checking for gaps, duplicates, and missing values before execution.
Frameworks & tools
Python, pandas, and NumPy for vectorization and performance metrics.
Why this beats prompting it yourself
Generic prompts often forget to account for transaction-cost drag or accidentally introduce look-ahead bias by using future data points in current signals. This skill enforces a rigorous simulation framework that isolates costs and calculates downside deviation for a realistic view of risk.
Use cases
- Backtesting moving average or RSI-based indicators on daily or intraday CSV data.
- Analyzing the impact of a 0.1% commission fee on a high-frequency strategy.
- Comparing the Sortino ratio of a long-only strategy versus one that includes short selling.
- Identifying the maximum peak-to-trough decline to determine capital requirements.
Known limitations
Requires structured price data (timestamp, OHLCV). It does not fetch external market data; files must be provided or simulated.
How to install
Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- 30-day refund guarantee
- One-time purchase, yours forever
- Secure checkout via Stripe
Frequently Asked Questions
Popular in Trading

stock-breakout-picker
Rank the strongest US and Swedish stock breakouts using Minervini, CAN SLIM, and deep volume analysis.
Wall Street Daily Top 5
Generates a professional, interactive HTML dashboard analyzing the top 5 US market sectors using a weighted quant engine.
python-trading-toolkit
A quantitative finance toolkit for real-time market data, technical analysis, and portfolio risk management.
revenge trading pattern breaker
Detects emotional revenge trading patterns and enforces mandatory cooldowns, reset protocols, and risk limits.