Skip to content
All strategies

Strategies

LTC/BCH Copula Mispricing-Index Pair Reversion: Enter When One Fork's Daily Return Is Jointly Extreme vs the Other (MI<0.05 / MI>0.95 on a Monthly-Refit Archimedean Copula), Exit at MI Normalisation or 5-Day Clock, Flat ~90% (Binance USD-M 1D, two legs, long-short)

Outcome: Abandoned

LtcBchCopulaMispricingPairLS

Outcome Summary

LtcBchCopulaMispricingPairLS tried to trade short-lived mispricings between the two Bitcoin-fork perps LTC and BCH. It used a copula fitted once a month to their trailing 365 daily returns, with beta-weighted legs sized to 50% gross equity. The strategy code was drafted, but the run went through 2 iterations and then hit three coding-stage timeouts. It was abandoned as 'coding_stuck_3_timeouts' before any backtest, optimization or analyst review, so there is no performance record.

Hypothesis

Restated from first principles, not ported, from the copula pairs-trading method in the QuantConnect write-up (itself after Stander, Marais & Botha 2013). A pair trade on the two legacy Bitcoin-fork 'payment coin' perps LTCUSDT.BINANCE and BCHUSDT.BINANCE. Both are driven by the same retail and BTC-beta flows and share a sector narrative, so their daily log returns have high rank dependence (Kendall tau is typically about 0.6-0.7) and fat joint tails that a Gaussian z-score of the spread misdescribes. That tail……Show moreShow less

Restated from first principles, not ported, from the copula pairs-trading method in the QuantConnect write-up (itself after Stander, Marais & Botha 2013). A pair trade on the two legacy Bitcoin-fork 'payment coin' perps LTCUSDT.BINANCE and BCHUSDT.BINANCE. Both are driven by the same retail and BTC-beta flows and share a sector narrative, so their daily log returns have high rank dependence (Kendall tau is typically about 0.6-0.7) and fat joint tails that a Gaussian z-score of the spread misdescribes. That tail structure is what the copula models. On the first daily bar of each UTC month, the strategy uses the trailing 365 daily log returns of both legs. It (1) builds each leg's empirical CDF as a sorted numpy array; (2) computes Kendall tau; (3) derives theta for Clayton, Gumbel and Frank from tau (closed forms, plus a 1-D Frank root-solve); (4) picks the family with the lowest AIC; and (5) estimates the hedge ratio beta = OLS slope of r_BCH on r_LTC. Each day, today's returns map to u = ECDF_LTC(r_LTC) and v = ECDF_BCH(r_BCH), clipped to [0.005, 0.995]. The two mispricing indexes are MI_{LTC|BCH} = dC/dv and MI_{BCH|LTC} = dC/du from the fitted copula's closed-form conditional distributions. The pair is fixed and declared up front, not picked by a max-tau scan over a typed list (L151). The economic reason for this pair: the two coins share a lineage and a holder base, neither has its own supplementary edge, and together they are a small, unused slice of the corpus (BTC/ETH hold most of it). Venue is Binance USD-M because shorting a leg is required and both legs have daily history from January 2020 (about 2,400 bars; the OKX LTC series is only days old). IMPLEMENTATION NOTE, because recent runs died at the 300s sandbox limit: the refit happens only once per month on a 365-element buffer, and the per-bar work is two bisect lookups plus one closed-form evaluation, so it is O(log n). Never rebuild the ECDF or rescan history inside on_bar. Risk: each leg is sized to 25% of equity notional (beta-weighted, 1x leverage, 50% gross). A hard stop closes both legs if pair PnL reaches -4% of the gross pair notional.

This implements the hypothesis as written: a fixed pair and a monthly refit anchored to the calendar. Kendall tau is O(n^2), but it runs only once a month on 365 observations. Per-bar work is two bisect lookups plus one closed-form conditional, so runtime does not grow with the backtest span. The BCH bar is used only when its timestamp equals the LTC primary bar's timestamp (the base alignment barrier), and the refit uses only returns before the current bar, so there is no look-ahead. The hypothesis's 25% per leg is implemented as 50% gross split by the hedge ratio, which keeps gross at 0.5x equity, well under the 1x leverage cap. All trade state is kept as scalars on self. One concern: the MI is computed on single-day returns rather than cumulative ones, so it usually normalises within 1-2 bars. Holds will be short, and each trade's edge has to clear about 0.1% round-trip on each leg, so avg_trade_return_pct is the number to watch.

coding_stuck_3_timeouts

Implementation

Two-leg LTC/BCH copula pair trade on Binance USD-M daily bars. On the first daily bar of each UTC month it refits on the trailing 365 paired daily log returns. The refit builds an empirical CDF for each leg (sorted arrays), computes Kendall tau, and derives theta for Clayton, Gumbel and Frank from tau (closed forms plus a Frank bisection). It picks the family with the lowest AIC on pseudo-observations and sets the hedge beta to the OLS slope of r_BCH on r_LTC, clamped to [0.5, 2]. Each day it maps……Show moreShow less

Two-leg LTC/BCH copula pair trade on Binance USD-M daily bars. On the first daily bar of each UTC month it refits on the trailing 365 paired daily log returns. The refit builds an empirical CDF for each leg (sorted arrays), computes Kendall tau, and derives theta for Clayton, Gumbel and Frank from tau (closed forms plus a Frank bisection). It picks the family with the lowest AIC on pseudo-observations and sets the hedge beta to the OLS slope of r_BCH on r_LTC, clamped to [0.5, 2]. Each day it maps u=ECDF_LTC(r_LTC) and v=ECDF_BCH(r_BCH), clipped to [0.005, 0.995], and computes MI_L=dC/dv and MI_B=dC/du. The signal is MI_B - MI_L and is continuous. It goes long LTC / short BCH when MI_L<0.05 and MI_B>0.95, and does the reverse in the mirror case. It exits when the cheap leg's MI crosses back through 0.5, after 5 calendar days, or when pair PnL reaches -4% of gross pair notional (checked at bar close). Gross exposure is 50% of equity at 1x leverage, split beta-neutral: N_LTC = G*beta/(1+beta), N_BCH = G/(1+beta). Both legs open and close on the same bar, each as its own order on its own instrument.

Iteration History

sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of LTCUSDT.BINANCE-1-DAY-LAST-EXTERNAL). This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).

Outcome Summary

The hypothesis already warned about the 300s sandbox limit and asked for O(log n) per-bar work, but coding still timed out three times, so future designs should consider simpler or cheaper implementations.

The run was abandoned at the coding stage with reason 'coding_stuck_3_timeouts' after 2 iterations. Backtest review, optimization, analyst review and risk review were never reached.

A long-short LTC/BCH pair-reversion strategy on Binance USD-M daily bars. It entered when a monthly-refit Archimedean copula (Clayton, Gumbel or Frank, chosen by AIC) flagged one leg's daily return as jointly extreme against the other (mispricing index below 0.05 or above 0.95). It exited when the index normalised, after 5 days, or at a -4% pair stop.

No performance numbers exist. The backtest report is empty and there is no optimization report, so no return, Sharpe or trade count was produced.

Analysis

Pairs Trading-Copula vs Cointegration

Backtest and paper results are hypothetical. Trading involves risk of loss.