A macro strip that is actually derived
Render state, confidence, and transition risk at the top of a portfolio view. It is one cached call per day, and it gives every number below it a context the user did not have to assemble.
"Is this a risk-on tape or not?" is the question sitting underneath most financial product decisions, and it is usually answered by vibes. /v1/regime classifies the current environment into one of seven states and shows you the growth, inflation, and stress signals it used to get there.
curl https://stockup.cc/v1/regime \
-H "x-api-key: $STOCKUP_API_KEY" \
-H "content-type: application/json" \
-d '{}'
# Optional: steer the written explanation.
curl https://stockup.cc/v1/regime \
-H "x-api-key: $STOCKUP_API_KEY" \
-H "content-type: application/json" \
-d '{
"question": "What would flip us out of this regime?"
}'| State | The condition it describes |
|---|---|
| Goldilocks | Growth holding up while inflation stays contained — the benign case. |
| Reflation | Growth and inflation both accelerating together. |
| Stagflation | Inflation persisting while growth deteriorates. The regime that punishes a single static allocation hardest. |
| Deflation | Both growth and prices falling. |
| Risk-off | Financial stress dominating the growth and inflation picture. |
| Recovery | Growth inflecting upward off a weak base. |
| Transition | Signals genuinely conflict. This is a real state, not an error code. |
That last row is the design decision worth pausing on. A classifier with six states has to put an ambiguous macro picture somewhere, and it will pick the nearest neighbour with unearned confidence. Making Transition explicit means your product can say "the signals disagree right now" — which is both true more often than people admit and far more useful than a confident wrong label.
A bare regime name is hard to build on. The response is structured so you can render nuance:
state and label — the machine key and the display stringconfidence — how strongly the winning state is favouredprobabilities — the distribution across all seven, so you can show a second-place readsignalDetails — the growth, inflation, and stress components separatelytransitionRisk — how near the current read is to flippingallocation — a reference asset mix associated with the statecoverage — how complete the underlying data wasThe pairing of confidence with transitionRisk is what makes this usable in a UI: high confidence with high transition risk is a very different message from high confidence with low transition risk, and only one of them justifies a decisive tone.
// Goldilocks reference mix
{
"state": "GOLDILOCKS",
"label": "Goldilocks",
"allocation": {
"equity": 0.75,
"bonds": 0.10,
"gold": 0.05,
"cash": 0.10,
"tilt": "growth"
}
}Render state, confidence, and transition risk at the top of a portfolio view. It is one cached call per day, and it gives every number below it a context the user did not have to assemble.
Feed the regime into how you present portfolio risk. A 30% technology position reads differently in Goldilocks than in Stagflation, and your copy can reflect that automatically.
Expose regime as a tool over MCP so an agent classifies the environment before reasoning about a position, rather than recalling a macro narrative from its training data.
signalDetails breaks out growth, inflation, and stress individually, so a surprising classification can be explained rather than merely reported.coverageBreakdown and primarySourceCoverage tell you how much of the read rested on verified primary data. Thin coverage is surfaced, not smoothed over.releaseFingerprint and a quantitativeCoreHash, so you can tell whether two classifications came from the same engine build.decisionId can be fetched from /v1/audit later, which matters when you need to explain a call you surfaced weeks ago.Macro regimes do not change intraday. Once a day is generous for most products, and caching the result is both cheaper and more consistent for your users than re-classifying per page load.
This endpoint classifies the current verified environment. For historical regime behaviour, the backtest endpoint accepts startDate and endDate and runs regime-aware strategy comparison across the window.
No. The allocation field is an illustrative mix associated with a state, not personalized advice, and it accounts for nothing about an individual's horizon, tax position, or risk tolerance. See the risk disclaimer.
Coverage drops and it is reported. The design principle across the API is that a gap is stated rather than filled with a plausible value — the same reason the valuation endpoint returns unavailableInputs instead of a default.
Start with 100,000 free Quan 3.4 L tokens. No card required.
Create a free API key →