Run long-only backtests on daily stock OHLCV CSVs and get standardized performance metrics plus a trade log.
Memory
Crypto DCA Backtester
Try itBacktest dollar-cost averaging (DCA) against lump-sum investing on any coin's real historical price data, using the free CoinGecko market_chart API (no API key required, up to 365 days of daily history). Built for crypto traders and passive-income investors deciding between DCA and lump-sum entry strategies before committing capital. Simulates weekly contributions and compares final portfolio value, invested capital, and percent return against a lump-sum baseline of the same total capital deployed on day one. Complements trading, whale-tracking, and DeFi yield skills by covering the entry-strategy decision, which is distinct from picking what to buy or where to farm yield.
What it does
Backtest dollar-cost averaging (DCA) against lump-sum investing on any coin's real historical price data, using the free CoinGecko market_chart API (no API key required, up to 365 days of daily history). Built for crypto traders and passive-income investors deciding between DCA and lump-sum entry strategies before committing capital. Simulates weekly contributions and compares final portfolio value, invested capital, and percent return against a lump-sum baseline of the same total capital deployed on day one. Complements trading, whale-tracking, and DeFi yield skills by covering the entry-strategy decision, which is distinct from picking what to buy or where to farm yield.
The skill document
Crypto DCA Backtester
Simulates weekly dollar-cost averaging vs a lump-sum investment of the same total capital, using real historical daily prices from CoinGecko's free market_chart API. No API key needed.
When to use
- Deciding whether to DCA into a position or deploy capital all at once
- Backtesting how DCA would have performed on a specific coin over the last N days (up to 365)
- Comparing entry strategies across multiple coins before allocating
- Building intuition for how DCA smooths volatility vs a single entry point
Commands
python3 scripts/dca_backtest.py --coin bitcoin --days 365 --weekly-contribution 100
python3 scripts/dca_backtest.py --coin ethereum --days 90 --weekly-contribution 250
python3 scripts/dca_backtest.py --coin solana --days 365 --weekly-contribution 100 --json
--coin takes a CoinGecko coin id (e.g. bitcoin, ethereum, solana, matic-network) — use CoinGecko's /coins/list if you need to look one up.
Output
Total invested, end portfolio value, and return % for both DCA and lump-sum, using the same total capital for a fair comparison, plus a declared winner for that specific historical window.
Notes
- Data source: CoinGecko free
market_chartendpoint, daily granularity, max 365-day lookback on the free tier. - This is a historical return comparison only — it does not model volatility-adjusted or risk-adjusted returns, and past performance over one specific window is not predictive of future results. Not financial advice.
- Requests use a curl-style User-Agent; some public API providers block the default Python User-Agent.
Related skills
DCA entry signal with gate status, regime, and F&G conditions
DCA re-entry readiness gate based on F&G, RSI, Stoch, and SMA filters
Backtest stock trading strategies on historical OHLCV data and report win rate, return, CAGR, drawdown, Sharpe ratio, and trade logs. Use when evaluating or...
Analyze one BTC or ETH derivatives setup using current public Deribit, Hyperliquid, and Polymarket data. Use for read-only strategy research, volatility, opt...
Validates historical behavior of stock ranking, factor, and portfolio-selection strategies using reproducible backtests, benchmark comparison, turnover, draw...