Skip to content

Presidential Effect

Research project investigating market-index performance around U.S. presidential inauguration/term transitions (“does the market behave differently under different administrations?”).

src/presidential_effect/fetch.py (single script, no dvc.yaml):

  1. Loads presidential_terms.json (president name, start/end year) and indices.json (index name → ticker) from data/.
  2. For each presidential term, downloads daily OHLC data for all tracked tickers via yfinance, windowed to Jan 20 – Mar 5 of the term’s start year (inauguration window).
  3. Reshapes columns back to human-readable index names and writes the combined result to historical_index_series.json.

DVC-tracked (data/registry.yml): presidential_terms.json, indices.json, historical_index_series.json — all under data/preprocessed/.

yfinance, pandas, plotly, dynaconf; uses the shared utils.load_settings_module for the analytics workspace root path.

Data-acquisition stage only — no cleaning, analysis, or visualization code yet.