> ## Content Index
> Fetch the complete content index at: https://aligrithm.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 6.55 State-Dependent (In)Efficiency: Meta-Learning a Directional-Change Threshold
- URL: https://aligrithm.com/state-dependent-in-efficiency-meta-learning-a-directional-change-threshold/
- Published: 2026-09-22T20:31:58.000Z
- Updated: 2026-09-22T20:31:57.000Z
- Description: Crypto directional-change trading with a meta-learned threshold: adaptive Sharpe 1.34 vs 0.59 static, p=0.008. Real gain, but the 446% return and the omitted Bitcoin bar do not survive a recount.
- Author: ali askar
- Tags: 6. Portfolio Construction & System Death

Barak, Razmi and Mousavi report an out-of-sample Sharpe ratio of 1.34 against 0.59 for the best static version of the identical trading logic, on 50 crypto futures from January 2022 to January 2024, with a Ledoit-Wolf bootstrap p-value of 0.008 on the difference. The machine doing the work is a LightGBM classifier that picks tomorrow's directional-change threshold out of {0.01, 0.02, 0.04}. One table earlier, the same paper reports that running the same strategy on Bitcoin alone scored 0.63, beating every static portfolio version they built, and the headline table drops that comparison. The conclusion states the entire study is gross of transaction costs on a minute-level futures strategy that opens and closes a position on every threshold breach.

Both facts sit in the paper. Neither survives into the abstract.

The framing is the Adaptive Market Hypothesis of Lo: efficiency is not a property a market has or lacks, it is a quantity that moves as participants learn and conditions change. Urquhart found Bitcoin weak-form inefficient in 2016, Makarov and Schoar found arbitrage closing fast by 2020, and both can be right if inefficiency comes and goes. The interesting part of this paper is that it converts that debate into a parameter-selection problem with a measurable payoff, rather than another multifractal diagnostic. The part worth arguing with is the arithmetic.

## What a directional change event is

Directional change throws out the calendar. Instead of sampling price every minute or every day, you declare a threshold, called theta, and record an event only when price reverses by more than theta from the last extreme. In an uptrend you track the running high; the moment price falls below that high by theta, you confirm a downward trend.

$$ P\_c \\leq P\_{high} \\times (1 - \\theta) \\qquad\\text{and}\\qquad P\_c \\geq P\_{low} \\times (1 + \\theta) $$

The left condition confirms a new downtrend, the right one confirms a new uptrend. P-c is the current price, P-high is the highest price seen since the last confirmation, P-low the lowest. Worked numbers with theta of 0.02: if the running high on the portfolio index is 30,000, the downward event fires the first tick at or below 29,400\. Widen theta to 0.04 and you wait for 28,800\. Tighten it to 0.01 and 29,700 does it. The threshold is the only knob, and it controls how much noise you agree to sit through before you call the trend dead.

Two points get labelled at each event. The confirmation point, DCC, is where the threshold gets breached, and it is the only point you can trade. The extreme point, EXT, is the high or low that the move ran away from, and it gets stamped in hindsight once the confirmation happens. Everything after the confirmation, until the next extreme, is the overshoot.

![Directional change anatomy on intraday price: black price line, green circles at directional change confirmation points, green squares at extreme points, solid green segments for the DC interval and dash-dot segments for the overshoot interval](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/09/article_486-dc_event_anatomy.png)

Look at the gap between EXT (a) and DCC (b). The extreme sits at roughly 29,470 and the confirmation at roughly 29,170\. That 300-point gap is the toll you pay for waiting for confirmation, and it is charged on every single trade. Any backtest that enters at the extreme point rather than the confirmation point has already leaked the future. Barak and colleagues enter at confirmation, which is correct.

## The dual threshold turns a trend into a label

The base strategy runs two thresholds at once, a small one and a big one. Call them theta-small and theta-big, with theta-big the larger. The question the model answers is whether a small-threshold trend has the legs to become a big-threshold trend.

$$ y\_i = \\begin{cases} 1 & \\text{if } P^{s}\_{EXT,i} \\in \\{P^{b}\_{EXT}\\} \\\\\[4pt\] 0 & \\text{otherwise} \\end{cases} $$

Read it as a membership test. For the i-th small-threshold event, take its extreme point and ask whether that same price also registers as an extreme in the big-threshold series. If yes, the small move was the start of something large and the label is 1, meaning momentum. If no, the small move fizzled and the label is 0, meaning reversal.

![Dual directional-change summarisation with two thresholds overlaid: green markers and lines for the small threshold, red markers and lines for the big threshold, with EXT (a) shared by both series and EXT (b) appearing only in the green series](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/09/article_486-dual_threshold_label.png)

EXT (a) near 29,470 carries a green square and a red square, so its label is 1\. EXT (b) near 29,170 carries only a green square, so its label is 0\. The base model forecasts that label from four directional-change features, of which the workhorse is total move value, the size of the trend measured in thresholds rather than in percent.

$$ TMV = \\frac{P^{s}\_{EXT,i} - P^{s}\_{EXT,i-1}}{P^{s}\_{EXT,i-1} \\times \\theta^{s}} $$

Dividing by theta is what makes this comparable across regimes. A move from 28,000 to 29,680 is 6.00%, and at theta-small of 0.02 that is a TMV of 3.00: the trend ran three thresholds before dying. Run the same 6% move with theta of 0.04 and TMV is 1.50\. Same price path, half the number, because the yardstick doubled. The trading rule is then perverse on purpose: when the model predicts 0 the strategy opens a counter-trend position, betting the small move reverses.

## No single threshold wins for long

The static benchmark comes from a grid search on January 2021 to January 2022, which lands on theta of 0.026.

![Scatter plot of in-sample Sharpe against the small theta threshold on a log axis, points coloured by optimisation trial, rising from minus 0.45 below theta of 0.004, crossing zero near 0.009, peaking near 0.9 around theta of 0.026 and falling to minus 1.3 by theta of 0.09](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/09/article_486-theta_optimisation_scatter.png)

The surface is not noise. It is a clean hump: negative below theta of 0.004, crossing zero near 0.009, peaking near 0.9 around 0.026, collapsing to minus 1.3 by 0.09\. Two things spoil the comfort that gives you. First, at the peak itself the repeated trials scatter between roughly 0.25 and 0.95, so the optimum is a smear rather than a point. Second, that in-sample peak of about 0.9 turned into an out-of-sample Sharpe of 0.46 at a maximum drawdown of 56.31%, a haircut of roughly half. Worse for the story the grid tells, theta of 0.01 scores near zero in-sample and then posts the best static out-of-sample Sharpe in the paper at 0.59\. The grid ranked the eventual winner as worthless.

![Monthly returns for three static directional-change thresholds, 0.01 in blue, 0.02 in orange and 0.04 in green, showing the winning threshold rotating month to month with no persistent leader](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/09/article_486-monthly_returns_static_thetas.png)

The rotation is real. April 2021 belongs to 0.04, August 2021 to 0.01, June 2022 to 0.04 again, October 2023 to 0.02\. Note that this figure starts in April 2021 while the paper defines its out-of-sample window as January 2022 to January 2024, so nine of the bars come from the period used to fit the static benchmark. The caption calls the whole span out-of-sample. That is sloppy labelling rather than a broken result, but it is the second caption in the paper that disagrees with its own axis, the first being Figure 7, whose legend shows theta of 0.026 while its note claims it plots theta of 0.01.

## Predicting which parameter wins tomorrow

The meta-learner treats threshold choice as a three-class classification problem. The label is whichever base strategy made the most money.

$$ \\theta^{s}\_{\*} = \\arg\\max\_{\\theta\_i \\in \\Theta} \\text{Return}(\\theta\_i, d) \\qquad \\hat{\\theta}^{s}\_{d+1} = f\_{meta}(\\mathbf{m}\_d) $$

The first expression takes the day's realised returns across the three base strategies and names the winner. The second maps the market-state feature vector m observed at the close of day d into a forecast of the winner for day d+1\. Worked example: on some day theta of 0.01 returns +1.8%, theta of 0.02 returns minus 0.4%, theta of 0.04 returns +0.9%. The label for that day is 0.01\. The model sees the features from the prior close and tries to have named 0.01 in advance.

The index on the first expression is wrong as printed: it labels day d using day d's own returns, while the text and the stated training pairs both use day d+1\. Take it as a typo, because the alternative reading is a model trained on today's answer sheet.

Feature vector m carries four blocks: recent performance of each base strategy, 43 on-chain metrics for Bitcoin and Ethereum culled from around 300 by importance scoring inside the walk-forward loop, directional-change trend statistics, and plain market statistics like RSI, skewness and a price Z-score. Base models roll on a fixed window, the meta-model expands from a fixed origin so it keeps long memory of regimes it saw years earlier.

Run each block alone and the ranking is not what the abstract advertises. Market regime statistics alone score 1.19 and strategy performance history alone scores 1.17, while the two blocks the paper markets as its novel contribution, on-chain data and directional-change indicators, score 0.93 and 0.92\. The novel information sets are the weakest two of four. They do add something, since the combined model at 1.34 beats every single block, and the appendix shows the four models' predicted probabilities are close to uncorrelated. Diversification across feature families, not blockchain fundamentals, is what lifts the number.

![Horizontal bar chart of every out-of-sample Sharpe ratio the paper reports for January 2022 to January 2024, ranging from 0.07 for equal weight up to 1.34 for the adaptive LightGBM model, with the 0.63 bar for the same strategy run on Bitcoin alone highlighted because the headline table omits it](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/09/article_486-sharpe_ladder.png)

Every bar above comes from the same out-of-sample window. The orange one is the comparison the headline table leaves out.

## Weighting the loss by how much the day matters

This is the one piece worth stealing. A classifier minimising log loss treats every misclassification the same, which is wrong when the cost of picking the wrong threshold varies by two orders of magnitude across days. The fix weights each training day by the spread between the best and worst base strategy that day.

$$ w\_d = \\exp\\!\\big(\\alpha \\cdot (r\_{\\max,d} - r\_{\\min,d})\\big), \\qquad \\mathcal{L} = \\sum\_{i=1}^{n} w\_i \\cdot \\ell(y\_i, \\hat{y}\_i) $$

The spread r-max minus r-min is non-negative by construction, so the weight is at least 1 and grows without bound as the day gets more decisive. Alpha is a scaling constant, set to 5\. Worked example: on a loud day the best threshold makes +8% and the worst loses 4%, so the spread is 0.12 and the weight is exp(5 times 0.12) = 1.822\. On a quiet day the spread is 0.01 and the weight is exp(0.05) = 1.051\. The loud day counts 1.73 times as much. Their weight histogram tops out at 2.2, which back-solves to a spread of ln(2.2)/5 = 0.158, consistent with the return clipping they describe.

Then check whether it worked. Appendix H runs every model with and without the weights. Strategy-history, on-chain and regime models all improve. Directional-change indicators drop from Sharpe 1.10 to 0.92\. The combined model, the one carrying the 1.34 headline, drops from 1.37 to 1.34 and from 496.57% to 445.98% total return. Three of five improved, not four as the text claims, and the flagship model got worse. The honest version of this contribution is that the weighted loss trades a little return for a shallower drawdown, 29.91% against 37.54%, on the model they shipped.

## What the model learned

Temporal feature importance shifts with volatility. Through the high-volatility stretch of early 2022 the model leans on directional-change indicators, overshoot magnitudes and trend asymmetries. As volatility falls through late 2022 and 2023 it shifts toward on-chain metrics like exchange flows and holder behaviour, and toward recent strategy performance. In a panic the information sits in the price path, and in calm the price path stops telling you much.

The SHAP attribution is narrower than the summary suggests. It says the model picks the small threshold when the price Z-score is high and Ethereum exchange netflows are positive, which reads as an overbought market with coins moving onto exchanges ahead of selling. It picks the large threshold when average position lengths are long and netflows are negative, which reads as accumulation. That is a statement about mean reversion versus trend, not about volatility. A shorthand that says high volatility implies a tighter threshold is not what the paper reports, and it would be strange if it were, because a tighter threshold in a noisier tape fires more false events, not fewer.

## Do the reported numbers close?

Sharpe and compounded return are not free to move independently. If a strategy has daily mean m and daily standard deviation s, its compounded growth per day is roughly m minus s-squared over two, and the daily Sharpe k pins m to k times s.

$$ g(s) = k\\,s - \\tfrac{1}{2}s^{2}, \\qquad g\_{\\max} = \\tfrac{1}{2}k^{2} \\quad\\text{at}\\quad s = k, \\qquad k = \\frac{SR\_{ann}}{\\sqrt{A}} $$

Growth g is a downward parabola in volatility: too little volatility and you cannot compound, too much and variance drag eats you. The peak sits at s equal to k, so the most a strategy with a given Sharpe can compound to over 730 days is exp(730 times g-max) minus 1, whatever volatility it runs. A is the annualisation factor, 365 for a market that never closes.

![Two panels plotting two-year compounded return against daily volatility for a fixed annualised Sharpe: left panel Sharpe 0.59 peaks at 42 percent while the paper reports 63 percent, right panel Sharpe 1.34 peaks at 502 percent with the reported 446 percent intersecting the curve at 5.4 percent daily volatility](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/09/article_486-sharpe_return_feasibility.png)

Run the static theta of 0.01 row through it. Sharpe 0.59 over 365 days gives k = 0.59/19.105 = 0.030882, so g-max = 0.000477 per day, and over 730 days that compounds to 41.6%. The paper reports 63.19%. No volatility makes that pair work. The same failure hits theta of 0.04 (ceiling 32.4% against a reported 45.23%) and the theta of 0.026 benchmark (ceiling 23.6% against 31.25%). Reversing the calculation, a 63.19% two-year return needs an annualised Sharpe of at least 0.70 on a 365-day clock, and re-annualising 0.59 from 252 days to 365 gives 0.59 times the square root of 365/252, which is 0.71\. That clears the floor with nothing to spare, so the likely explanation is a 252-day convention applied to a market that never closes rather than invented returns. Vidal-Tomás made the same point about crypto data hygiene. Keep the source form and read every Sharpe in the paper as about 20% low against its own return column.

The adaptive row is feasible even on 365 days, and the price of feasibility is the interesting part. A Sharpe of 1.34 compounding to 445.98% requires daily volatility of 5.37%, which annualises to 103%. Simulate 20,000 two-year paths at that mean and volatility and the median maximum drawdown is 67%, with only 1 in 10,000 coming in shallower than the reported 29.91%. Assume instead that the Sharpe came off a 252-day clock and the implied daily volatility falls to 3.47%, which lifts the odds to 3.5%. Still the lucky tail. The reported combination annualises to a 133.7% return against a 29.91% drawdown, a Calmar ratio of 4.47\. Event-based strategies do sit flat for stretches, which makes daily returns lumpy rather than normal, so treat this as a smell rather than a proof. It is a strong smell.

## What a fill costs

The paper says outright that everything is gross of fees, funding and slippage, and leaves net returns to future work. Price that gap. Profit factor on the adaptive model is 1.27\. Suppose the average winner gains 1.50% and the average loser drops 1.20%; a win rate of 50.4% produces exactly 1.27\. Now charge every round trip.

At 4 basis points the profit factor falls to 1.196\. At 8 basis points, roughly Binance futures taker fees on both sides for a large account, it falls to 1.127\. At 16 basis points it hits 1.001 and the edge is gone. That threshold is not far away once you remember what the strategy trades: an aggregated index of every selected coin, so each event fires a simultaneous rebalance across all legs, several of them illiquid alts where the spread alone clears 10 basis points. Add perpetual funding, which a two-sided strategy holding through funding stamps pays on every stamp. The base strategy at theta of 0.01 fires on every 1% move in a market whose daily range clears 4% often enough, which is a churn problem before it is a cost problem. The old article ["Percentile-Rank Momentum With Hysteresis: Low-Churn Signals"](https://aligrithm.com/percentile-rank-momentum-with-hysteresis-low-churn-signals/) handles the same sensitivity with a dead band instead of a classifier, and a dead band costs nothing to fit.

One more crack in the sample: the universe is the top 50 coins by market capitalisation as reported by CoinMarketCap in 2024, applied back to January 2021\. LUNA was a top-ten coin in 2021 and worthless by May 2022\. FTT was top-thirty until November 2022\. Neither appears. That omission matters more to this strategy than to most, because the base rule is counter-trend: it opens against the move when the model predicts the small trend will fizzle. Run that rule into LUNA in May 2022 and it buys every dip of a coin going to zero. The same hindsight also lifts the equal-weight and hierarchical risk parity benchmarks, so their Sharpes of 0.07 and 0.08 are already the flattered versions.

## What survives

Strip the headline and a defensible result remains. Threshold optimisation on directional-change strategies does not hold up: the in-sample optimum of 0.026 delivered 0.46 out of sample, worse than two of the three round-number thresholds nobody tuned. Switching thresholds on observable state beats committing to one, by a margin the Ledoit-Wolf bootstrap puts at p = 0.008, and that test is conservative because the benchmark is the best of three chosen after seeing the results. The XGBoost replication at 1.28 says the gain belongs to the framework rather than to LightGBM. Doubling a Sharpe from 0.59 to 1.34 is the claim the evidence supports, and it is a real claim.

The 445.98% is not. That number is 7.06 times the static strategy's total return while the Sharpe is only 2.27 times higher, and the whole gap is compounding at 100% annualised volatility over two years. The old article ["Does ML Actually Help Asset Pricing? Kelly's 20%, Not 2–3×"](https://aligrithm.com/does-ml-actually-help-asset-pricing-kellys-20-not-2-3x/) makes the same correction in equities: machine learning buys you a real but bounded improvement, and the eye-catching multiples come from the reporting convention rather than the model. Report the Sharpe, net of costs, against the best benchmark you have, which here is the same strategy on Bitcoin alone at 0.63 rather than the portfolio at 0.59\. On that comparison the adaptive model is a 2.13 times improvement, gross, on a survivor-selected universe, over two years that contained one bear market and one bull market and nothing else.

![](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/09/article_486-visual-0.png)

## KEY POINTS

- A LightGBM meta-learner that reselects the directional-change threshold each day from {0.01, 0.02, 0.04} posts an out-of-sample Sharpe of 1.34 against 0.59 for the best static threshold, Ledoit-Wolf bootstrap p = 0.008, on 50 crypto futures from January 2022 to January 2024.
- The same strategy run on Bitcoin alone scored 0.63, better than every static portfolio version, and the headline table omits it. Measure the adaptive gain against 0.63, not 0.59, and it is 2.13 times rather than 2.27 times.
- Threshold optimisation fails on its own terms. The in-sample grid peaks near Sharpe 0.9 at theta of 0.026, that setting delivered 0.46 out of sample, and theta of 0.01, which the grid scored near zero, went on to post the best static out-of-sample Sharpe at 0.59.
- The two feature blocks sold as novel are the two weakest. On-chain metrics score 0.93 and directional-change indicators 0.92, against 1.19 for plain market statistics and 1.17 for strategy performance history. The lift comes from combining near-uncorrelated blocks.
- The weighted loss, w = exp(5 times the best-minus-worst daily return spread), is the transferable idea, but Appendix H shows it improved three of five models, not four, and made the flagship model worse on Sharpe (1.37 to 1.34) while cutting drawdown from 37.54% to 29.91%.
- The static rows do not reconcile. A Sharpe of 0.59 annualised on 365 days caps two-year compounded return at 41.6%, and the paper reports 63.19%. A 252-day convention makes the rows feasible, so read the reported Sharpes as too low against their own returns rather than the returns as invented.
- The adaptive row implies 103% annualised volatility on a 365-day convention, under which a 29.91% maximum drawdown shows up in 1 of 10,000 simulated paths. Calmar of 4.47 on a gross-of-cost backtest is a number to distrust.
- Everything is gross of fees. At profit factor 1.27, a 16 basis point round trip takes the edge to zero, and the universe is the 2024 top-50 applied back to 2021, so LUNA and FTT never appear.

## References

- [State-Dependent Market (In)Efficiency in Cryptocurrency Markets, Sasan Barak, Siavash Razmi and Alireza Mousavi (SSRN 5525163)](https://papers.ssrn.com/sol3/papers.cfm?abstract%5Fid=5525163&ref=aligrithm.com)