LuxAlgo

Nadaraya-Watson Estimator [LuxAlgo]

LuxAlgo Cập nhật   
The following tool smooths the price data using the Nadaraya-Watson estimator, a simple Kernel regression method. We make use of the Gaussian kernel as a weighting function.

Kernel smoothing allows the estimating of underlying trends in the price and has found certain applications in stock prices pattern detection.

Note that results are subject to repainting, this tool is meant for descriptive analysis, see the Usage section.

1. Settings

  • Bandwidth: controls the bandwidth of the Gaussian kernel, with higher values returning smoother results.
  • Src: Input source of the kernel regression.

    2. Usage

    Non-causal smoothing methods have found low support from technical analysts because they tended to repaint, yet they can provide powerful insights such as underlying trends in the price and how far the price deviates from them. They can also make drawing certain patterns easier and can help see underlying structures in the price more clearly.

    Using higher bandwidth values allows estimating longer-term trends in the price.


    Triangular labels highlight points where the direction of the estimator change. This allows for the identification of tops and bottoms in the underlying trend which can be compared to the actual price tops and bottoms.


    Note that multiple labels can appear in real-time, which highlights real-time changes in direction of the estimator. The most recent label on a series of labels is the first ones to appear. This can eventually be useful for the real-time predictive application of the estimator. However, it is not a usage we particularly recommend.

    3. Details

    The Nadaraya-Watson estimator can be described as a series of weighted averages using a specific normalized kernel as a weighting function. For each point of the estimator at time t, the peak of the kernel is located at time t, as such the highest weights are attributed to values neighboring the price located at time t.


    A lower bandwidth value would contribute toward a more important weighting of the price at a precise point and would as such less smooth results. In the case where our bandwidth is so small that the resulting kernel is just an impulse, we would get the raw price back.


    However, when the bandwidth is sufficiently large, prices would be weighted similarly, thus resulting in a result closer to the price mean.


    It can be interesting to note that due to the nature of the estimator and its weighting procedure, real-time results would not deviate drastically for points in the estimator near the center of the calculation window.
Phát hành các Ghi chú:
Minor changes
Phát hành các Ghi chú:
Added a disclaimer which displays a small message on the chart. You can hide this from within the settings menu by checking the "Hide Disclaimer" option.
Phát hành các Ghi chú:
Minor changes.

Get Access to LuxAlgo indicators: luxalgo.com

Join our 100k+ community: discord.gg/lux

All scripts & content provided by LuxAlgo are for informational & educational purposes only. Past performance does not guarantee future results.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?