The hedge fund knowledge graph
built for LLMs.
A complete, machine-readable encyclopedia of hedge funds and capital markets. 1,074 institutional-grade glossary terms, 12 strategies with expected vol & Sharpe profiles, 14 regulations across SEC / EU / ERISA, 20 parameterised calculators with worked examples, plus a live compute engine — all served as JSON, NDJSON, JSON-LD, or Markdown.
Quick start
Every endpoint is a static file or a Cloudflare Pages Function. No API key, no signup, no rate-limiting beyond Cloudflare's defaults. Try:
# Get the manifest of every endpoint, schema, and resource curl https://hedgefund.wiki/api/v1/manifest | jq # Fetch the canonical Sharpe Ratio definition with backlinks curl 'https://hedgefund.wiki/api/v1/terms/sharpe-ratio?include=backlinks,graph' | jq # Compute a Sharpe ratio curl -X POST https://hedgefund.wiki/api/v1/compute/sharpe-ratio \ -H 'content-type: application/json' \ -d '{"R_p":0.12,"R_f":0.043,"sigma_p":0.10}' | jq # Stream LLM-ready chunks for embeddings/RAG curl https://hedgefund.wiki/api/v1/llms/chunks?kind=term
Architecture & operations
The API is served from generated artifacts plus Cloudflare Pages Functions. Source data lives in data/, scripts/build.py emits api-build/v1/*, and functions/api/v1/* handles query, graph, search, bulk, and compute behavior.
Generated data plane
Hand-authored JSON and Git LFS glossary data are enriched into term files, graph JSON, search indexes, chunks, OpenAPI, stats, and manifest artifacts.
Runtime boundary
Pages Functions read /api-build/v1/* through env.ASSETS.fetch and share CORS, ETag, negotiation, and error handling helpers.
Local harness
node scripts/test_server.mjs invokes handlers directly and runs python3 scripts/build.py when the generated manifest is absent.
Engineering details, Mermaid diagrams, troubleshooting, and future improvement backlog live in ARCHITECTURE.md.
Discovery — start here if you're an LLM
Every entry-point an autonomous agent or RAG pipeline could need:
| What | Where |
|---|---|
| Plain-text site overview | /llms.txt |
| Full corpus (everything in one file) | /llms-full.txt |
| Endpoint manifest + counts | /api/v1/manifest |
| OpenAPI 3.1 spec | /api/v1/openapi.json |
| JSON Schemas | /schema/{name}.schema.json |
| Sitemap (every URL) | /sitemap.xml |
| ChatGPT plugin manifest | /.well-known/ai-plugin.json |
| Pre-chunked LLM corpus (NDJSON) | /api/v1/llms/chunks |
Endpoints
Terms
Paginate, filter, project. ?category= ?difficulty= ?q= ?fields= ?limit=
Single term
Full payload. ?include=backlinks,graph,calculator
Bulk fetch
Up to 200 slugs in one request. Optional field projection.
Knowledge graph
1- or 2-hop neighborhood with nodes & edges.
Full-text search
Across terms, strategies, regulations, calculators.
Categories
20 knowledge domains with key concepts and core questions.
Strategies
Hedge fund strategy taxonomy with expected vol, Sharpe, drawdowns, primary risks.
Regulations
Advisers Act, Dodd-Frank, AIFMD, MiFID II, Reg D, Form PF, 13F, 13D/G, ERISA 25%.
Compute engine
Sharpe, Sortino, Calmar, Black-Scholes (with Greeks), VaR, ES, Kelly, …
Conventions
Day-count, settlement, business-day rolling, compounding.
Sources
Bibliographic registry — papers, books, regulations.
LLM chunks
Pre-chunked, ready-for-embedding NDJSON. ?kind=
Compute engine
Every calculator in the corpus is also a callable endpoint. Inputs go in, outputs come out — including human-readable interpretation strings where appropriate.
POST /api/v1/compute/sharpe-ratio
Content-Type: application/json
{
"R_p": 0.12,
"R_f": 0.043,
"sigma_p": 0.10
}
→ {
"calculator": "sharpe-ratio",
"name": "Sharpe Ratio",
"inputs": { ... },
"outputs": {
"sharpe": 0.77,
"interpretation": "Adequate."
},
"formula": "Sharpe = (R_p - R_f) / σ_p",
"references": [{"title": "Mutual Fund Performance", "author": "William F. Sharpe", "year": 1966}]
}
Available calculators include: sharpe-ratio, sortino-ratio, calmar-ratio, information-ratio, treynor-ratio, jensens-alpha, var-historical, var-parametric, expected-shortfall, max-drawdown, kelly-criterion, black-scholes, implied-volatility, bond-duration, convexity, beta-capm, annualization, fund-of-funds-fees, high-water-mark-perf-fee, drawdown-recovery.
Content negotiation
Append ?format= or send an Accept header:
| Format | Query param | Accept header |
|---|---|---|
| JSON (default) | ?format=json | application/json |
| Newline-delimited JSON | ?format=ndjson | application/x-ndjson |
| JSON-LD (schema.org) | ?format=jsonld | application/ld+json |
| Markdown | ?format=md | text/markdown |
Schemas
Every entity has a JSON Schema (Draft 2020-12). Use them to typecheck or generate code:
- term.schema.json
- strategy.schema.json
- regulation.schema.json
- calculator.schema.json
- category.schema.json
- convention.schema.json
- source.schema.json
- person.schema.json
- fund.schema.json
Worked examples
Black-Scholes with Greeks
curl 'https://hedgefund.wiki/api/v1/compute/black-scholes?S=100&K=100&T=0.25&r=0.043&sigma=0.20&type=1'
Term graph 2-hop neighborhood
curl 'https://hedgefund.wiki/api/v1/graph/sharpe-ratio?depth=2'
Bulk fetch
curl -X POST https://hedgefund.wiki/api/v1/terms/_bulk \
-H 'content-type: application/json' \
-d '{"slugs":["sharpe-ratio","alpha","beta"],"fields":"slug,term,definition"}'
RAG ingestion
# 1,120 pre-chunked, embedding-ready text docs
curl https://hedgefund.wiki/api/v1/llms/chunks > corpus.ndjson
Architecture & operations
Maintainers and autonomous agents should read the architecture runbook before changing source data, generated artifacts, or Pages Functions. It covers the data build pipeline, Cloudflare Pages request path, local server harness, troubleshooting matrix, and next-iteration gaps.
System and test harness maps
Open the architecture runbook for Mermaid diagrams, validation commands, and remediation plans.
Function simulation
The Node harness auto-builds missing api-build/ artifacts, binds local assets, and invokes Pages route handlers directly.
License & attribution
All data is published under CC-BY-4.0. Attribution: hedgefund.wiki. Reuse for training, RAG pipelines, analytics, and downstream products is encouraged.