- Home
- Skills
- Trading & Investing
- Walk-Forward + Monte Carlo Strategy Lab
Works with the AI Agents you already use
Walk-Forward + Monte Carlo Strategy Lab
Two standard-library Python scripts then run offline: no network, no API keys, no exchange login.
$8
Walk-Forward + Monte Carlo Strategy Lab
Example session with this skill installed
Run a walk-forward and Monte Carlo test of an EMA cross on BTC/USD 4h candles and give me the report in Spanish.
- Read your context and instructions
- Compiled the walk-forward + monte
Real run from 10 November 2026 (Europe/Madrid) on public Binance BTCUSDT klines (USDT-quoted, no API key, not Twelve Data), default settings: 10 bps fee and 5 bps slippage per side, long-only, 1,000-run Monte Carlo with seed 42.
BTC 4-hour bars, 21 May 2021 to 10 November 2026 (11,999 closed bars), EMA cross: verdict ROBUST. Anchored walk-forward, 5 folds: out-of-sample return +153.4% over 58 trades, max drawdown 32.4%, Sharpe 1.07, walk-forward efficiency 0.93, 80% of folds profitable. Buy-and-hold over the same span: +156.9% with a 53.5% drawdown, so the report adds a BELOW_BUY_HOLD note. Rolling mode: +178.6%. Monte Carlo (58 out-of-sample trades): bootstrap probability of ruin 2.7%, 12.8% of runs ended below the starting equity.
The same 4-hour data with a Donchian breakout: FRAGILE (+41.9% out of sample vs +156.9% buy-and-hold, efficiency 0.59 anchored and 0.25 rolling).
BTC daily bars, 17 Aug 2017 to 9 Nov 2026 (3,372 closed bars): EMA cross FRAGILE (efficiency 0.39, 40% of folds profitable, bootstrap ruin probability 18.7%), Donchian breakout FRAGILE, RSI reversion INSUFFICIENT_DATA (14 out-of-sample trades, negative out of sample), Bollinger breakout INSUFFICIENT_DATA (29 trades, one short of the 30 minimum).
Every verdict is a statement about this past backtest, not a prediction and not a trade instruction. You decide what to do.
Connects securely to your tools. The creator never sees your data.
About this skill
Walk-Forward + Monte Carlo Strategy Lab gives your agent a repeatable way to ask the question most backtests skip: does this rules-based strategy still work on data it was not tuned on? It describes a backtest. It is not a trade signal.
The agent collects closed OHLCV (on Agensi, typically through the Twelve Data tools after you approve the quote), or you hand it your own CSV or JSON. Two standard-library Python scripts then run offline: no network, no API keys, no exchange login.
What it does:
- Backtests one of four built-in strategies (EMA cross, RSI mean-reversion, Bollinger breakout, Donchian breakout) with fees and slippage per side. Closed bars only. A signal at the close is filled at the next open, so there is no lookahead (unit-tested).
- Runs anchored and rolling walk-forward: it optimises a small parameter grid in-sample, then tests the winner on the next unseen window and stitches the out-of-sample results together.
- Runs a seedable Monte Carlo (1,000 runs by default) on the out-of-sample trades, shuffled and bootstrapped, with final-equity percentiles, max-drawdown percentiles, and probability of ruin.
- Flags overfitting: in-sample vs out-of-sample degradation, too few trades, inconsistent folds, unstable parameters, and Monte Carlo risk.
- Returns JSON plus a filled report with a verdict band: ROBUST, FRAGILE, OVERFIT, or INSUFFICIENT_DATA. The bands describe the past backtest. They are not an instruction to act.
- The agent writes the report in your language. Buy-and-hold figures are always shown next to the result.
Requirements: Python 3.10+ (standard library only). Enough history for the strategy to trade at least 30 times out of sample (for example 1,500+ daily bars or 6,000+ 4-hour bars); otherwise you get INSUFFICIENT_DATA instead of a guess. Long-only by default, one position at a time, no leverage. This skill does not place or change orders and is not financial advice.
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.
Analysis only, no orders. Long-only, one position, no stops or leverage. Needs enough history for 30+ out-of-sample trades. Monte Carlo assumes independent trades. Past results are not a forecast; not financial advice.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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 6 days ago
- Software
Python