wbburgin

Deming Linear Regression [wbburgin]

wbburgin Aggiornato   
Deming regression is a type of linear regression used to model the relationship between two variables when there is variability in both variables. Deming regression provides a solution by simultaneously accounting for the variability in both the independent and dependent variables, resulting in a more accurate estimation of the underlying relationship. In the hard-science fields, where measurements are critically important to judging the conclusions drawn from data, Deming regression can be used to account for measurement error.

Tradingview's default linear regression indicator (the ta.linreg() function) uses least squares linear regression, which is similar but different than Deming regression. In least squares regression, the regression function minimizes the sum of the squared vertical distances between the data points and the fitted line. This method assumes that the errors or variability are only present in the y-values (dependent variable), and that the x-values (independent variable) are measured without error.

In time series data used in trading, Deming regression can be more accurate than least squares regression because the ratio of the variances of the x and y variables is large. X is the bar index, which is an incrementally-increasing function that has little variance, while Y is the price data, which has extremely high variance when compared to the bar index. In such situations, least squares regression can be heavily influenced by outliers or extreme points in the data, whereas Deming regression is more resistant to such influence.

Additionally, if your x-axis uses variable widths - such as renko blocks or other types of non-linear widths - Deming regression might be more effective than least-squares linear regression because it accounts for the variability in your x-values as well. Additionally, if you are creating a machine-learning model that uses linear regression to filter or extrapolate data, this regression method may be more accurate than least squares.

In contrast to least squares regression, Deming regression takes into account the variability or errors in both the x- and y-values. It minimizes the sum of the squared perpendicular distances between the data points and the fitted line, accounting for both the x- and y-variability. This makes Deming regression more robust in both variables than least squares regression.
Note di rilascio:
Updated name (had in title)

PM me to test any of my strategies free for 7 days.

Invite-only indicators: www.patreon.com/wbburgin/membership
Test my strategies on CryptoRobotics: cryptorobotics.co/?trade=f23b09
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?