Skip to content

View translation

BtcFactorSignalNearBetaExpressionLS

Hypotheses

Factor-Signal / Beta-Expression Split: Estimate the Crypto Trend on BTC (Cleanest Proxy) and EXPRESS It on a ~1.8-Beta Alt Perp (NEARUSDT.BYBIT, 2H Bars, Always-In Long-Short, No Gate, No Supplementary Feed)

Hypotheses

A SINGLE-LEG, always-in, long-short directional strategy on BYBIT linear perpetuals that deliberately SEPARATES where the signal is MEASURED from where the risk is EXPRESSED. The trend of the crypto market factor is estimated ONLY on BTCUSDT.BYBIT (deepest book, highest signal-to-noise, smallest idiosyncratic component); the resulting sign is traded ONLY in NEARUSDT.BYBIT, a high-beta (~1.6-2.2 vs BTC on daily returns) large-cap L1 perp with 4.94 years of 2H history on Bybit (2021-10-11 -> today, ~21.6k bars) and ZERO prior experiments in this factory. NEAR is never used to generate direction - only for volatility-scaled sizing and the catastrophic stop. BTC is data-only: no position is ever opened in it, so this is a one-leg book (no multi-leg daily-MTM marking exposure, which has flagged four consecutive multi-leg runs). WHY THIS IS NOT ANOTHER TSMOM/DUAL-TF CLONE (lesson 112): the claim is not that a proven template ports to a new ticker. The claim is economic, about the ratio of GROSS MOVE to FIXED COST. Exchange fees are a percentage of NOTIONAL, so leverage cannot improve the move-to-fee ratio (it scales both). BETA CAN: at the same notional and the same 0.11% Bybit round trip, a +1.0% BTC factor move prints ~+1.8% on NEAR. Expressing an unchanged signal on a higher-beta instrument is the only lever that raises per-trade gross capture without raising per-trade cost - precisely the factory's #1 cause of death (499 fee_edge abandons). The cost is that NEAR carries idiosyncratic variance BTC does not, so ex-ante Sharpe should be roughly corr(NEAR,BTC) ~0.7-0.8 times the BTC-native Sharpe while per-trade NET edge roughly doubles. That trade-off - lower Sharpe, materially higher after-fee per-trade edge - IS the hypothesis, and it is falsifiable on exactly that number. DELIBERATELY UNGATED (lesson 130): no regime filter, no volatility gate, no volume confirmation, no dual-timeframe confluence, no funding/OI/taker/liquidation feed, no calendar window. Always long or short; flat only after a catastrophic stop, and only until the BTC sign next changes. No gated variant is pre-registered. SELECTION CHOICES STATED EXPLICITLY (lesson 122 - no parameter-count claim is made): (a) VENUE = BYBIT: 0.2% of 3162 experiments vs a >=5% target, plumbing already validated by completed backtests (not a virgin venue per lesson 103), and the only under-represented venue supplying multi-year SUB-DAILY history (Hyperliquid's ~5000-candle cap gives ~7 months at 1h and would die for insufficient history). (b) INSTRUMENT = NEAR: the mechanism needs a high-beta, high-correlation, liquid, long-history alt; NEAR is a top-50 L1 dominated by the BTC factor (so a BTC-measured signal is the right signal for it) at ~1.8x amplitude. ATOM/ICP/ALGO/APT are admissible substitutes on the same filter - the choice is beta/liquidity/history, not a backtest sweep. (c) TIMEFRAME = 2H execution with a ~10-day signal lookback, so the mechanism yields 200-350 independent bets over 4.94 years while holds stay ~5-8 days (~2 round trips/month).

Hypotheses

Iteration 2 addresses the named backtest-gate failure (Sharpe +0.01 incoherent with a -31.40% equity curve) at its cause rather than cosmetically. That sign split IS volatility drag: the daily MTM returns had a near-zero arithmetic mean while the compounded curve loses ~sigma^2/2 per day, and the gap grows with the SQUARE of the book's realized volatility. The defect was in the sizing input, not the signal path (which passed Layers 1-3 and is left byte-identical apart from where the vol state is updated): realized vol was estimated as an EWMA of squared 2-HOUR log returns annualized by sqrt(4380). That sqrt-of-time scaling assumes i.i.d. returns and systematically under-measures a trending, vol-clustered alt perp at the daily horizon, and because the size is frozen at entry and carried for 5-8 days a lagging estimate under-sizes right before every vol expansion -- so the book ran materially above its stated 22% target and paid several times the intended drag. Fix: (1) measure variance AT the horizon it is annualized from (overlapping 12-bar = 24h log returns, EWMA'd), (2) keep a fast (36-bar) and a slow (144-bar) half-life and size off the LARGER variance so a stale calm estimate cannot double the realized risk, (3) cut the budget: target_ann_vol 0.22 -> 0.18 and the gross cap 0.45 -> 0.35 of equity. Nothing else changed: same BTC t-stat signal, same hysteresis band, same ATR stop, same always-in ungated structure, same one-leg book (BTC is data-only, so no multi-leg daily-MTM marking), leverage still 1.0. HONEST CAVEAT for the analyst: sizing is scale-invariant for Sharpe and for per-trade percentage edge, so this makes the report coherent and the risk honest but it cannot manufacture an edge. The hypothesis's falsifiable claim is per-trade NET edge on the beta-expressed leg; if the coherent re-run still shows Sharpe ~0 and avg_trade_return_pct below the 0.11% Bybit round trip, the mechanism is falsified and I would abandon rather than tune lookbacks.

Hypotheses

abandon_class=negative_expectancy on a reliable 190-trade / 1,720-day sample, and specifically a GROSS signal failure rather than a cost, sizing or leverage one. Verified on the trade ledger, not predicted from thresholds: summed price_pnl is -$24,692 (already net of commission and impact); adding back 100% of commission ($3,973) and 100% of modeled impact ($5,139) still leaves ~-$15,580 gross, about -0.27% of the ~$19.0k average notional per trade. Removing every fee on the venue does not make the BTC-t-stat sign profitable when expressed on NEAR. QA's concern is borne out on full history and then some: the hypothesis's own falsifiable claim is per-trade NET edge clearing the 0.11% Bybit round trip, and the delivered number is -0.687% -- ~6x the wrong side. The failure is directional information, not amplitude: LONG price PnL -$4,908 and SHORT price PnL -$19,783 both lose gross, so the ~1.8 beta is faithfully amplifying a signal with zero content on this instrument. Supporting: PF 0.852, Sharpe -0.097 (CI straddles 0, PSR 0.42), -29.6% total / -7.3% CAGR, 50.1% max DD underwater for 829 days, 2 of 6 years positive with all three most recent years negative, top-5 trades +$64.8k against a book total of -$29.6k, and credited funding costing -$4,935 on an 89%-exposure always-in book. Regime attribution directly refutes the premise (stressed tercile -39.2%, Sharpe -0.66; only the normal tercile positive). Not iterate: the ten tunables are lookbacks, half-lives, a hysteresis band and a stop multiple, and no setting manufactures predictive information that is absent over 190 observations and negative before any cost. Not revise_hypothesis: the economic claim under test -- that expressing an unchanged BTC-factor signal on a higher-beta alt raises per-trade gross capture at unchanged percentage cost -- is arithmetically correct but vacuous here, because the signal's gross capture on the expression leg is NEGATIVE, and multiplying a negative capture by 1.8 makes it worse, not better. FOR THE RESEARCH LEAD: the beta-expression lever is only usable on top of a mechanism with a demonstrated POSITIVE gross edge on the expression instrument. Before proposing this split again, require evidence that the same BTC-measured signal is gross-profitable on the target alt at zero cost; here the corr(NEAR,BTC) assumption held for variance but not for sign -- NEAR's idiosyncratic component dominated the factor at a ~10-day horizon, which is exactly what long_win_rate 29.5% vs short 42.1% shows. FLAGGED FOR ENGINEERING, not as the abandon ground and with no mechanism asserted: the daily MTM series prints large cancelling day-pairs (e.g. 2024-04-22 -8.27% / +6.98%, 2024-11-04 -8.07% / +8.78% amid an otherwise all-zero flat stretch, 2025-06-12 -11.82% / +9.62%, 2026-03-14 -14.00% / +14.75%) that do not correspond to any position change and largely cancel within 24h. This is a SINGLE-leg book, so it is not the multi-leg marking symptom previously reported; sharpe_ratio, annualized_volatility (37.6%), var/cvar, calmar and max_drawdown all derive from that series and should not be trusted at face value. The realized trade ledger is coherent and is what this verdict rests on.

Implementation

Always-in long/short single-leg directional strategy on NEARUSDT.BYBIT 2H perp bars. The crypto market factor's trend is measured ONLY on BTCUSDT.BYBIT (data-only extra leg, never traded) as the t-stat of its ~10-day log drift scaled by an EWMA of 2H return volatility; the sign of that BTC t-stat is expressed ONLY in NEAR, a ~1.8-beta large-cap L1 perp. Hysteresis (flip only outside +/-0.25 t) keeps holds at ~5-8 days / ~200 round trips over the 4.94-year history instead of 741 whipsaw flips at a raw zero crossing. Exits: BTC factor crosses the opposite band, or a wide catastrophic stop at 8x the entry ATR (after which the book stays flat in that direction until the BTC sign changes). Sizing is pure volatility targeting on NEAR, measured on overlapping 24h log returns (two EWMA half-lives, the larger variance sizing the trade), capped at 35% of equity gross notional with leverage 1.0.

Verification Results

Move the state assignment out of the predicate: have should_enter() only return the side, and set _side/_entry_px/_entry_atr in on_order_filled (or on the first bar where cache.positions_open is non-empty), keeping _block_sign cleared only once an entry actually fills.

Verification Results

should_enter() mutates position state as a side effect of a predicate: it sets self._side, self._entry_px, self._entry_atr and clears self._block_sign BEFORE the order is known to be accepted. If position_size() rounds to 0 (dropped_size_zero) or the base template's min-notional guard rejects the entry (_process_primary drops it after should_enter returns), the strategy believes it is in a position that does not exist, with an entry price and entry ATR anchored to a bar it never traded. In the backtest this is self-healing (the next bar sees position is None and re-runs should_enter, overwriting the state) and the sandbox shows no dropped entries, so behaviour is currently unaffected. In a live/paper node an order REJECT would leave the same stale state, and the cleared _block_sign means the post-stop re-entry lockout is released by a signal that never became a trade.

Verification Results

Derive the side from the position the base already looked up — e.g. read cache.positions_open(instrument_id=self.instrument_id)[0].side inside should_exit() and use its sign, falling back to the signal only if no position is found.

Verification Results

should_exit() infers a lost side from the signal sign ('self._side = 1 if signal >= 0 else -1') rather than from the open position. If state is ever lost while a position is open (paper-node restart before persistence, or a close that does not complete in-event), the inferred side can be the OPPOSITE of the real position, which inverts the catastrophic-stop comparison ('adverse') and can both suppress a genuine stop and fire a spurious one, and then writes the wrong sign into _block_sign. Unreachable in backtest (the base defers processing while a non-contingent close order is working, and _submit_exit is the only place _side is zeroed), so it is a live-path robustness issue only.

Verification Results

Either let the optimizer move target_ann_vol/max_notional_frac jointly, or lengthen the fast half-life and re-estimate on non-overlapping daily returns so the realized-vs-target gap narrows; lowering max_notional_frac would also directly cut the impact cost that now exceeds commission.

Verification Results

The iteration-2 risk fix only partly achieves its stated target: with target_ann_vol cut to 0.18 the book still realizes 22.2% annualized volatility and a 50.3% max drawdown (CI 24.2-71.3%). Two structural reasons: (a) the 0.35 max_notional_frac cap binds whenever NEAR's estimated vol falls below ~51% annualized, so in calm regimes the book is cap-sized rather than vol-targeted (avg_position_pct 18.9% vs a 35% ceiling means the cap binds only sometimes, but the fast/slow max() estimator is deliberately biased high, pushing sizing around); (b) the 24h overlapping-return EWMA at a 36-bar (3-day) fast half-life has very few effectively independent observations, so the variance estimate is noisy and size is frozen at entry for ~8 days. Not a correctness defect — the estimator is unbiased and the arithmetic (var_24h x 365) is right — but the analyst should not read 'target 18%' as the delivered risk.

Verification Results

Sandbox is near-full history (19,993 bars / 1,667 days), not a truncated smoke window, and the mechanism's GROSS capture is negative there: avg_trade_return_pct -0.551% of notional over 182 trades; adding back commission ($4,048 = ~0.11%/RT of the ~$19k avg notional) and impact ($5,298 = ~0.15%/RT) still leaves roughly -0.29%/trade gross, i.e. the BTC-t-stat sign has no measurable predictive content on NEAR at these defaults (gross PF ~0.94, net PF 0.898, Sharpe -0.236, Sharpe CI [-1.18, 0.69], PSR 0.32). The hypothesis's own falsifiable claim is per-trade NET edge on the beta-expressed leg clearing the 0.11% Bybit round trip; at defaults it is ~5x the wrong side of that, and the developer pre-committed to abandoning rather than tuning lookbacks if the coherent re-run landed here. Three further items for the analyst: (1) modelled IMPACT ($5,298) now EXCEEDS commission ($4,048) and is the single largest cost — the promotion gate's 'impact <= 50% of gross' will bind, and a lower max_notional_frac is the obvious lever; (2) funding is NOT modelled (funding_events_available 0, funding_folded false) on an always-in book with 89.3% exposure and ~8-day holds — a real long/short perp book would pay/receive a material carry this report omits entirely; (3) regime attribution inverts the trend premise (stressed tercile -31.0%, Sharpe -1.01; only the normal tercile is positive at +24.2%), and long_win_rate 27.5% vs short 40.6% suggests the amplitude the hypothesis is buying is mostly idiosyncratic NEAR variance rather than the BTC factor. None of this blocks: it is the parameterization's first draw and the optimizer has not run.

Backtest Review

Reliable sample: 190 trades over 1,720 days (2021-10 -> 2026-06), 20,626 primary bars, metrics_reliable=true, end_unrealized 0.005% (result is fully realized, no MTM headline).

Backtest Review

Trades DO implement the hypothesis: 95 long / 95 short, always-in (exposure 89.0%), avg hold 7d22h, ~2 round trips/month, vol-scaled sizing (avg_position_pct 19.3%, leverage ~0.15-0.5x notional). No mechanism mismatch.

Backtest Review

Single-leg book as designed; funding IS credited (4,521 events, funding_folded=true).

Backtest Review

GROSS signal failure, not a cost failure: summed price_pnl over the 190 trades is -$24,692 (already net of commission/impact). Adding back 100% of commission ($3,973) and modeled impact ($5,139) still leaves roughly -$15,580 gross, ~-0.27% of the ~$19.0k average notional per trade. Zeroing every trading cost does not make this mechanism profitable.

Backtest Review

avg_trade_return_pct -0.687% vs a +0.15% BYBIT floor -- ~6x on the wrong side of the hypothesis's own pre-registered falsifiable claim (per-trade NET edge clears the 0.11% round trip).

Backtest Review

Both sides lose gross: LONG -$4,908 price PnL, SHORT -$19,783 price PnL. The beta amplification the hypothesis buys amplifies a signal with no measurable content on NEAR, so it magnifies losses symmetrically.

Backtest Review

PF 0.852, Sharpe -0.097 (CI [-1.00, +0.78]), PSR 0.42, total_return -29.6%, CAGR -7.3%, max_drawdown 50.1% with an 829-day underwater stretch, 14 consecutive losses.

Backtest Review

2 of 6 calendar years positive (2022 +7.8%, 2023 +19.3%; 2024 -25.6%, 2025 -16.9%, 2026 -20.5%, 2021 -4.7%) -- the losing years are the recent ones.

Backtest Review

Regime attribution inverts the trend premise: stressed tercile -39.2% (Sharpe -0.66) and calm -23.9%; only the normal tercile is positive (+26.2%). A trend-following factor signal that loses most in high-vol regimes is not capturing trend.

Backtest Review

Always-in perp carry is a real drag now that funding is credited: -$4,935 net funding over the run (longs paid -$6,287), i.e. ~17% of the total loss, structural for an 89%-exposure book.

Backtest Review

Concentration: top 5 trades +$64,755 against a book total of -$29,627 -- the other 185 lose ~$94k.

Analysis

Backtest gate: - metrics unreliable: Incoherent: Sharpe 0.01 disagrees in sign with total_return -31.40% — the Sharpe is computed from the mtm_equity_curve series while the return comes from the equity curve. Judge on the equity curve.

Outcome Summary

BtcFactorSignalNearBetaExpressionLS-3834b46b41

Outcome Summary

… (4 sentences, including the flagged-for-engineering caveat that the daily MTM series shows large cancelling day-pairs on this single-leg book, so curve-derived risk metrics are not trustworthy at face value; the verdict rests on the realized trade ledger.)

Outcome Summary

The beta-expression lever only helps on top of a mechanism already shown to be gross-profitable at zero cost on the expression instrument — correlation to BTC held for variance but not for sign at a ~10-day horizon, so NEAR's idiosyncratic component dominated the factor.

Outcome Summary

The backtest-review gate returned abandon before optimization: the failure was gross, not cost-driven — summed price PnL of -$24,692 plus back-added commission ($3,973) and impact ($5,139) still left roughly -$15,580 gross (~-0.27% of the ~$19.0k average notional), with both long (-$4,908) and short (-$19,783) sides losing before fees. The analyst ruled out iteration and hypothesis revision, since multiplying a negative gross capture by 1.8 only worsens it.

Outcome Summary

Measure the crypto market trend as a t-stat of BTCUSDT.BYBIT's ~10-day drift and express that sign always-in long/short on the ~1.8-beta NEARUSDT.BYBIT 2H perp, on the claim that higher beta raises per-trade gross capture at unchanged percentage fees.

Outcome Summary

Over 1,720 days and 20,626 bars it took 190 trades (95 long / 95 short, avg hold 7d 22h) for -29.62% total return, -7.29% CAGR, Sharpe -0.097 (CI -1.00 to +0.78), profit factor 0.852, win rate 35.8% and 50.08% max drawdown underwater for 829 days. Avg trade return was -0.687% of notional against the +0.15% floor, and only 2 of 6 calendar years were positive.
Strategy report

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