OPEN-SOURCE SCRIPT
NQ–2Y Correlation

This indicator tracks the relationship between the Nasdaq futures (NQ) and the US 2-Year Treasury yield (US02Y). The two typically move in opposite directions. This tool highlights when that relationship breaks down, and when moves become stretched to extremes. This can be useful for traders to find inflection points in price representing either overbought or oversold extremes.
Key Features
Residual Z-Score: Shows how far NQ’s returns deviate from what would be expected given moves in the 2Y. Useful for spotting stretched conditions (+/- 2σ bands).
Correlation Tracking: Fast and slow correlations between NQ and inverted 2Y returns. Helps identify regime shifts in the relationship.
Same-Direction Signals: Green dots mark when NQ and 2Y both move strongly in the same direction (rare alignment). Red dots mark strong opposing moves.
Alerts: Triggers available for residual stretches, correlation flips, and significant same-direction or opposite moves.
Usage
Monitor Z-Score to identify when the equity–rates linkage is stretched beyond typical bounds. I typically use this on the H1 or H4 timeframe.
Watch for correlation regime shifts to spot changing market dynamics. Typically price falling into support or moving into resistance as there is a false correlation or a flip.
Same-direction dots help flag unusual synchronized moves between risk assets and yields - these are especially useful for identifying false moves.
Key Features
Residual Z-Score: Shows how far NQ’s returns deviate from what would be expected given moves in the 2Y. Useful for spotting stretched conditions (+/- 2σ bands).
Correlation Tracking: Fast and slow correlations between NQ and inverted 2Y returns. Helps identify regime shifts in the relationship.
Same-Direction Signals: Green dots mark when NQ and 2Y both move strongly in the same direction (rare alignment). Red dots mark strong opposing moves.
Alerts: Triggers available for residual stretches, correlation flips, and significant same-direction or opposite moves.
Usage
Monitor Z-Score to identify when the equity–rates linkage is stretched beyond typical bounds. I typically use this on the H1 or H4 timeframe.
Watch for correlation regime shifts to spot changing market dynamics. Typically price falling into support or moving into resistance as there is a false correlation or a flip.
Same-direction dots help flag unusual synchronized moves between risk assets and yields - these are especially useful for identifying false moves.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.