OPEN-SOURCE SCRIPT

Two assets correlation tracker

136
Hi, I made this simple script to see how two correlated assets are actually performing short-term. The idea comes from correlation between BTC and ETH that that usually stands 0.9 (Pearson's correlation). However Pearson's correlation doesn't indicate the relative price difference and cannot be used trading correlation when used alone.

My approach is simple - we can select the date/time from which we will start tracking the price change, and instead of tracking the price, we track 100 USD worth of BTC and ETH and how this investment perform. This gives us the price difference relative to a point in the near future, I would suggest using latest trend shift, for example.

On example of how this can be used: If we see that BTC is falling slower than ETH since trend shift, we can long BTC and short ETH in equal parts and expect to gain from the difference while hedging potential loss.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.