Recurrent net for a sequence similarity of floats

Is that possible to classify similarity via rnn?
For instance I pass to the network input two sequences(by batches consisting of one element of every sequence).
And what I’d like is to find out whether there’s a correlation between them or there’s not.
In addition to that:

  • sequences may be shifted w.r.t. each other;
  • similarity in here doesn’t imply exact match; the most important thing is matching of according ups and down.

for example here’s two plots of such similar sequences are the following:

Maybe somebody had similar experience…