Browse the library

Indicators · Statistics

Correlation coefficient (CORREL): how two series move together

What Pearson correlation measures, a hand calculation on Treasury bond ETF prices, market correlation versus Finabase’s 5-bar CORREL study, and their pitfalls.

On this page
  1. What correlation measures
  2. The formula
  3. CORREL (5) on a real chart: TLT 2025–2026
  4. How to use correlation
  5. Pitfalls and limitations
  6. Comparison table
  7. How Finabase calculates and scores CORREL
  8. Frequently asked questions
  9. Summary

The correlation coefficient measures how consistently two series move together, on a scale from −1 to +1. At +1 they move in perfect lockstep; at −1, in perfect opposition; at 0, with no linear relationship. In investing it is the number behind diversification: assets whose returns are weakly or negatively correlated smooth out a portfolio's swings, an insight Harry Markowitz formalized in 1952.

Finabase's chart offers a study called CORREL. Like its BETA study, it applies the textbook formula to two series from the same bar, the highs and the lows, over five bars. That makes it a very different number from the correlation between a stock and the market. This guide explains Pearson correlation, calculates Finabase's CORREL by hand on the iShares 20+ Year Treasury Bond ETF, contrasts it with TLT's actual correlation to the stock market, and shows what each is useful for.

What correlation measures

Imagine two series side by side. For each period, note whether each was above or below its own average, and by how much. If they are usually on the same side, by proportional amounts, the correlation is high. If one is above average when the other is below, it is negative. If there is no pattern, it is near zero.

Two cautions matter in markets:

  • Returns, not prices. Two unrelated stocks that both rose all year have highly correlated prices, because both lines slope upward. Their daily returns may be uncorrelated. Portfolio correlation should be measured on returns.
  • Linear only. Correlation captures straight-line relationships. Two series can be strongly related in a nonlinear way and still show a correlation near zero.

The formula

Market correlation: TLT against SPY

Using Finabase's daily closes over the 250 trading days to October 29, 2026, the correlation between the daily returns of TLT, a fund of long-term US Treasury bonds, and SPY, the S&P 500 ETF, was about 0.27. The regression slope (beta) was about 0.21. On many days in that year, bonds and stocks moved in the same direction, both reacting to interest-rate expectations. That is a weaker hedge than the negative stock–bond correlation many investors assume, and a reminder that correlations change over time.

Finabase's CORREL (5): a worked example on TLT

Here are TLT's highs and lows for the five sessions ending October 29, 2026, with their deviations from the five-day means ($81.810 for highs, $81.236 for lows).

Date High (x) Low (y) x − mean x y − mean y Product
Oct 23, 2026 $81.80 $81.27 −0.010 +0.034 −0.0003
Oct 26, 2026 $81.90 $81.54 +0.090 +0.304 +0.0274
Oct 27, 2026 $81.73 $81.47 −0.080 +0.234 −0.0187
Oct 28, 2026 $81.76 $80.73 −0.050 −0.506 +0.0253
Oct 29, 2026 $81.86 $81.17 +0.050 −0.066 −0.0033
Step Calculation Result
Σ products 0.0303
Σ (x − mean)² 0.0196
Σ (y − mean)² 0.4087
r 0.0303 ÷ √(0.0196 × 0.4087) 0.339

Finabase's chart shows 0.339. Over those five days TLT's highs were almost flat, within 17 cents, while its lows moved around by more than 80 cents. With so little movement in one series, the two had little consistent relationship, and the correlation fell.

CORREL (5) on a real chart: TLT 2025–2026

iShares 20+ Year Treasury Bond ETF (TLT) daily with CORREL (5) of highs and lows · 2025-10-30 to 2026-10-29 $80 $85 $90 Low $76.43 · Oct 7 Price 0 0.5 1 −0.26 · Nov 20, 2025 −0.03 · Oct 28 CORREL (5) Nov Dec Jan 2026 Feb Mar Apr May Jun Jul Aug Sep Oct
iShares 20+ Year Treasury Bond ETF (TLT), one year of daily bars with CORREL (5) as computed by Finabase: the correlation of the last five highs with the last five lows.

TLT drifted from $90.56 to $81.49 over the year, about 10% lower, with a low of $76.43 on October 7, 2026. Its CORREL (5) was:

  • Above 0.9 on 163 of 251 sessions; the median was 0.944.
  • Below 0.5 on only 5 sessions and below zero on 2: −0.26 on November 20, 2025 and −0.03 on October 28, 2026.

Because highs and lows are price levels of the same bar, they nearly always rise and fall together. Whenever TLT drifted in one direction for a few days, the five highs and five lows trended together and the correlation was close to 1. It fell only when the highs went flat. On November 20, 2025, for instance, TLT's highs over five days stayed between $89.30 and $89.84 while the lows barely moved, a quiet, directionless week.

So a low CORREL (5) on Finabase is effectively a flag for a flat, range-bound week, not a sign that two assets have stopped moving together.

How to use correlation

Diversification. Combine assets whose returns are weakly or negatively correlated, so that their swings partly offset. Measure correlation on returns over a meaningful window, and check it over several periods, because it shifts.

Pairs and hedges. A hedge is only as good as its correlation with what it protects. TLT's 0.27 correlation with SPY in this period meant it often did not offset stock losses.

Finabase's CORREL (5) as a range monitor. A sustained reading near 1 says the bars are trending; a drop toward zero says the highs or lows have stalled. It is a narrow, descriptive tool.

Pitfalls and limitations

Prices versus returns. Correlating price levels produces spuriously high numbers for any two trending series. This is the biggest trap in correlation analysis, and it applies to Finabase's CORREL study by construction.

Small samples. Five points give a very unstable correlation. Market correlations are usually estimated over months or years.

Correlations change. Stock–bond correlation, for example, has been negative in some decades and positive in others. A single estimate is a snapshot.

Comparison table

Measure Compares Window Range Answers
Return correlation Two assets' returns Months–years −1 to +1 Do they move together?
Market beta Asset returns vs index returns Months–years Unbounded How much does it move with the index?
Finabase CORREL (5) One symbol's highs vs lows 5 bars −1 to +1 Are the bars trending together?
Finabase BETA (5) % change in lows vs highs 5 bars Unbounded How is the range shifting?

See Beta: market beta explained, and what Finabase’s BETA study shows for the regression slope and Time Series Forecast (TSF): linear regression projected one bar for another regression-based study.

How Finabase calculates and scores CORREL

Finabase computes the CORREL study with TA-Lib's CORREL function, passing the bar's highs as the first series and its lows as the second, a mapping inherited from the original Stock Master app. The default period is 5, and the line is drawn in its own panel.

CORREL (5) appears in the technical gauge on the symbol page with its latest value and carries no Buy or Sell rule, so it always counts as neutral. To see how a stock moves against a benchmark, use the comparison tab.

Frequently asked questions

What is a good correlation for diversification?

Lower is better: correlations near zero or negative between holdings' returns reduce portfolio volatility most. Correlations above about 0.8 add little diversification.

Why is Finabase's CORREL almost always near 1?

Because it correlates a symbol's highs with its lows, which are price levels from the same bars and usually move together. It drops only when one of them stalls over the five bars.

Should I correlate prices or returns?

Returns. Price levels of trending assets are correlated almost by default; returns show whether the assets actually move together from day to day.

Summary

The correlation coefficient measures how consistently two series move together, from −1 to +1. Measured on returns over a long window, it is the foundation of diversification: TLT's returns had a modest 0.27 correlation with SPY's in the year to October 2026. Finabase's CORREL study instead correlates a symbol's highs and lows over five bars, which mostly reads near 1 and drops only in flat weeks. Use return correlation for portfolio decisions, and treat the chart study as a narrow range monitor.

Sources and further reading

  1. Harry Markowitz, “Portfolio Selection,” Journal of Finance, vol. 7, no. 1 (1952) — correlation and diversification
  2. TA-Lib — CORREL function reference
  3. Finabase chart data — TLT and SPY daily bars, 2025-10-30 to 2026-10-29, CORREL computed by Finabase