Technology
Engineering for honest answers.
Python services (FastAPI, SQLAlchemy, LangGraph) behind a Next.js terminal. Everything below links to code in the repository; nothing is described that does not exist.
Point-in-time data pipeline
Every record is stored with the moment it became public, and every read asks “what was known at time t?”.
- SEC facts usable from filing date + 1 day; 8-K events from SEC acceptance time
- FINRA short interest from settlement + 10 days; Treasury from date + 1 day
- Daily bars never include a still-forming session
- OpenBB (Apache-2.0) runs in an isolated venv behind OPENBB_DATA_ENABLED
services/market-data
AI research council
A LangGraph graph of fundamental, technical, quantitative, macro and sentiment analysts feeds a CIO synthesis and a portfolio constructor.
- Default model runs locally (LM Studio, Qwen) — no data leaves the machine
- Optional Claude backend behind daily/monthly budgets and per-minute rate limits
- 60-second per-agent budget; untrusted text passes an injection filter
- Outputs are theses with evidence, never orders
services/intelligence
Research engine
A separate package for asking whether anything works, built to report failure as readily as success.
- Purged, embargoed walk-forward evaluation; final holdout locked and usable once
- Stationary-bootstrap confidence intervals, probabilistic & deflated Sharpe, Holm correction
- Experiment registry that records every trial, including failures
- Risk-overlay and pod-allocation studies with incremental contribution
services/research
Validation & promotion
Strategies move EXPERIMENTAL → BACKTEST_VALIDATED → PAPER_ELIGIBLE → PAPER_ACTIVE only by a named human.
- Reproducible result hash (validation runs twice)
- Costs included and re-run at 2×
- Benchmarked against an equal-weight universe and SPY
- Survivorship-bias flag on every result
services/fund/src/hf_fund/promotion.py
Order management (paper)
One OMS, one state machine, one broker path — Alpaca's paper endpoint.
- Approvals bound to a hash of the exact order payload; 30-minute expiry
- Risk re-checked at the live price immediately before submission
- Exact paper-host allowlist checked before every submit
- SUBMIT_UNKNOWN reconciled by client order ID — never blindly retried
services/execution
Accounting
An append-only ledger (enforced by database triggers) is the financial source of truth.
- Broker activities (dividends, fees, splits) ingested idempotently
- Ledger cash reconciled with broker cash; drift halts trading
- Partial fills applied as deltas from broker truth
packages/py-core/src/hf_core/ledger.py
Observability & audit
A hash-chained audit log records every agent run, proposal, risk decision, approval, submission and fill under a correlation ID.
- Structured JSON logs; secrets never logged
- Execution latency telemetry from the audit log
- Kill switch state in Redis with a durable database record
packages/py-core/src/hf_core/audit.py