TradingView
RicardoSantos
13 juil. 2021 16:38

Test - Gramian Angular Field 

Bitcoin / U.S. dollarBitstamp

Description

Experimental:
The Gramian Angular Field is usually used in machine learning for machine vision, it allows the encoding of data as a visual queue / matrix.

Notes de version

updated contrast following THE_REAL_BCT advise. corrected the missing volume option.
Commentaires
THE_REAL_BCT
Can't wait to see your version of cnn on TV :)
Not familiar with gram, but it looks like the definition of your polars will affect the "vision" of your algo - by defaut, it "sees" up to 2*pi then goes back around. If your src data moves by much more than that, it'll effectively scramble its vision, no?
RicardoSantos
@THE_REAL_BCT, thats why the data is detrended bound to range (1, 0) before getting the polar, but i see what you meant, thanks for feedback.
THE_REAL_BCT
@RicardoSantos, ah you're right (as always?) - I've read too fast. That said you could use more of the 0-pi (or even 2pi since you have both sin & cos) range vs 0-1 perhaps. Gets you just a little extra juice out of that non-linearity... Not sure it matters a ton in the end through a cnn through.
Anyway, beautiful script again. Thanks for sharing!
Yelian
Can you please comment on how one may use this script?
RicardoSantos
@Yelian, can use it to more easily visualize patterns in the data
Yelian
@RicardoSantos, But what do the colors and numbers mean? Positive/negative autocorrelation? Statistically significant at some confidence level? What am I looking at and what does it mean?
RicardoSantos
@Yelian, temporal correlation, the diagonal should mirror the timeseries (orange is negative, blue is positive in retrospect this should have been inverted..)
RicardoSantos
@Yelian, jfin-swufe.springeropen.com/articles/10.1186/s40854-020-00187-0
if you scroll down to fig.9 it will make sense
Yelian
@RicardoSantos, awesome!!! thank you kindly
Yelian
@RicardoSantos, I went thru the paper and I still don't get it. Maybe it's because I'm not a candle stick type of person. But I really like the idea of visualizing +/- correlation to time (always up and to the right or 'the arrow of time' as physicists call it). The article talks about a window size of 10 but your default setting is 5. Is that the same thing? Can you just provide to basic examples as to how one may use this to make trading decisions?
Plus