Skip to content
All strategies

Strategies

ATOM OKX 4H Partial-Information Kalman Drift Filter: Trade the Filtered Ornstein-Uhlenbeck Trend with Log-Optimal (Half-Kelly) Sizing Set at Entry, Flat When the Filtered Drift Is Inside One Posterior Std, Long-Short (ATOMUSDT.OKX 4H, pure OHLCV)

Outcome: Abandoned

AtomOkxKalmanOUDriftHalfKellyLS

Outcome Summary

After two iterations, the strategy tested a price-only Kalman drift filter on ATOMUSDT.OKX 4H with long-short positions and half-Kelly sizing fixed at entry. Its 82 closed trades over 6.4 years produced a -36.54% return, Sharpe -0.024 and 65.85% maximum drawdown. Backtest review abandoned this discrete implementation because costs overwhelmed positive aggregate pre-cost profit and average net trade return was -0.209%; no measured viable parameter region supported optimization. Optimization and later reviews were not reached.

Hypothesis

Distilled from Bel Hadj Ayed et al., 'Performance analysis of the optimal strategy under partial information' (arXiv:1510.03596, 2015). The paper models log price as dS/S = mu_t dt + sigma dW, with an UNOBSERVABLE drift mu_t following an Ornstein-Uhlenbeck process d mu = -kappa mu dt + sigma_mu dB. Under partial information the investor only sees prices, so the optimal log-utility (Kelly/Merton) strategy holds the fraction f_t = mu_hat_t / sigma^2 of wealth, where mu_hat_t is the Kalman-Bucy filter estimate of……Show moreShow less

Distilled from Bel Hadj Ayed et al., 'Performance analysis of the optimal strategy under partial information' (arXiv:1510.03596, 2015). The paper models log price as dS/S = mu_t dt + sigma dW, with an UNOBSERVABLE drift mu_t following an Ornstein-Uhlenbeck process d mu = -kappa mu dt + sigma_mu dB. Under partial information the investor only sees prices, so the optimal log-utility (Kelly/Merton) strategy holds the fraction f_t = mu_hat_t / sigma^2 of wealth, where mu_hat_t is the Kalman-Bucy filter estimate of the drift. The abstract states that the strategy exists and that its asymptotic Sharpe depends only on the signal-to-noise ratio sigma_mu/sigma and on kappa. It does NOT give numbers, and it does not say whether that Sharpe beats trading costs. That is what this hypothesis tests. Mechanism in one sentence, with instrument and timeframe removed: 'estimate a hidden mean-reverting drift with a steady-state Kalman filter on log returns and hold a position of sign and size mu_hat/sigma^2, flat when the estimate is not distinguishable from zero.' Honest classification: the steady-state Kalman-Bucy filter for an OU drift is mathematically an exponentially weighted return average with decay rate lambda = sqrt(kappa^2 + (sigma_mu/sigma)^2). So this IS a time-series-momentum variant. What is new is where the lookback comes from: the decay is derived from the model (kappa and SNR) rather than tuned. The position is Kelly-scaled by the inverse of variance rather than fixed. And the flat band is the filter's own posterior std rather than a hand-fitted threshold. INSTRUMENT AND VENUE SELECTION, stated as selection choices (L122): OKX is at 0.3% of the corpus, against a >=5% target. Binance USD-M is at 67%, so it is excluded. BTC and ETH are excluded because of corpus concentration, and ETH already has an OKX slot in the pipeline. ATOMUSDT.OKX was picked from the handful of OKX USDT swaps with 4H history back to 2020-05, about 6.4 years or ~14,000 bars, checked in the catalog on 2026-09-26. Many OKX symbols (SOL, XRP, LTC) currently have only ~2 days of 4H data. The mechanism is pure-price, so per L160 there is no supplementary feed on OKX. The 4H timeframe was chosen for sample size: daily bars give too few flips (L128), and hourly bars put the filter's sign flips inside fee range. DEVIATIONS FROM THE PAPER, declared: (1) The paper rebalances continuously to f_t. We size ONCE at entry to f_t and hold that notional until exit, because continuous rebalancing on a 0.10% round-trip venue is the fee graveyard (L150). (2) We use half-Kelly with a 1.5x equity cap, because full Kelly with an estimated drift is known to overbet. (3) We add a flat band of |mu_hat| < 1.0 * sqrt(P_ss) (the posterior std of the filter), because the paper's strategy is never flat (L150). WHAT THE FULL PAPER MUST CONFIRM: (a) the closed-form asymptotic Sharpe under partial information as a function of SNR and kappa. At our pre-set SNR (below), this Sharpe should be computed before coding. If it is below ~0.5 gross, the hypothesis should be withdrawn. (b) Whether the paper's formulas assume known kappa and sigma_mu. We fix them a priori rather than estimating them, and we do not optimize them in walk-forward beyond +-20% sensitivity. IMPLEMENTATION NOTE (recent verification deaths were sandbox timeouts): every update is recursive and O(1) per bar. That covers the EWMA variance, the steady-state gain computed once in __init__, and one scalar filter update per bar. There are no history rescans, and no lists sorted or rebuilt inside on_bar.

negative_expectancy: Reject this declared discrete, entry-sized half-Kelly operationalization on ATOMUSDT.OKX 4H, not the paper's theoretical strategy or time-series momentum generally. The 82-trade sample loses after measured costs: average net trade return -0.209% versus the +0.15% review floor, PF 0.829 and realized total return -36.54%. Gross aggregate profit is positive but insufficient to cover execution and funding costs at the registered sizing. QA's economic concern is borne out; its missing-funding caveat is superseded by posted funding in the full report. No implementation, accounting or data defect is established, and no measured viable parameter region supports optimization.

Implementation

Estimates a hidden mean-reverting drift on ATOMUSDT.OKX 4H log returns with a steady-state Kalman-Bucy filter. Each bar costs O(1). The signal is the filtered drift divided by the filter's posterior std. The strategy goes long above +1 std, goes short below -1 std, and stays flat inside the band. Size is set once at entry to a half-Kelly equity multiple, 0.5*|mu_hat|/sigma^2, capped at 1.5x equity and funded from leveraged buying power (equity * config.leverage = 2x).

Iteration 2 fix for leverage_set_but_unused. position_size now reads self.config.leverage directly and sizes qty = equity * fraction * leverage / price, where fraction = target_mult / leverage (the share of 2x buying power). The economics are unchanged: the half-Kelly target is still capped at 1.5x equity, which needs more than 1x margin, so leverage=2.0 is actually used. No other logic changed.

Verification Results

The smoke run reports -0.0751% average net trade return, -30.63% total return and 63.13% drawdown. Modeled impact is $32,699.76 and estimated capacity is only $399.19, versus average position exposure of 131.35% of equity. These warrant full-backtest execution-cost and capacity review, but do not establish a correctness defect. No OKX funding cash flows were available, so perpetual carrying costs remain unmeasured.

Backtest Review

Sharpe
-0.02
Total return
-36.54%
Max drawdown
65.85%
Trades
82
Win rate
23.2%
Profit factor
0.83

82 closed trades over 6.4 years; code and sampled trades support the stated long-short drift-following and variable entry sizing.

Accounting reconciles, funding and impact are posted, and no terminal position remains.

Average net trade return -0.209% versus the +0.15% OKX review floor; PF 0.829, Sharpe -0.024 and total return -36.54%.

Average position exposure 131.35% accompanies 65.85% drawdown. Long trades lose $48,784; shorts earn $12,244.

Approximately $13,625 of aggregate pre-cost profit is overwhelmed by $9,365 commission, $30,305 impact and $10,495 funding costs.

Buy-and-hold returns -33.92%, with approximately 97.02% drawdown on the sampled benchmark curve; strategy alpha is negative.

The one-bar forecast IC is 0.0016 (t=0.19), offering no supporting short-horizon information, though it does not independently test the multi-day holding edge.

Iteration History

Verification failed (leverage_set_but_unused): config sets leverage=2.0 but the strategy never references leverage in sizing. Size positions on it — notional = equity * fraction * leverage / price (read self.config.leverage) — or set leverage=1.0. As written the leverage is inert and the backtest is identical to 1x.

Outcome Summary

Model-derived drift filtering and half-Kelly entry sizing still require an edge sufficient to cover measured execution and funding costs at the registered exposure.

Backtest review voted to abandon because negative net expectancy fell below the +0.15% average-trade review floor, and execution and funding costs overwhelmed positive aggregate pre-cost profit. No implementation, accounting or data defect was established; optimization and subsequent analyst and risk reviews were not reached.

Trade ATOMUSDT.OKX 4H long and short using a Kalman estimate of hidden mean-reverting drift, with half-Kelly sizing fixed at entry and a posterior-uncertainty flat band.

Over 6.4 years, 82 closed trades returned -36.54%, with Sharpe -0.024 and maximum drawdown 65.85%. Average net trade return was -0.209% and profit factor was 0.829.

Analysis

Performance analysis of the optimal strategy under partial information

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