TURKS - Tiered Unit Risk Kernel Strategy by Daymenion
By LuxAlgo
Performance Metrics
- Author: LuxAlgo
- Symbol: COINBASE:ETHUSD
- Timeframe: 4 hours
Description
Aug 16TURKS decides how much of a long position to hold. Exposure is a graded function of where the close sits against four moving averages (20/50/100/200), so it moves in rungs rather than switching on and off. That function is monotone in price, which means it inverts: every rung has exactly one price. The panel prints those prices before they are reached โ a ladder of levels at which the position gets larger or smaller, readable today.Long-only, 0 to 1, no shorting and no leverage.๐ THE RESULTTwelve symbols, shipped defaults, 4-hour charts, full available history. Commission $1.50 per order, slippage 0.01xATR per side, idle cash credited nothing. b&h is buy-and-hold over the identical bars, charged nothing at all. The comparison is deliberately rigged against the strategy. CAGR MAX DRAWDOWN CAGR / maxDDsymbol sample TURKS b&h TURKS b&h TURKS b&hSNDK 1.3y +1406.3% +1899.0% -37.2% -56.8% 37.82 33.43ETH 9.5y +117.3% +71.9% -54.4% -94.1% 2.16 0.76BTC 9.5y +70.0% +54.2% -62.3% -83.9% 1.12 0.65ARM 2.7y +62.5% +72.9% -39.8% -55.8% 1.57 1.31TSLA 15.9y +32.7% +41.7% -57.0% -74.9% 0.57 0.56NVDA 22.4y +25.3% +36.4% -77.0% -85.2% 0.33 0.43AMD 21.4y +20.2% +17.3% -69.3% -96.1% 0.29 0.18AVGO 16.8y +16.9% +39.0% -36.9% -50.3% 0.46 0.78MU 22.4y +9.3% +19.7% -81.4% -90.9% 0.11 0.22GOLD 13.5y +7.2% +7.7% -20.0% -35.0% 0.36 0.22SPY 20.4y +4.4% +9.1% -40.5% -56.7% 0.11 0.16INTC 20.4y +2.2% +8.5% -73.3% -74.2% 0.03 0.11CAGR / maxDD is the column that settles it โ return earned per unit of drawdown suffered. On that measure TURKS wins on 7 of 12. It cut maximum drawdown on 12 of 12, and beat buy-and-hold on raw return on 3.โธ ETH โ 117.3% against 71.9%, at โ54.4% drawdown against โ94.1%. Nearly double the return on barely half the pain.โธ BTC โ 70.0% against 54.2%, at โ62.3% against โ83.9%.โธ AMD โ 20.2% against 17.3%, turning a โ96.1% hole into โ69.3% across 21.4 years.These are assets that spent their entire sample inside a historic bull market, measured against a benchmark paying no commission and no slippage. Halving a drawdown is ordinary. Halving it and finishing ahead is not.BTCUSD 4h at the shipped defaults. The ladder is the green and red boxes; the envelope is the pair of curves around the mean. Bottom left is the BOOK panel reading 70.0% against 54.2% buy-and-hold at โ62.3% drawdown against โ83.9%, on 58.0% average exposure. Right side is the live state: what the rule targets now, where the next rung sells, where it buys back.MU, SPY, TSLA and INTC are in that table because they were chosen to be difficult, and they behave exactly as the mechanism predicts. The rule sells strength and holds cash: it pays when a price path is violent relative to its drift, and it costs when the drift is high and the path is smooth. On a broad index it is the wrong tool โ SPY 9.1% becomes 4.4%, and that number is in the table rather than left out of it.๐ HOW TO USE IT1 โ Set your costs before you read anything. Commission ($ per order) and Typical position size ($) are the only two numbers the cost model needs; every other cost figure is a rate derived from them. A flat $1.50 is 1.9bp on an $8,000 position and 7.5bp on a $2,000 one. Leave these wrong and the panel lies to you.2 โ Pick the instrument. Single names and crypto whose drawdowns are violent relative to their drift. The table above is the guide, including the four rows that say don't.3 โ Read the ladder, not the arrows. The SELL / BUY ENGINE block prints three live numbers:โธ Sell next above โ the price at which the next rung comes offโธ Buy back below โ the price at which it goes back onโธ Rungs sold โ how much the envelope has already taken off, e.g. 12 of 20Both prices exist now, before the move. They are not marks that appeared after one.4 โ Read the dial. The THE RULE block prints Target weight, which is what the rule says you should be holding at this instant, and Dial c / f. The POSITION block prints what you actually hold, your entry, your open return, and the round-trip cost you are currently carrying โ so the gap between intention and position is always visible.5 โ Size it with c and f, not by fighting the rungs. c scales the whole position down. f is the floor you keep while the rule is off; raising it walks the book continuously toward buy-and-hold. Both tooltips print the measured frontier โ the whole curve of what each step costs in return and buys in drawdown, including the region where the rule loses to simply holding less.6 โ Verify on your own symbol before trusting any of this. The BOOK panel prints Sample, CAGR against b&h, Max drawdown against b&h, CAGR/maxDD, Sharpe, Exposure and Turnover for whatever chart you are on, net of your own cost settings. Change the symbol and the whole table above regenerates for your instrument in one bar.7 โ Alerts. alert() messages ship on; JSON webhook format is a checkbox away.๐ช HOW THE EXPOSURE IS SETExposure Shape picks the weighting rule. Ensemble 20/50/100/200 (graded) is the default: a slice is sold as the close drops below one more mean, bought back the same way, flat only below all four. Graded (continuous) uses one mean with an ATR ramp. Binary gate (legacy) is the original all-or-nothing rule.Risk dial c scales the entire position down. Risk dial f is how much you keep while the rule is off. These two are the real levers, and nothing about their trade-off is hidden behind a paywall or a marketing claim โ the full measured frontier is printed in the settings dialog.Quantise Steps rounds the target to N reachable weights and requires price to clear 75% of a step before acting, so orders do not fire every bar. Ramp Width (xATR) sets how far above the mean price must travel to earn full size.โ๏ธ THE NADARAYA-WATSON SELL ENGINEA trend weight cuts into weakness by construction, so it sells low: 59% of every unit the dial sells goes out below its own average cost, at 12.4 round trips a year. That is the flaw this block exists to fix. It replaces or constrains the sell side with a Gaussian kernel-regression envelope that only sells into genuine extension.Sell Engine Mode โ Dial, NWE-gated (default) keeps the dial's targets but forbids cutting while price sits below the smoother; it may still add. NWE band only turns the dial's sells off entirely. Dial + NWE (both cut) lets either one sell. Dial only leaves the envelope drawn but inert.Sell Rungs is how much leaves on each upper-band cross: 1/N of the position. Going from 3 to 10 halved turnover, cut the share sold below basis from 16.7% to 8.9%, and pulled out-of-sample drawdown from โ32.6% to โ18.3%. It ships at 20, one step further along the same gradient; 10 is the last value with a formal table behind it.Band Multiplier (3.0) and Buy-back Multiplier (2.5) set the upper and lower halfwidths in mean-absolute-deviation units. The asymmetry is the point: buying back nearer the mean than you sold restores the position before price has fully round-tripped, which is what keeps the overlay from bleeding in a chop. Bandwidth h widens and slows the smoother; it ships at 5.๐ฌ HOW THIS WAS BUILTNine candidate signal families were tested against a matched-exposure control across 140 markets and 8,793 sessions: moving-average and momentum structure, cross-sectional relative strength, short-horizon mean reversion, volatility-of-volatility and regime transitions, drawdown state, volume, range compression, multi-timeframe agreement, and calendar seasonality. Not one was positive both in and out of sample. All nine were deleted from the codebase rather than left in as decoration.The cleanest demonstration: take the original engine's own weight path and fire it 60 trading days late โ same trades, same sizes, same turnover, same average exposure, only the dates broken. It scores better late than on time. Block-shuffling the path also beats it. A rule whose dates carry information cannot survive having them destroyed, so that engine was removed and what remains is geometry.The stretch-proportional alternative to fixed rungs was then built and measured across 44 configurations. None beat rungs = 10. The project's pre-registered five-clause acceptance test passed all 20 graded cells โ but a constant weight of 1.0 also passes three of five clauses, exactly one cell of twenty reaches p < 0.05 uncorrected (the null expectation for twenty tests), that p fails Bonferroni, and the cells are 0.985-correlated. It was reported as a failed test.Everything left in this script survived a process designed to kill it. What remains is a sizing rule with no forecast in it: it does not predict the retest, it tells you at a price you can read now exactly what happens when one arrives.โ๏ธ COSTS, AND THE SETTINGS THAT DECIDE THEMInitial capital 150,000; commission $1.50 cash per order; no pyramiding; orders processed on bar close. Sell Engine Mode Dial, NWE-gated, Exposure Shape Ensemble 20/50/100/200 (graded), c = 1.00, f = 0.00, Quantise Steps 3, Ramp 1.0 ATR, Trend Mean 200, Cash Yield 0.00%. Envelope: bandwidth 5, multiplier 3.0, buy-back 2.5, MAE window 499, Sell Rungs 20.TradingView's strategy() slippage is denominated in ticks, and a tick is an absolute price โ one tick cannot be simultaneously correct for a $20 stock and a $1,600 one, nor for the same stock at $0.21 and at $224. It is therefore left at 0, and a proportional Slippage (xATR per side) input, shipped at 0.01, charges the cost in-script where it scales with the instrument.Cash Yield ships at 0.00%. The rule spends much of its life partly in cash, so any yield credited lands straight on the CAGR, and one constant cannot represent a twenty-year sample where real cash paid about 0.1% for eight years and about 5% for two. Every figure in the table above was measured with it at zero.Exits are close-only by construction โ no strategy.exit, no stop=, no limit= anywhere in the shipped path, and nothing resting at a broker. The printed ladder is the memoryless level; the live quantiser is hysteretic, so the executed switch can sit up to 0.75 steps from the printed one.ยฉ CREDITThe envelope is a port of "Nadaraya-Watson Envelope [LuxAlgo]" by LuxAlgo (tradingview.com/u/LuxAlgo/), published open-source under CC BY-NC-SA 4.0. The kernel, the MAE band construction and the crossover logic are theirs. This script is published under the same licence.Only the non-repainting, one-sided causal branch was ported. LuxAlgo's script defaults to the repainting branch, which rebuilds its curve inside barstate.islast with a two-sided kernel, so the value at bar i averages bars on both sides of i โ including bars that had not happened when i closed. That branch is deliberately absent here. The measured gap between the two is about 21% of the band halfwidth, which is why the repainting version's arrows look cleaner than any live rule can be. The sizing, the rung logic and the position accounting are new.Aug 16Release NotesCorrected formatting. The 12-symbol benchmark table in the description above collapsed into single lines, because consecutive spaces are stripped from description text. Here it is as intended:Pine ScriptยฎCAGR MAX DRAWDOWN CAGR / maxDDsymbol sample TURKS b&h TURKS b&h TURKS b&hSNDK 1.3y +1406.3% +1899.0% -37.2% -56.8% 37.82 33.43ETH 9.5y +117.3% +71.9% -54.4% -94.1% 2.16 0.76BTC 9.5y +70.0% +54.2% -62.3% -83.9% 1.12 0.65ARM 2.7y +62.5% +72.9% -39.8% -55.8% 1.57 1.31TSLA 15.9y +32.7% +41.7% -57.0% -74.9% 0.57 0.56NVDA 22.4y +25.3% +36.4% -77.0% -85.2% 0.33 0.43AMD 21.4y +20.2% +17.3% -69.3% -96.1% 0.29 0.18AVGO 16.8y +16.9% +39.0% -36.9% -50.3% 0.46 0.78MU 22.4y +9.3% +19.7% -81.4% -90.9% 0.11 0.22GOLD 13.5y +7.2% +7.7% -20.0% -35.0% 0.36 0.22SPY 20.4y +4.4% +9.1% -40.5% -56.7% 0.11 0.16INTC 20.4y +2.2% +8.5% -73.3% -74.2% 0.03 0.11Expand 9 linesCAGR / maxDD is return earned per unit of drawdown suffered, and it is the column that settles it. On that measure TURKS wins on 7 of 12. It cut maximum drawdown on 12 of 12, and beat buy-and-hold on raw return on 3 - ETH 117.3% against 71.9%, BTC 70.0% against 54.2%, AMD 20.2% against 17.3%.Measured at the shipped defaults on 4-hour charts over full available history: commission $1.50 per order, slippage 0.01xATR per side, idle cash credited nothing. b&h is buy-and-hold over the identical bars, charged nothing at all.v1.0.1 - republished with a corrected chart view. No change to the logic or the shipped defaults.