OPEN-SOURCE SCRIPT

Correlation Coefficient Table

305
This Pine Script generates a dynamic table for analyzing how multiple assets correlate with a chosen benchmark (e.g., NZ50G). Users can input up to 12 asset symbols, customize the benchmark, and define the beta calculation periods (e.g., 15, 30, 90, 180 days). The script calculates Correlation values for each asset over these periods and computes the average beta for better insights.

The table includes:

Asset symbols: Displayed in the first row.

Correlation values: Calculated for each defined period and displayed in subsequent columns.

Average Correlation: Presented in the final column as an overall measure of correlation strength.

Color coding: Background colors indicate beta magnitude (green for high positive beta, yellow for near-neutral beta, red for negative beta).

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.