BelethBELETH
Operating the agent
Markdown

Data sources and fallbacks

Where the VIX comes from (FRED VIXCLS), what happens when a feed is unreachable, how often it is read, and how option prices are pulled for pricing.

Last updated August 31, 2026

image Beleth reads three outside feeds each cycle: the VIX from FRED, underlying prices and history from Alpaca, and the option chain from Alpaca. Each has a defined behaviour when it is missing — none of them is faked.

The VIX regime feed

Alpaca does not provide index data, so the VIX comes from FRED, series VIXCLS — the CBOE VIX daily close, history back to 1990, pulled from the free CSV endpoint with no API key. It is used as a regime read (its own 1-year percentile over the trailing 252 observations), never as a proxy for the implied volatility of the contracts actually traded.

If FRED fails, the fetch falls back to CBOE's own published VIX_History.csv. A proxy index or a volatility ETF is never substituted. An HTTP 401/403 is treated as "needs a key we will not register without a go-ahead" and counts as unavailable.

When the VIX is unavailable

Both sources failing raises VixDataUnavailable, which the cycle catches: it records the error, prints a warning, and continues without the VIX taper — an absent VIX returns a neutral 1.0× multiplier, not a block. The real regime gate is the IV term structure (backwardation), derived from the SPY chain itself. The evidence package stores the VIX as_of date, so a reader can see how fresh the reading was; there is no hard "reject if older than N days" guard — the latest published close is used as-is.

How often it reads

Once per cycle. While the market is open the loop runs a cycle per symbol every ~5 minutes, so every feed is re-read on that cadence. VIXCLS is a daily series, so intraday it does not move — it effectively refreshes once per trading day when FRED posts the new close. Outside market hours the loop only heartbeats; nothing is fetched.

Prices for pricing options

  • Underlying (SPY/QQQ): the latest trade for at-the-money strike selection, and split/dividend-adjusted daily closes for the realized-volatility windows (10/20/30 days, annualized over 252).
  • Entry: one option-chain request per symbol, filtered server-side to the DTE ladder window. Each contract comes back as a snapshot with quote and Greeks/IV; the delta and width filters run locally. The spread's credit is measured from the leg mid quotes — and a mid is an indication, not a fillable price, which is why the order path subtracts a slippage concession.
  • Exit: the latest quote on the exact contracts an open spread holds (they can sit outside any chain window). A missing or unusable quote means "cannot measure, do not act" — the position is held, and only the short-leg in-the-money rule, which needs just the strike and the underlying, still fires.

Data quality, stated plainly

The account is on Alpaca's Basic data plan: the options feed is indicative, not full OPRA, and historical data excludes the most recent 15 minutes. The implied volatility Beleth reasons over is therefore less precise than a professional's. Any P&L should be read with that in mind.