A Point Forecast Hides the Only Thing That Matters: Risk

"BTC will be up 0.5% tomorrow" is a useless number for an automated trader. It says nothing about how wrong it could be — and position sizing, stop placement and leverage all depend on the shape of what could happen, not the midpoint.

The quant engine's Monte Carlo "tomorrow" block replaces the point forecast with a full distribution. Every hour it runs 1,000 simulated 24-hour paths off the live regime and returns the percentile bands of cumulative return, the probability of a volatility spike, and the probability of a drawdown beyond 5% — the numbers you actually size risk against.

It ships inside /api/v1/quant/market (and per coin), so one call gives you both the regime and its forward risk distribution.

The 'Tomorrow' Block: A Distribution, Not a Number

The tomorrow object summarizes 1,000 paths into the fields a risk engine needs:

FieldMeaning
cum_return_quantiles.p55th-percentile 24h return — your realistic downside case
cum_return_quantiles.p50Median outcome
cum_return_quantiles.p9595th-percentile upside
p_drawdown_gt_5pctProbability of a >5% intraday drawdown over the path
p_visit_vol_spikeProbability the path passes through a volatility-spike regime
n_paths / horizon_hoursSimulation size (1000) and horizon (24)

The gap between p5 and p95 is the engine's implied range for tomorrow — wide in vol_spike, tight in range_low_vol.

What Are the Odds of a Drawdown Tomorrow?

Pull the block straight off the market endpoint:

curl -H "X-API-Key: cdk_live_your_key" \
  "https://cryptodataapi.com/api/v1/quant/market?horizon=24h"
"tomorrow": {
  "n_paths": 1000,
  "horizon_hours": 24,
  "cum_return_quantiles": {
    "p5": -0.0528, "p50": 0.0007, "p95": 0.0518
  },
  "p_visit_vol_spike": 0.20,
  "p_drawdown_gt_5pct": 0.106
}

Read it plainly: the median day is flat (+0.07%), but the 5th percentile is −5.3%, there's a 20% chance of touching a volatility spike, and a ~11% chance of a 5%+ drawdown. That last number is the one a risk manager acts on — an 11% tail is a very different day than a 2% tail, even with the same flat median.

How the Simulation Works

The Monte Carlo isn't a black box — it's driven by the same HMM that scores the regime:

Because it walks real regime dynamics, a squeeze path can break into a trend and a range path can stay pinned — the tails come from the model, not a fixed Gaussian assumption.

Distribution vs Point Forecast

Why the distribution wins for automated trading:

Same median, different p5 = different trade. The distribution makes that visible; a point estimate erases it.

How AI Agents Use the Distribution

Concrete wiring for a risk-aware agent:

import httpx
m = httpx.get("https://cryptodataapi.com/api/v1/quant/market?horizon=24h",
              headers={"X-API-Key": "cdk_live_your_key"}).json()
t = m["tomorrow"]
p5 = t["cum_return_quantiles"]["p5"]

# vol-target sizing: smaller size when the downside band is wide
size = target_risk / abs(p5)

# hard de-risk when the drawdown tail fattens
if t["p_drawdown_gt_5pct"] > 0.20:
    size *= 0.5

Pair it with the regime probabilities for the state and the transition view for what's coming next.