Correlation vs macro factor returns
Computes Pearson or Spearman correlation between a stock return series and daily macro factor returns stored in macro_factors (e.g. bitcoin, vix). Stock series may be gross returns or ERM3 residual returns (L1/L2/L3) using the replication identity with SPY and sector/subsector ETFs. Request body accepts a single ticker or an array for batch (results array). Cost: $0.01 per request. Factor strings are normalized to lowercase canonical keys matching macro_factors.factor_key (aliases such as btc → bitcoin). JSON Schema (MCP / validation): request body https://riskmodels.app/schemas/factor-correlation-request-v1.json ; single-ticker 200 body https://riskmodels.app/schemas/factor-correlation-v1.json .
Request
- Base URL: https://riskmodels.app/api
- URL: https://riskmodels.app/api/correlation
- Auth: HTTP bearer
Request body
Example request
{
"ticker": "NVDA"
}Response
Correlations per macro factor (null when insufficient overlap or missing data).
Example response
{
"_metadata": {
"model_version": "ERM3-L3-v30",
"data_as_of": "2026-03-17",
"factor_set_id": "SPY_uni_mc_3000",
"universe_size": 2987,
"wiki_uri": "https://riskmodels.app/docs/methodology/erm3-l3",
"factors": [
"SPY",
"XLK",
"XLF",
"XLV",
"XLE",
"XLI",
"XLY",
"XLP",
"XLU",
"XLB",
"XLRE",
"XLC"
],
"range": [
"2018-01-02",
"2026-04-14"
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.