A collection of production-quality backtests built with backtest-kit. Each example demonstrates a distinct signal source, entry logic, and position management approach.

Link to the source code
npm start -- --backtest --symbol TRXUSDT ./content/jan_2026.strategy/jan_2026.strategy.ts
| Strategy | Ticker | Period | Signal source | Net PNL | Sharpe |
|---|---|---|---|---|---|
| DOTUSDT Feb 2021 β Python EMA Crossover | DOTUSDT | Feb 2021 | Python EMA(9)/EMA(21) crossover via WebAssembly | +5.52% | 0.09 |
| BTCUSDT Apr 2024 β Polymarket Ξprob | BTCUSDT | Apr 2024 | Polymarket "yes" probability shifts on crypto-prices markets | +0.63% | 0.055 |
| BTCUSDT Oct 2021 β TensorFlow Neural Network | BTCUSDT | Oct 2021 | TensorFlow NN predicting next candle close | +18.26% | 0.31 |
| BTCUSDT Dec 2025 β Pine Script Range Breakout | BTCUSDT | Dec 2025 | Pine Script BB + range detector + volume spike | +2.40% | 0.06 |
| TRXUSDT Jan 2026 β Liquidity Harvesting | TRXUSDT | Jan 2026 | Telegram channel signals (inverted) | +8.58% | 1.14 |
| BTCUSDT Feb 2026 β AI News Sentiment | BTCUSDT | Feb 2026 | LLM forecast on live news (Tavily + Ollama) | +16.99% | 0.25 |
| BTCUSDT Mar 2026 β SHORT DCA Ladder | BTCUSDT | Mar 2026 | Fixed SHORT gravebag signal + DCA ladder up (up to 10 rungs) | +37.83% | 0.35 |
| BTCUSDT Apr 2026 β DCA Ladder | BTCUSDT | Apr 2026 | Fixed LONG moonbag signal + DCA ladder down (up to 10 rungs) | +67.85% | 0.12 |
Hypothesis: The Telegram channel publishes SHORT signals with average R:R of 0.375:1 and 106% deposit at risk at 25Γ leverage β mathematically guaranteed to lose. Fifteen minutes before each post a volume spike appears on the chart; the TP step multipliers and T5/SL ratio are identical across all signals, indicating an algorithm. If you reverse engineer the algorithm β liquidity is yours
assets/entry.jsonl β 11 real posts from the Crypto Yoda channel, exported verbatim.getSignal checks if publishedAt matches the current minute and whether closePrice falls inside entry.from..entry.to.Hypothesis: an LLM reading live crypto/macro news every few hours can produce a directional bias (bullish / bearish / wait) that outperforms random on a sustained trending month.
bullish, bearish, or wait.getSignal opens a LONG on bullish, SHORT on bearish, and skips on wait. A conflicting forecast while a position is open triggers commitClosePending (sentiment flip).Hypothesis: in a high-volatility, mean-reverting month, dollar-cost averaging into every spike upward raises the blended cost basis enough to hit a 0.5% profit target on each reversal.
getSignal opens a SHORT on every new pending signal via Position.moonbag with a 25% hard stop and $100 cost.commitAverageBuy fires on each ping if the current price moves outside a Β±1β5% band around the last entry and fewer than 10 rungs have been added.commitClosePending.Hypothesis: in a trending bull month, dollar-cost averaging into every dip lowers the blended cost basis enough to hit a 3% profit target faster and more often than a single-entry approach.
getSignal opens a LONG on every new pending signal via Position.moonbag with a 25% hard stop and $100 cost.commitAverageBuy fires on each ping if the current price falls outside a Β±1β5% band around the last entry and fewer than 10 rungs have been added.commitClosePending.Hypothesis: a simple feed-forward neural network trained on normalized candle patterns every 8 hours can predict next candle close position within its high-low range, enabling profitable entries when current price is below predicted price.
(close - low) / (high - low), representing where the close sits within the candle's range.getSignal checks every 15 minutes: if currentPrice < predictedPrice, it opens a LONG via Position.moonbag with $100 entry and 1% hard stop.Hypothesis: Bollinger Band breakouts from a horizontal range, confirmed by a volume spike, and produce directional signals with positive expectancy on a choppy December.
Cache.fn runs btc_dec2025_range.pine on 1h candles (RSI 14) and extracts: BB bands, range boundaries, signal (Β±1), isRanging, volSpike.getSignal opens a LONG on signal === 1 or SHORT on signal === -1, but skips if price has already moved past the close at signal time, or if isRanging === 1.Hypothesis: sharp daily shifts in Polymarket "yes" probability for BTC-related prediction markets reflect retail sentiment flow that precedes BTC spot movement by hours, with no look-ahead β only the timestamp and Ξprob are used to choose direction.
loadPolySignals reads assets/polymarket-backtest-result.json once via singleshot, aggregates to one signal per day (max |dprob| across all crypto-prices markets), and strips entryPrice/exitPrice (future-data fields).getSignal picks the most recent signal with timestamp β€ when and rejects it if older than 1h or |dprob| < 0.10. Positive Ξprob β LONG, negative β SHORT.Position.moonbag at market with a 1% hard stop and no fixed TP; listenActivePing closes on 1% trailing drawdown from peak profit, or on the 24h timeout.Hypothesis: A classic EMA(9)/EMA(21) crossover strategy executed via Python WebAssembly can capture short-term momentum reversals on 8-hour candles with fixed bracket orders.
Cache.fn runs the Python indicator (strategy.py) on 8h candles to calculate EMA(9) and EMA(21).Position.bracket with Β±2% take-profit and stop-loss.