spb/hfmarketdata
Public
Open high-frequency market data platform — FirstRate full-history downloader, DuckDB/Parquet lake, open REST API and React docs platform (www.hfmarketdata.io)
JavaScript 53.7%
Python 38.3%
CSS 4.6%
TypeScript 3.1%
1# HF Market Data — skills pack23Five Claude Code / Claude skills that turn <https://www.hfmarketdata.io> into a data-analysis workbench.4Each skill is a folder with a `SKILL.md` (when to use it, step-by-step, examples) and small Python scripts5(`requests` + `pandas`, `matplotlib` optional). No other dependency.67| Skill | Use it when you want to… |8|---|---|9| `hfmd-data-analysis` | pull bars for any symbol into pandas and get returns, volatility, drawdowns, seasonality, a chart |10| `hfmd-quick-backtest` | test a moving-average crossover (or any signal) with an honest walk-forward, costs, and a report |11| `hfmd-continuous-futures` | build or compare continuous futures series — roll rules, back-adjustment, vs the vendor series |12| `hfmd-fundamentals-screen` | screen US stocks on ratios, enrich with statements, keep point-in-time discipline |13| `hfmd-term-structure` | draw a futures curve, quantify contango/backwardation and roll yield, compare two dates |1415## Install1617```bash18# download19curl -LO https://www.hfmarketdata.io/downloads/hfmarketdata-skills.zip2021# for every project (personal skills)22unzip -o hfmarketdata-skills.zip -d ~/.claude/skills/2324# or for one project only (shared with the team through git)25unzip -o hfmarketdata-skills.zip -d .claude/skills/2627pip install requests pandas matplotlib # matplotlib only for the charts28export HFMD_API_KEY=hfmd_live_… # optional: free API key = 120 req/min (keyless mode has low hourly limits)29# Everything is free. Higher limits are granted on request by e-mail to contact@spboucher.ai (also free) — see https://www.hfmarketdata.io/limits30```3132Claude Code lists them under `/skills`; you can also just ask — "backtest a 20/100 MA crossover on SPY since 2015" triggers `hfmd-quick-backtest`.3334## Layout3536```37skills/38 _shared/hfmd.py single source of the API helper (copied into each skill by the build)39 hfmd-data-analysis/ SKILL.md · scripts/fetch_bars.py · scripts/analyze.py · scripts/hfmd.py40 hfmd-quick-backtest/ SKILL.md · scripts/ma_crossover.py · scripts/hfmd.py41 hfmd-continuous-futures/ SKILL.md · scripts/continuous_compare.py · scripts/stitch_local.py · scripts/hfmd.py42 hfmd-fundamentals-screen/ SKILL.md · scripts/screen.py · scripts/hfmd.py43 hfmd-term-structure/ SKILL.md · scripts/term_structure.py · scripts/hfmd.py44 scripts/build_skills.py syncs _shared/hfmd.py → each skill, zips → web/public/downloads/hfmarketdata-skills.zip45```4647## Build the zip4849```bash50python3 skills/scripts/build_skills.py # → hfmarketdata/web/public/downloads/hfmarketdata-skills.zip51python3 skills/scripts/build_skills.py --check # fail if a copied hfmd.py drifted from _shared/52```5354The zip is committed so the website can serve it without a build step.5556## Conventions the scripts follow5758- Never invent data: gaps stay `NaN`, and every script prints the row count and the date range it actually received.59- Intraday timestamps are naive US/Eastern (as delivered by the API); daily bars are dates.60- Respect the quota: keyless mode has low hourly limits (30 requests/hour) — scripts paginate by date only when needed and honour `Retry-After` on 429. A free API key lifts this to 120 req/min.61- Fundamentals are point-in-time: use `filed_at` (not `period_end`) to decide what was knowable on a given day.62