RicardoSantos

TimeSeriesRecurrencePlot

Library "TimeSeriesRecurrencePlot"
In descriptive statistics and chaos theory, a recurrence plot (RP) is a plot showing, for each moment i i in time, the times at which the state of a dynamical system returns to the previous state at `i`, i.e., when the phase space trajectory visits roughly the same area in the phase space as at time `j`.
```
A recurrence plot (RP) is a graphical representation used in the analysis of time series data and dynamical systems. It visualizes recurring states or events over time by transforming the original time series into a binary matrix, where each element represents whether two consecutive points are above or below a specified threshold. The resulting Recurrence Plot Matrix reveals patterns, structures, and correlations within the data while providing insights into underlying mechanisms of complex systems.
```
~starling7b
___
Reference:
en.wikipedia.org/wiki/Recurrence_plot
github.com/johannfao.../image/recurrence.py
github.com/bmfreis/r.../cross_recurrence.py
github.com/bmfreis/r...ssRecurrencePlot.cpp
github.com/JuliaDyna...s/distance_matrix.jl
juliadynamics.github...ysis.jl/v2.0/rplots/

distance_matrix(series1, series2, max_freq, norm)
  Generate distance matrix between two series.
  Parameters:
    series1 (float): Source series 1.
    series2 (float): Source series 2.
    max_freq (int): Maximum frequency to inpect or the size of the generated matrix.
    norm (string): Norm of the distance metric, default=`euclidean`, options=`euclidean`, `manhattan`, `max`.
  Returns: Matrix with distance values.

method normalize_distance(M)
  Normalizes a matrix within its Min-Max range.
  Namespace types: matrix<float>
  Parameters:
    M (matrix<float>): Source matrix.
  Returns: Normalized matrix.

method threshold(M, threshold)
  Updates the matrix with the condition `M(i,j) > threshold ? 1 : 0`.
  Namespace types: matrix<float>
  Parameters:
    M (matrix<float>): Source matrix.
    threshold (float)
  Returns: Cross matrix.

rolling_window(a, b, sample_size)
  An experimental alternative method to plot a recurrence_plot.
  Parameters:
    a (array<float>): Array with data.
    b (array<float>): Array with data.
    sample_size (int)
  Returns: Recurrence_plot matrix.
Pineライブラリ

TradingViewの精神に則り、作者はPineコードをオープンソースライブラリとして公開し、コミュニティの他のPineプログラマーが再利用できるようにしました。作者に敬意を表します!このライブラリを個人的に、または他のオープンソースの投稿で使用することができますが、、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

このライブラリを使用したいですか?

以下の行をコピーして、スクリプト内に貼り付けてください。