R
R
Rastishka2018-07-11 13:18:50
Mathematics
Rastishka, 2018-07-11 13:18:50

How to evaluate the "quality" of a trend?

There is a function (in talib, in excel, anywhere) to define a trend line based on a point cloud.
Is it possible to somehow evaluate the "quality" of this trend line?
Like if all points are on the same straight line = 100%
If they are slightly spread = 70%
You can make your own bike and calculate the spread width relative to the trend line, but maybe such a method has already been implemented? If yes, what is it called to google it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Sokolov, 2018-07-11
@sergiks

It sounds like you are interested in the value of the function that is minimized in linear regression. Usually this is the sum of the squared distances of each of the points to the line. It's easy to write your own implementation. As the ready-made functions in the listed products are called, I can’t tell you, alas.
If everything is clear from 100% - when all points are on a straight line and the sum = 0; what to take as a maximum, for 0% accuracy, which cannot be worse? :)

V
Vyacheslav Shindin, 2018-07-12
@pro_co_ru

Ta-Lib has a stddev function ( standard deviation, standard deviation ). It seems that this is exactly the same metric that you describe in your question.
Those. to make it 100% when it matches the straight line, you need to play around with the result a little, for example, normalize the output of stddev by one, then 1 minus the answer from stddev, and multiply by 100% to convert to percentages.
And yet, you can consider the correlation coefficient between these values ​​and the projections of these values ​​on the trend line, for example.

A
Alexander Skusnov, 2018-07-11
@AlexSku

Usually they consider the standard deviation (in many languages ​​\u200b\u200b- std, and in Excel somehow in Russian).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question