Macro regime detection

Name the macro backdrop in one call.

"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.

  • Empty request body works
  • Probabilities, not just a label
  • 100,000 free Quan 3.4 L tokens
classify-regime.sh
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?"
  }'
The classification itself does not depend on the question you ask.
7 statesIncluding explicit Transition
3 signal familiesGrowth, inflation, stress
Transition riskHow stable the read is
Coverage reportedYou see the data gaps
The state space

Seven regimes, and one of them means "unclear".

StateThe condition it describes
GoldilocksGrowth holding up while inflation stays contained — the benign case.
ReflationGrowth and inflation both accelerating together.
StagflationInflation persisting while growth deteriorates. The regime that punishes a single static allocation hardest.
DeflationBoth growth and prices falling.
Risk-offFinancial stress dominating the growth and inflation picture.
RecoveryGrowth inflecting upward off a weak base.
TransitionSignals 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.

What comes back

The label is the least interesting field.

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 string
  • confidence — how strongly the winning state is favoured
  • probabilities — the distribution across all seven, so you can show a second-place read
  • signalDetails — the growth, inflation, and stress components separately
  • transitionRisk — how near the current read is to flipping
  • allocation — a reference asset mix associated with the state
  • coverage — how complete the underlying data was

The 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.

reference allocation
// Goldilocks reference mix
{
  "state": "GOLDILOCKS",
  "label": "Goldilocks",
  "allocation": {
    "equity": 0.75,
    "bonds":  0.10,
    "gold":   0.05,
    "cash":   0.10,
    "tilt":   "growth"
  }
}
A reference mix for illustration — not a recommendation, and not tuned to any user.
What to build with it

Three patterns that work.

Dashboard header

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.

Risk modifier

Read exposure against the backdrop

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.

Agent tool

Ground the model before it answers

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.

Provenance

Signals you can trace.

Component signals are exposed. signalDetails breaks out growth, inflation, and stress individually, so a surprising classification can be explained rather than merely reported.
Coverage is stated. coverageBreakdown and primarySourceCoverage tell you how much of the read rested on verified primary data. Thin coverage is surfaced, not smoothed over.
Runs are versioned. Each response carries a releaseFingerprint and a quantitativeCoreHash, so you can tell whether two classifications came from the same engine build.
Runs are replayable. The returned decisionId can be fetched from /v1/audit later, which matters when you need to explain a call you surfaced weeks ago.
Regime FAQ

Practical questions.

How often should I call this?

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.

Can I get a historical regime for a past date?

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.

Should I trade the reference allocation?

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.

What if macro data is incomplete?

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.

Stop guessing the backdrop

Give every number in your product a macro context.

Start with 100,000 free Quan 3.4 L tokens. No card required.

Create a free API key →