Labs (Econometric Tools)

Empirical notebook export, stationarity tests, diagnostics, and other lab utilities.

Labs

Labs combine guided workflows, exportable audit artifacts, and a small set of server-side econometric utilities. Some routes are public API surfaces. Workbench routes, including the empirical notebook sandbox, require a signed-in web session.

Empirical notebook sandbox

The empirical sandbox turns a staged empirical session into notebook-style cells. The export bundle includes:

  • notebook.ipynb
  • run.py
  • manifest.json
  • runtime-policy.json
  • requirements.txt
  • session.json

Hosted execution is gated. The server route checks auth, rate limits, request shape, package imports, and the supported execution policy before running code. If hosted execution is unavailable, the route returns an unavailable status.

Stationarity testing

Test whether a time series is stationary:

  • ADF (Augmented Dickey-Fuller) tests the null of a unit root.
  • KPSS tests the null of stationarity.
curl -X POST https://macrobymark.com/api/labs/stationarity \
  -H "Content-Type: application/json" \
  -d '{
    "seriesId": "headline-cpi",
    "tests": ["adf", "kpss"],
    "deterministic": "constant"
  }'

Series diagnostics

Run diagnostic checks on a provider-backed indicator series. The route can compute ACF, PACF, Ljung-Box, Jarque-Bera, and ARCH-LM outputs after the supported transform set.

curl -X POST https://macrobymark.com/api/labs/diagnostics \
  -H "Content-Type: application/json" \
  -d '{
    "seriesId": "headline-cpi",
    "tests": ["acf", "pacf", "ljungbox"],
    "transformations": ["log", "first-diff"]
  }'