loxx

Levinson-Durbin Autocorrelation Extrapolation of Price [Loxx]

loxx Cập nhật   
Levinson-Durbin Autocorrelation Extrapolation of Price is an indicator that uses the Levinson recursion or Levinson–Durbin recursion algorithm to predict price moves. This method is commonly used in speech modeling and prediction engines.

What is Levinson recursion or Levinson–Durbin recursion?
Is a linear algebra prediction analysis that is performed once per bar using the autocorrelation method with a within a specified asymmetric window. The autocorrelation coefficients of the window are computed and converted to LP coefficients using the Levinson algorithm. The LP coefficients are then transformed to line spectrum pairs for quantization and interpolation. The interpolated quantized and unquantized filters are converted back to the LP filter coefficients to construct the synthesis and weighting filters for each bar.

Data inputs
Source Settings: -Loxx's Expanded Source Types. You typically use "open" since open has already closed on the current active bar
LastBar - bar where to start the prediction
PastBars - how many bars back to model
LPOrder - order of linear prediction model; 0 to 1
FutBars - how many bars you want to forward predict

Things to know
  • Normally, a simple moving average is caculated on source data. I've expanded this to 38 different averaging methods using Loxx's Moving Avreages.
  • This indicator repaints

Included
  • Bar color muting

Further reading
Implementing the Levinson-Durbin Algorithm on the StarCore™ SC140/SC1400 Cores

LevinsonDurbin_G729 Algorithm, Calculates LP coefficients from the autocorrelation coefficients. Intel® Integrated Performance Primitives for Intel® Architecture Reference Manual

Phát hành các Ghi chú:
Changed plot to line and cleaned up coordinate drawing functions.
Phát hành các Ghi chú:
Coordinate cleanup.
Phát hành các Ghi chú:
Updated drawing functions.
Phát hành các Ghi chú:
Increased lookback range to max of 2000 bars. Future bar draws are limited to math.min(array output calcs, FutBars) settings. All settings work now.. You'll need to adjust the settings if it shows an error that ran out of processing time or took too long to execute.
Phát hành các Ghi chú:
Fixed error and removed smoothing, it wasn't having the desired effect.
Phát hành các Ghi chú:
Removed unused inputs.
Phát hành các Ghi chú:
Updated lines calculation
Phát hành các Ghi chú:
I added the following comment to the code so folks can better understand what is going on here. You can see the original Levinson-Durbin Recursion algorithm in the commented out note.

// Original Levinson-Durbin algorithm used to implement Levinson recursion
// where a - coefficients of the model, p - order of the model.
// Here we need to find the autoregressive coefficients by solving directly
// our set of equations with n=2*p by the Levinson-Durbin method. Such method
// of prediction is called Prony Method; however, its disadvantage is the
// instability during the prediction of the future values of the series. That's
// why this method has not been included and instead we use a modified
// Levinson Recursion to calculate the prediction coefficients.
// I've included the origina method so one can compare the differences. You'll
// notice that both methods are very similar but the modified version gives the
// desired results. The difference is that the modified version calculates the
// coefficients a by decreasing the mean-root-square error on the training
// last n-p bars

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: www.patreon.com/algxtrading/membership
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 đồ?