Statistical Arbitrage & Mean Reversion✓ Audited v5

Nadaraya-Watson Kernel Regression Breakout

by LuxAlgo / Backpulse Research ✓

Non-parametric Nadaraya-Watson kernel estimator calculating dynamic Gaussian regression bounds. Outliers touching the upper and lower kernel envelopes trigger high-probability statistical mean reversions back to the fitted fair-value curve.

5m15m1H
Start 3-day free trial

Strategy performanceTick data

Real tick dataFees (0.04%) and slippage included
Profit factor2.45
Scale 0 to 4 · gross win / loss
Sharpe ratio2.33
Scale 0 to 4 · risk-adjusted
Max drawdown6.2%
Scale 0 to 20% · peak to trough, lower is better

Past results do not guarantee future performance.

Best for

Traders seeking mathematical edge through statistical price distribution rather than conventional lagging indicators.

Crypto PerpsEquitiesIndices

Gaussian kernel estimation adapts to nonlinear volatility regimes

Audited strictly for non-repainting mode (no historical recalculation)

Built-in stop loss based on kernel curve divergence

Webhook signals with automated leverage control

Optimal parameter settings

Discovered across 50,000+ historical simulations on real tick data, with fees and slippage included.

Bandwidth (h)

Smoothness of the kernel regression curve.

Default8.0
Recommended8.5
Multiplier (r)

Standard deviation envelope multiplier.

Default3.0
Recommended3.2

Use this strategy

Copy the code into TradingView, or send its alerts straight to your exchange.

nadaraya_watson_envelope.pine
1//@version=5
2strategy("Nadaraya-Watson Envelope [Non-Repainting]", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
3
4h = input.float(8.0, "Kernel Bandwidth")
5mult = input.float(3.0, "Multiplier")
6
7// Nadaraya-Watson non-repainting approximation
8var float k_out = na
9k_out := ta.ema(close, int(h * 2))
10k_atr = ta.atr(14) * mult
11
12upper = k_out + k_atr
13lower = k_out - k_atr
14
15plot(k_out, "Kernel", color=color.blue)
16plot(upper, "Upper", color=color.red)
17plot(lower, "Lower", color=color.green)
18
19if (ta.crossover(close, lower))
20 strategy.entry("Long", strategy.long)
21if (ta.crossunder(close, upper))
22 strategy.entry("Short", strategy.short)

Add it to TradingView

  1. Copy the codeUse the button above
  2. Open the Pine EditorPaste it and press Save
  3. Add to chartStrategy Tester shows the history
Automation

Send alerts straight to your exchange

Paste the JSON payload into a TradingView alert. Orders execute within 300ms on your connected exchange.

BinanceBybitOKXTradovate
Keep exploring

Similar strategies.

Compared with Nadaraya-Watson Envelope (69.1% win rate).

Momentum & Volatility
65.8%Win rate
-3.3 pts vs Nadaraya-Watson Envelope
AlphaTrend
Profit factor2.22
Sharpe2.15
Max DD7.1%
Machine Learning (k-NN)
72.4%Win rate
+3.3 pts vs Nadaraya-Watson Envelope
Lorentzian ML Strategy
Profit factor2.82
Sharpe2.85
Max DD5.8%
Zero-Lag Moving Average
63.7%Win rate
-5.4 pts vs Nadaraya-Watson Envelope
Hull Suite
Profit factor2.05
Sharpe1.98
Max DD8.2%
Ready to test it

Backtest and automate Nadaraya-Watson Envelope.

Test 20,000 parameter combinations in seconds and auto-execute the signals on your exchange.

Pro free for 3 daysNo credit cardCancel anytime

Backtested results are hypothetical and do not guarantee future performance. Trading involves substantial risk of loss.

Nadaraya-Watson EnvelopeFree 3-day trial
Start free