⚠ MVP PreviewReport a Bug

Signals

Correlation

Measure how tightly two symbols move together over time.

What it is

Correlation measures how closely two symbols move together over a rolling window, making it useful for relative-value, hedging, and diversification analysis.

When to use it

  • Checking whether a hedge still behaves like a hedge.
  • Quantifying how tightly sector peers or pairs-trade candidates are linked.
  • Detecting correlation breakdowns before they distort portfolio risk assumptions.

The maths

Corr(A, B, N) = Pearson correlation of close prices of symbol A and symbol B over the last N bars The range is -1 for perfectly inverse through +1 for perfectly correlated.

What it tells you

Values above 0.8 suggest the two instruments move together. Values near 0 mean the instruments are largely uncorrelated, which is useful for diversification, while negative correlation can be valuable for hedging.

REST example

python
import os
import requests

response = requests.get(
  'https://api.financedata.com/v1/signals/Correlation/AAPL',
  params={
      'compare_symbol': 'MSFT',
      'start_date': '2025-01-01',
      'end_date': '2025-04-30',
      'period': 20,
  },
  headers={'X-API-Key': os.environ['FDA_KEY']},
  timeout=30,
)
response.raise_for_status()
print(response.json())

MCP example

Tool call body

{
"name": "run_signals",
"arguments": {
  "symbols": ["AAPL"],
  "signal_names": ["Correlation"],
  "start_date": "2025-01-01",
  "end_date": "2025-04-30",
  "signal_parameters": {
    "Correlation": {
      "symbol": "MSFT",
      "period": 20
    }
  }
}
}

Correlation is currently available through the generic run_signals MCP tool rather than a dedicated single-signal tool, so the comparison symbol and period are passed through signal_parameters.

Agent prompt that triggers it

Measure the 20-day rolling correlation between AAPL and MSFT and summarize whether they are moving together strongly right now.