Skip to content

utkarshkishore/TariffPulse

Repository files navigation

TariffPulse

TariffPulse is a hackathon-grade live trade war impact tracker for Zerve: a Bloomberg-style command center that answers which US sectors are getting crushed by tariffs right now, which are quietly winning, and how today's sector tape compares with the 2018 tariff shock.

Setup

npm install
python3 -m venv .venv
.venv/bin/pip install -r python/requirements.txt
npm run dev

Create .env.local before running:

FRED_API_KEY=your_fred_key_here
PYTHON_SERVICE_URL=http://localhost:8000

npm run dev starts both Next.js and the FastAPI yfinance service on port 8000.

Public API

GET /api/sectors/live

Returns live sector ETF prices, day/week/month changes, tariff exposure scores, trust scores, badges, and insight text. Results are cached in SQLite for 60 seconds.

GET /api/sectors/comparison

Returns normalized 2018 tariff-period history and current-period history for all 11 sector ETFs, aligned to day zero with per-sector correlation, trend, prediction, and insight.

GET /api/tariff-pulse

Returns the current top three winners and top three casualties with one-line tariff impact commentary.

Supporting API

  • POST /api/fred/ingest stores 36 months of FRED macro observations in SQLite.
  • GET /api/fred/macro returns latest macro indicators, YoY changes, history, and tariff regime.
  • GET /api/health checks Next.js and Python service health.

Data Sources

TariffPulse uses Yahoo Finance market data through yfinance for sector ETFs and macro market proxies. Macro indicators come from the Federal Reserve Economic Data (FRED) API and are cached locally in data/tariffpulse.sqlite.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors