{"id":50487913,"url":"https://github.com/spfunctions/hedge-fund-cookbook","last_synced_at":"2026-06-02T00:03:19.283Z","repository":{"id":356749123,"uuid":"1233860120","full_name":"spfunctions/hedge-fund-cookbook","owner":"spfunctions","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-09T14:12:14.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-09T16:21:31.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spfunctions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-09T12:57:15.000Z","updated_at":"2026-05-09T14:12:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/spfunctions/hedge-fund-cookbook","commit_stats":null,"previous_names":["spfunctions/hedge-fund-cookbook"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/spfunctions/hedge-fund-cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fhedge-fund-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fhedge-fund-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fhedge-fund-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fhedge-fund-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spfunctions","download_url":"https://codeload.github.com/spfunctions/hedge-fund-cookbook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fhedge-fund-cookbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33798943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T00:03:17.729Z","updated_at":"2026-06-02T00:03:19.278Z","avatar_url":"https://github.com/spfunctions.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleFunctions Institutional Research Cookbook\n\nSelf-hostable TypeScript examples for building market-intelligence applications with `@spfunctions/sdk` and `@spfunctions/agent`.\n\nThis repo is intentionally written for institutional research, risk, and policy workflows: morning risk packs, catalyst books, election/policy desks, portfolio sentinels, and auditable thesis replay. It is not a trading bot repo. It does not place orders, does not expose browser API keys, and does not require SimpleFunctions-hosted runtime state. Run the examples from your own server, job runner, notebook host, agent harness, or internal dashboard with a SimpleFunctions API key.\n\n## Install\n\n```bash\nnpm install\ncp .env.example .env.local\nexport SF_API_KEY=\"sf_live_...\"\n```\n\nThe published alpha packages are pinned in `package.json`:\n\n```bash\nnpm install @spfunctions/sdk@0.1.0-alpha.0 @spfunctions/agent@0.1.0-alpha.0\n```\n\nSome examples use `src/lib/intelligence.ts` for newly promoted intelligence endpoints until the next SDK alpha ships `sf.intelligence.*` publicly. The helper is intentionally small: authenticated `fetch`, no state, no browser keys.\n\n## Cookbooks\n\n| Script | Use case | Primary SimpleFunctions surfaces |\n| --- | --- | --- |\n| `npm run macro` | Global macro regime pack for a PM/risk meeting | `world.read`, `index.current`, `index.history`, `regime.scan`, `yieldcurves.list`, `calendar.list` |\n| `npm run event-risk` | Event-risk book for rates, energy, geopolitics, and policy catalysts | `markets.screen`, `regime.scan`, `calendar.list`, `contagion.scan`, `market.inspect` |\n| `npm run election-desk` | Policy/election desk briefing with catalyst, market, and research context | `calendar.list`, `markets.search`, `markets.screen`, `gov.query` |\n| `npm run portfolio-risk` | Portfolio and watchlist sentinel with internal handoff payloads | `portfolio.*`, `watchlists.list`, `alerts.list`, `world.read` |\n| `npm run thesis-replay` | Auditable thesis monitor with local trace/replay | `theses.*`, `SimpleFunctionsAgent`, `FileTraceStore` |\n\nEach script returns structured JSON intended for downstream systems: a human briefing, a queue, a risk memo, a Slack/PagerDuty payload, or an internal web app response. The examples keep the domain decisions explicit so your own compliance, risk, and execution systems can own the final action.\n\n## Smoke\n\n```bash\nnpm run typecheck\nnpm run smoke\n```\n\nWithout `SF_API_KEY`, `npm run smoke` verifies package imports and exits cleanly after the no-key checks. With a key, it runs a small production-backed `world.read` call.\n\n## Serve On Your Own Infra\n\n```bash\nnpm run server\ncurl http://localhost:8787/health\ncurl http://localhost:8787/cookbooks/macro\ncurl http://localhost:8787/cookbooks/event-risk\n```\n\nThe server is intentionally minimal and uses Node's built-in HTTP server. In production, put the same cookbook functions behind your own auth, queue, scheduler, or internal dashboard.\n\n## Boundaries\n\n- No live trading.\n- No browser long-lived API key usage.\n- No venue order placement.\n- No dependency on the `sf` CLI.\n- Agent SDK calls use canonical strict tools from `/api/contracts/tools`, not broad `/api/tools` aliases.\n- Outputs are research signals. They are not investment advice or execution instructions.\n- Use your own approvals, suitability checks, compliance retention, market-data licenses, and production observability before making any downstream decision.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspfunctions%2Fhedge-fund-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspfunctions%2Fhedge-fund-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspfunctions%2Fhedge-fund-cookbook/lists"}