Skip to main content
Stores markets, events, exchanges, and other entities as nodes. Connects them with typed, weighted edges (correlations, hedges, part-of). Records timestamped facts about each entity. All SQLite, no external dependencies.

Quick Start

When using FundManager, the graph is created automatically:

Schema

entities

Markets, events, categories, exchanges, assets, people, organizations. Each has a type, name, JSON properties, and HMAC signature.

relationships

Directed typed edges between entities. Types: correlated_with, caused_by, part_of, hedges, competes_with, related_to, influences, depends_on. Each has a weight and validity window.

facts

Timestamped assertions about entities. Types: observation, signal, outcome, correlation, price_move, settlement, edge_detected, regime_change. Each has a confidence score and optional expiry.

Entities

Seven types: market, event, category, exchange, asset, person, organization.

Relationships

Directed, weighted, temporal. Both endpoints must exist. A unique constraint on (source, target, type, valid_from) prevents duplicates.
Every relationship has valid_from and valid_to. When valid_to is NULL, it is active. Expiring a relationship sets valid_to = now so the historical record is preserved.

Facts

Assertions about entities with confidence (0.0 to 1.0), source tracking, and optional expiry.
Fills use confidence 1.0. Backtest edges scale confidence with trade count. Price moves expire after 24h.

Graph Queries

Aggregated Queries

Maintenance

When running inside FundManager, pruning runs automatically every 200 oversight ticks with a 90-day cutoff.