Developer Documentation · v2026.05.03

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.

CC-BY-4.0 OpenAPI 3.1 JSON Schema Schema.org JSON-LD RFC 7807 errors ETag / 304 CORS * No auth required
1,074terms
15,477graph edges
20calculators
12strategies
14regulations
1,120LLM chunks

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.

Source → Build

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.

Functions → Assets

Runtime boundary

Pages Functions read /api-build/v1/* through env.ASSETS.fetch and share CORS, ETag, negotiation, and error handling helpers.

Tests → Auto-build

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:

WhatWhere
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

GET /api/v1/terms

Terms

Paginate, filter, project. ?category= ?difficulty= ?q= ?fields= ?limit=

GET /api/v1/terms/{slug}

Single term

Full payload. ?include=backlinks,graph,calculator

POST /api/v1/terms/_bulk

Bulk fetch

Up to 200 slugs in one request. Optional field projection.

GET /api/v1/graph/{slug}

Knowledge graph

1- or 2-hop neighborhood with nodes & edges.

GET /api/v1/search

Full-text search

Across terms, strategies, regulations, calculators.

GET /api/v1/categories

Categories

20 knowledge domains with key concepts and core questions.

GET /api/v1/strategies/{slug}

Strategies

Hedge fund strategy taxonomy with expected vol, Sharpe, drawdowns, primary risks.

GET /api/v1/regulations/{slug}

Regulations

Advisers Act, Dodd-Frank, AIFMD, MiFID II, Reg D, Form PF, 13F, 13D/G, ERISA 25%.

POST /api/v1/compute/{slug}

Compute engine

Sharpe, Sortino, Calmar, Black-Scholes (with Greeks), VaR, ES, Kelly, …

GET /api/v1/conventions/{slug}

Conventions

Day-count, settlement, business-day rolling, compounding.

GET /api/v1/sources/{id}

Sources

Bibliographic registry — papers, books, regulations.

GET /api/v1/llms/chunks

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:

FormatQuery paramAccept header
JSON (default)?format=jsonapplication/json
Newline-delimited JSON?format=ndjsonapplication/x-ndjson
JSON-LD (schema.org)?format=jsonldapplication/ld+json
Markdown?format=mdtext/markdown

Schemas

Every entity has a JSON Schema (Draft 2020-12). Use them to typecheck or generate code:

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.

docs/ARCHITECTURE.md

System and test harness maps

Open the architecture runbook for Mermaid diagrams, validation commands, and remediation plans.

scripts/test_server.mjs

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.