Well yes, it's short, but that's in the simplest version, and there are a few other improvements regarding the speed of the algorithm and consideration of constraints...
This one has implemented support for data dimensions up to and including 3, plus a lower bound estimation method and associated candidate path test (as I understand it, this is much cheaper than full DTW for dimensions >1, where the main method becomes a TK-complete problem and leads to exponential solution times)
There is an article about DTW on the Habrahabra site http://habrahabr.ru/blogs/algorithm/135087/, it seems to be very clear, but I can't figure out how to use DTW for OHLC, can anyone explain it to me?
IgorM: There's an article about DTW on the Habrahabra site http://habrahabr.ru/blogs/algorithm/135087/, it seems to be very clear, but I can't figure out how to use DTW for OHLC, can anyone explain it to me?
The problem is that I don't understand how to use it, all I've understood is that with DTW you can fit different time periods (BP) to the same scale for subsequent analysis, but how... - don't understand
It didn't work, the DTW source itself is easy to port to mql, somehow:
the problem is that I don't understand how to use this, all I've understood is that with DTW you can fit different time sections (BPs) to the same scale for later analysis, but how... - don't understand
Tried it. Not sure how to use it either. Output should be either transformation path or transformed data. Let's say cost[][] is a distance matrix. But it gives a path with a return (if we look for the minimum value in each column), the condition "1. Monotonicity - the path never returns, i.e.: both indexes, i and j, which are used in the sequence, never decrease." Also, the path does not reach the opposite corner. In general, I don't really understand the meaning of all these manipulations with numbers when filling the cost[][] array - first the distances are simply counted and then they are added.
If we need to count distances between each element t1 and each element t2, then why should we perform so many calculations, if we need to fulfill condition "1. Monotonicity - the path never returns, that is: both indexes, i and j, used in the sequence, never decrease"?
DTW is completely unsuitable for the task at hand. DTW is used to recognize speech (words) in a real-time audio stream as follows (roughly):
There is a pattern (word) - a sequence of data, of length N.
There is an audio stream - a sequence of data, of length M >> N.
From the audio stream the outermost pieces of data, of different length are selected (roughly).
Each chunk is compared with a template by DTW.
If the maximum DTW exceeds a certain threshold, it is considered that a word has been spoken.
So DTW is just a criterion for comparing two sequences of different length. Nothing more.
To search for words in audio history, DTW is not suitable at all, because it is very resource-intensive. For example, finding out how many times a word was said in the last hour, using DTW, is nearly impossible.
A quick solution to this problem is to use a fast algorithm to calculate Pearson's QC. In doing so, the DTW is converted each time by a ZigZag with different input parameters. Such an algorithm is very easy to parallelize and will work almost in real time when implemented using GPU.
Another question is why do we need it? No one has solved this task on a serious level. But I'm almost sure that after having solved it, there will be one more nail in the coffin of pattern theory's soundness.
The theory of patterns, as well as Elliott waves and Fibo is not a technocratic level of thinking.
here seems to be the source code http://www.bytefish.de/blog/dynamic_time_warping
There's an article about DTW on the Habrahabra site http://habrahabr.ru/blogs/algorithm/135087/, it seems to be very clear, but I can't figure out how to use DTW for OHLC, can anyone explain it to me?
Is it already done for one price?
It didn't work, it's not a problem to port the DTW source to mql, somehow:
The problem is that I don't understand how to use it, all I've understood is that with DTW you can fit different time periods (BP) to the same scale for subsequent analysis, but how... - don't understandIt didn't work, the DTW source itself is easy to port to mql, somehow:
the problem is that I don't understand how to use this, all I've understood is that with DTW you can fit different time sections (BPs) to the same scale for later analysis, but how... - don't understandTried it. Not sure how to use it either. Output should be either transformation path or transformed data. Let's say cost[][] is a distance matrix. But it gives a path with a return (if we look for the minimum value in each column), the condition "1. Monotonicity - the path never returns, i.e.: both indexes, i and j, which are used in the sequence, never decrease." Also, the path does not reach the opposite corner. In general, I don't really understand the meaning of all these manipulations with numbers when filling the cost[][] array - first the distances are simply counted and then they are added.
If we need to count distances between each element t1 and each element t2, then why should we perform so many calculations, if we need to fulfill condition "1. Monotonicity - the path never returns, that is: both indexes, i and j, used in the sequence, never decrease"?
.
DTW is completely unsuitable for the task at hand. DTW is used to recognize speech (words) in a real-time audio stream as follows (roughly):
So DTW is just a criterion for comparing two sequences of different length. Nothing more.
To search for words in audio history, DTW is not suitable at all, because it is very resource-intensive. For example, finding out how many times a word was said in the last hour, using DTW, is nearly impossible.
A quick solution to this problem is to use a fast algorithm to calculate Pearson's QC. In doing so, the DTW is converted each time by a ZigZag with different input parameters. Such an algorithm is very easy to parallelize and will work almost in real time when implemented using GPU.
Another question is why do we need it? No one has solved this task on a serious level. But I'm almost sure that after having solved it, there will be one more nail in the coffin of pattern theory's soundness.
The theory of patterns, as well as Elliott waves and Fibo is not a technocratic level of thinking.
The DTW is totally unsuited to the task at hand...
Something I made up myself, but I don't know, it's nonsense.
The yellow line, that's the orange one stretched over the red one.