Quant
Factor regression (CAPM / FF3 / FF5 / Carhart) API
Run a factor regression on one or more tickers over a window. Fetches and aligns prices + Fama-French factors internally, builds excess returns, and returns alpha, betas, standard errors, t-stats, p-values, R², diagnostics, structured warnings, a pinned methodology string, and a one-line plain-English interpretation. Sells the saved orchestration of doing this correctly, not the regression compute.
Price$0.04per request
MethodPOST
Route/v1/quant/factor-regression
StatusPlanned
MIME typeapplication/json
Rate limit30/minute
Cache86400s public
quantfinanceregressionfactor-modelfama-french
API URL
Integration docshttps://x402.hexl.dev/v1/quant/factor-regressionExample request
{
"tickers": [
"AAPL"
],
"model": "ff3",
"frequency": "monthly",
"start": "2019-01-01"
}Example response
{
"results": [
{
"ticker": "AAPL",
"alpha": {
"value": 0.002,
"stdError": 0.003,
"tStat": 0.67,
"pValue": 0.51
},
"factors": {
"mkt": {
"value": 1.12,
"stdError": 0.08,
"tStat": 14,
"pValue": 0
},
"smb": {
"value": -0.21,
"stdError": 0.11,
"tStat": -1.9,
"pValue": 0.06
},
"hml": {
"value": 0.34,
"stdError": 0.1,
"tStat": 3.4,
"pValue": 0.001
}
},
"rSquared": 0.78,
"adjRSquared": 0.77,
"nObs": 60,
"warnings": [],
"interpretation": "Significant positive market beta (1.12) and value tilt (HML 0.34, p<0.01); alpha indistinguishable from zero."
}
],
"methodology": "Monthly excess returns; Fama-French 3-factor (Ken French library); Newey-West(6) robust SE; 2019-01..2023-12; n=60.",
"methodologyVersion": "ff-2026.1"
}Input schema
{
"type": "object",
"required": [
"tickers"
],
"properties": {
"tickers": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"maxItems": 25,
"examples": [
[
"AAPL"
],
[
"AAPL",
"MSFT",
"NVDA"
]
]
},
"model": {
"type": "string",
"enum": [
"capm",
"ff3",
"ff5",
"carhart"
],
"default": "ff3"
},
"frequency": {
"type": "string",
"enum": [
"daily",
"weekly",
"monthly"
],
"default": "monthly"
},
"start": {
"type": "string",
"description": "YYYY-MM-DD",
"examples": [
"2019-01-01"
]
},
"end": {
"type": "string",
"description": "YYYY-MM-DD (defaults to latest close)"
},
"standardErrors": {
"type": "string",
"enum": [
"classical",
"white",
"newey-west"
],
"default": "newey-west"
}
}
}Output schema
{
"type": "object",
"required": [
"results",
"methodology",
"methodologyVersion"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"ticker",
"alpha",
"factors",
"rSquared",
"nObs"
],
"properties": {
"ticker": {
"type": "string"
},
"alpha": {
"$ref": "#/$defs/estimate"
},
"factors": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/estimate"
},
"description": "Factor name (mkt/smb/hml/rmw/cma/mom) -> estimate."
},
"rSquared": {
"type": "number"
},
"adjRSquared": {
"type": "number"
},
"nObs": {
"type": "number"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"interpretation": {
"type": "string"
}
}
}
},
"methodology": {
"type": "string"
},
"methodologyVersion": {
"type": "string"
}
},
"$defs": {
"estimate": {
"type": "object",
"required": [
"value",
"stdError",
"tStat",
"pValue"
],
"properties": {
"value": {
"type": "number"
},
"stdError": {
"type": "number"
},
"tStat": {
"type": "number"
},
"pValue": {
"type": "number"
}
}
}
}
}