Skip to main content

Module live

Module live 

Source
Expand description

§Live: SD on today’s data, for the runner and the website feed

The backtests read years of saved history. The live tools (sd_live, sd_feed) need the same SD, the same strategies and the same costs, on bars fetched this afternoon. This module fetches them once per day into a cache, computes SD exactly as the backtests do (side from market weather included), and builds the option-pricing inputs.

Nothing here decides anything; it only assembles the inputs.

Structs§

LiveData
LiveSymbol
One symbol, ready for strategies.
OptionsClient
A Yahoo session (cookie + crumb) for the options endpoint.
RealQuote
What the option market actually charged for an at-the-money straddle.

Constants§

IV_INDEX

Functions§

apply_real_iv
Fetch today’s real ATM quotes (one-month and one-week expiries), add them to the log, and make every logged date use the real implied vol instead of the proxy. Returns today’s one-month and one-week quotes.
bars
Fetch (or reuse today’s cached copy of) symbol’s last three years.
cache_dir
Default cache directory: ~/.cache/sd-live.
iv_log_path
~/.local/state/sd-live/iv_log.json: every real quote seen, by symbol.
load
Fetch the universe (or symbols) and compute SD for every bar.

Type Aliases§

IvLog