Yahoo Finance Stock & ETF Portfolio Backtester (MCP / Quant)
Pricing
Pay per event
Yahoo Finance Stock & ETF Portfolio Backtester (MCP / Quant)
Fast Yahoo Finance stock, ETF & crypto portfolio backtesting API & MCP server. Computes CAGR, Sharpe, Sortino, Max Drawdown, DCA, 200-day SMA shield, crisis stress tests & Monte Carlo in <2s.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Daniel
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Yahoo Finance Stock & ETF Portfolio Backtester (API & MCP Server)
Deterministic multi-asset stock, ETF & crypto portfolio backtesting for AI Agents (Claude, Cursor, n8n, LangChain) and quant developers — runs in ~1.2s with zero proxies and zero LLM hallucination.
Large Language Models routinely hallucinate CAGR, Sharpe Ratio, Sortino Ratio, Maximum Drawdown, Alpha/Beta, and Monte Carlo projections. Connect this Actor to Apify MCP Server or call it via REST API to compute exact, strictly causal (1-day lagged, zero lookahead) portfolio analytics across any Yahoo Finance ticker (US Stocks, Leveraged ETFs like TQQQ/SOXL, Index ETFs like SPY/QQQ, Gold GLD, Bonds TLT, Crypto BTC-USD, or Global Stocks like 005930.KS).
Key Capabilities
- Multi-Asset Portfolio Backtesting & DCA: Custom weights (
TQQQ,SPY,NVDA,GLD,BTC-USD), lump sum + recurring monthly DCA, calendar rebalancing (none,monthly,quarterly,annual), and realistic slippage (bps). - Systematic Risk Overlays (Zero Lookahead):
buy_and_hold: Rebalanced portfolio baseline.sma200_shield: Strictly 1-day lagged 200-day Simple Moving Average regime filter (moves holdings below their 200MA to Treasury Bill cash yield) — always paired with a side-by-side Buy & Hold benchmark!vol_target: Lagged 20-day realized volatility targeting.
- Institutional Risk & Stress Telemetry: CAGR, Total Return, Ending Wealth, Sharpe, Sortino, Calmar, Annualized Volatility, Exact Max Drawdown Peak → Trough → Recovery Dates, Beta/Alpha vs Benchmark, Daily 95% VaR & CVaR, Pairwise Correlation Matrix, and Crisis Stress Tests (
2008 GFC,2020 COVID,2022 Rate Shock). - 1,000-Path Block-Bootstrap Monte Carlo: Forward
P10(Bear),P50(Median),P90(Bull) ending wealth & probability of profit. - AI-Native Output: Returns both structured JSON AND a token-compressed
llmMarkdownSummary(SUMMARY.md) ready for LLM context windows.
Use Directly Inside Claude / Cursor / AI Agents (Apify MCP)
Add the official Apify MCP server with this Actor enabled:
{"mcpServers": {"apify": {"command": "npx","args": ["-y", "@apify/actors-mcp-server", "--actors", "factorlab/quant-portfolio-backtester"],"env": { "APIFY_TOKEN": "YOUR_APIFY_API_TOKEN" }}}}
Then ask Claude or Cursor: "Backtest 40% TQQQ, 30% SPY, 30% GLD from 2016 with $500 monthly DCA and a 200-day SMA shield vs Buy & Hold."
Sample Output (Verified Live Run — 0.96s)
{"strategy": "sma200_shield","period": "2016-01-04 to 2026-11-19","totalInvestedUsd": 75000.0,"endingValueUsd": 300061.92,"cagrPct": 20.78,"maxDrawdownPct": -28.12,"sharpeRatio": 0.83,"sortinoRatio": 0.73,"benchmarkCagrPct": 14.36,"monteCarloForecast": {"simulations": 1000,"horizonYears": 5,"p10BearUsd": 51918,"p50MedianUsd": 78840,"p90BullUsd": 124249,"probProfitPct": 98.0}}
Pay-Per-Event (PPE) Pricing — Zero Charge on Errors
backtest-completed: $0.02 per successful multi-asset backtestmonte-carlo-stress: $0.01 optional add-on whenrunMonteCarlo: true
Built by FactorLab Research — explore interactive 26-year leveraged ETF charts & free TradingView Pine Script v6 templates.