ledger-models 0.2.2

A comprehensive model library for financial products (securities, prices, transactions, etc). Protobuf used for serialization, with language-specific implementations
Documentation
{
  "schema_version": "1.0",
  "_doc": "Single source of truth for the FinTekkers product hierarchy. See ../docs/product-hierarchy.md for narrative description, hierarchy-examples.md for worked examples, and registry-versioning.md for compatibility rules. Each leaf product_type carries (asset_class, instrument_type). Abstract nodes carry only hierarchy. status=active entries must have a matching ProductTypeProto enum value (CI-enforced). status=planned entries are aspirational and not yet wired into the proto enum. NOTE: M1 ships a 3-dimensional registry (productType + asset_class + instrument_type). The 4th dimension (index_type — single_name vs index) is intentionally deferred and will be added in a future milestone. Option strategy leaves (butterfly, vertical spread, calendar spread, condor, straddle, ...) are also intentionally absent — strategies are derived from the legs field on SecurityProto, not from a productType enum value.",

  "product_types": {
    "BOND": { "parent": null, "abstract": true, "label": "Bond" },

    "GOV_BOND": { "parent": "BOND", "abstract": true, "label": "Government Bond" },
    "TBILL":          { "parent": "GOV_BOND", "asset_class": "RATES", "instrument_type": "CASH", "label": "Treasury Bill",                  "status": "active" },
    "TREASURY_NOTE":  { "parent": "GOV_BOND", "asset_class": "RATES", "instrument_type": "CASH", "label": "Treasury Note",                  "status": "active" },
    "TREASURY_BOND":  { "parent": "GOV_BOND", "asset_class": "RATES", "instrument_type": "CASH", "label": "Treasury Bond",                  "status": "active" },
    "TIPS":           { "parent": "GOV_BOND", "asset_class": "RATES", "instrument_type": "CASH", "label": "TIPS",                           "status": "active" },
    "TREASURY_FRN":   { "parent": "GOV_BOND", "asset_class": "RATES", "instrument_type": "CASH", "label": "Treasury Floating Rate Note",    "status": "active" },
    "STRIPS":         { "parent": "GOV_BOND", "asset_class": "RATES", "instrument_type": "CASH", "label": "Treasury STRIPS",                "status": "active" },
    "SOVEREIGN_BOND": { "parent": "GOV_BOND", "asset_class": "RATES", "instrument_type": "CASH", "label": "Sovereign Bond (non-US)",        "status": "active" },

    "CREDIT_BOND":      { "parent": "BOND", "abstract": true, "label": "Credit Bond" },
    "CORP_BOND":        { "parent": "CREDIT_BOND", "asset_class": "CREDIT", "instrument_type": "CASH", "label": "Corporate Bond",     "status": "active" },
    "MUNI_BOND":        { "parent": "CREDIT_BOND", "asset_class": "CREDIT", "instrument_type": "CASH", "label": "Municipal Bond",     "status": "active" },
    "CONVERTIBLE_BOND": { "parent": "CREDIT_BOND", "asset_class": "CREDIT", "instrument_type": "CASH", "label": "Convertible Bond",   "status": "planned" },
    "COCO":             { "parent": "CREDIT_BOND", "asset_class": "CREDIT", "instrument_type": "CASH", "label": "Contingent Convertible Bond (CoCo)", "status": "planned" },

    "STRUCTURED_BOND":  { "parent": "BOND", "abstract": true, "status": "planned", "label": "Structured Bond" },
    "MBS_PASSTHROUGH":  { "parent": "STRUCTURED_BOND", "asset_class": "CREDIT", "instrument_type": "CASH", "label": "MBS Pass-Through",           "status": "planned" },
    "CMBS":             { "parent": "STRUCTURED_BOND", "asset_class": "CREDIT", "instrument_type": "CASH", "label": "Commercial MBS",             "status": "planned" },
    "ABS":              { "parent": "STRUCTURED_BOND", "asset_class": "CREDIT", "instrument_type": "CASH", "label": "Asset-Backed Security",      "status": "planned" },
    "CLO":              { "parent": "STRUCTURED_BOND", "asset_class": "CREDIT", "instrument_type": "CASH", "label": "Collateralized Loan Obligation", "status": "planned" },

    "STOCK": { "parent": null, "abstract": true, "label": "Stock" },
    "COMMON_STOCK":    { "parent": "STOCK", "asset_class": "EQUITY", "instrument_type": "CASH", "label": "Common Stock",               "status": "active" },
    "PREFERRED_STOCK": { "parent": "STOCK", "asset_class": "EQUITY", "instrument_type": "CASH", "label": "Preferred Stock",            "status": "active" },
    "ADR":             { "parent": "STOCK", "asset_class": "EQUITY", "instrument_type": "CASH", "label": "American Depositary Receipt","status": "active" },
    "ETF":             { "parent": "STOCK", "asset_class": "EQUITY", "instrument_type": "CASH", "label": "Exchange-Traded Fund",       "status": "active" },

    "INDEX": { "parent": null, "abstract": true, "label": "Index" },
    "EQUITY_INDEX":    { "parent": "INDEX", "asset_class": "EQUITY",     "instrument_type": "REFERENCE_INDEX", "label": "Equity Index",     "status": "active" },
    "BOND_INDEX":      { "parent": "INDEX", "asset_class": "RATES",      "instrument_type": "REFERENCE_INDEX", "label": "Bond Index",       "status": "active" },
    "COMMODITY_INDEX": { "parent": "INDEX", "asset_class": "COMMODITY",  "instrument_type": "REFERENCE_INDEX", "label": "Commodity Index",  "status": "active" },
    "VIX_SPOT":        { "parent": "INDEX", "asset_class": "VOLATILITY", "instrument_type": "REFERENCE_INDEX", "label": "VIX (volatility)", "status": "active" },
    "CPI_SERIES":      { "parent": "INDEX", "asset_class": "RATES",      "instrument_type": "REFERENCE_INDEX", "label": "CPI Series",       "status": "active" },
    "SOFR_SERIES":     { "parent": "INDEX", "asset_class": "RATES",      "instrument_type": "REFERENCE_INDEX", "label": "SOFR Series",      "status": "active" },

    "CASH_INSTRUMENT": { "parent": null, "abstract": true, "label": "Cash Instrument" },
    "CURRENCY":          { "parent": "CASH_INSTRUMENT", "asset_class": "CASH", "instrument_type": "CASH", "label": "Currency",          "status": "active" },
    "FX_SPOT":           { "parent": "CASH_INSTRUMENT", "asset_class": "FX",   "instrument_type": "CASH", "label": "FX Spot",           "status": "active" },
    "MONEY_MARKET_FUND": { "parent": "CASH_INSTRUMENT", "asset_class": "CASH", "instrument_type": "CASH", "label": "Money Market Fund", "status": "active" },

    "CRYPTO": { "parent": null, "abstract": true, "label": "Crypto" },
    "CRYPTOCURRENCY": { "parent": "CRYPTO", "asset_class": "CRYPTO", "instrument_type": "CASH", "label": "Cryptocurrency", "status": "active" },
    "STABLECOIN":     { "parent": "CRYPTO", "asset_class": "CRYPTO", "instrument_type": "CASH", "label": "Stablecoin",     "status": "active" },

    "COMMODITY_SPOT": { "parent": null, "abstract": true, "label": "Commodity Spot" },
    "PRECIOUS_METAL": { "parent": "COMMODITY_SPOT", "abstract": true, "label": "Precious Metal" },
    "BASE_METAL":     { "parent": "COMMODITY_SPOT", "abstract": true, "label": "Base Metal" },
    "GOLD":      { "parent": "PRECIOUS_METAL", "asset_class": "METALS", "instrument_type": "CASH", "label": "Gold",      "status": "active" },
    "SILVER":    { "parent": "PRECIOUS_METAL", "asset_class": "METALS", "instrument_type": "CASH", "label": "Silver",    "status": "active" },
    "PLATINUM":  { "parent": "PRECIOUS_METAL", "asset_class": "METALS", "instrument_type": "CASH", "label": "Platinum",  "status": "planned" },
    "PALLADIUM": { "parent": "PRECIOUS_METAL", "asset_class": "METALS", "instrument_type": "CASH", "label": "Palladium", "status": "planned" },
    "COPPER":    { "parent": "BASE_METAL",     "asset_class": "METALS", "instrument_type": "CASH", "label": "Copper",    "status": "planned" },
    "ALUMINUM":  { "parent": "BASE_METAL",     "asset_class": "METALS", "instrument_type": "CASH", "label": "Aluminum",  "status": "planned" },
    "ZINC":      { "parent": "BASE_METAL",     "asset_class": "METALS", "instrument_type": "CASH", "label": "Zinc",      "status": "planned" },

    "FUTURE": { "parent": null, "abstract": true, "label": "Future" },
    "EQUITY_INDEX_FUTURE":  { "parent": "FUTURE", "asset_class": "EQUITY",     "instrument_type": "DERIVATIVE", "label": "Equity Index Future",  "status": "planned" },
    "BOND_FUTURE":          { "parent": "FUTURE", "asset_class": "RATES",      "instrument_type": "DERIVATIVE", "label": "Bond Future",          "status": "planned" },
    "INTEREST_RATE_FUTURE": { "parent": "FUTURE", "asset_class": "RATES",      "instrument_type": "DERIVATIVE", "label": "Interest Rate Future", "status": "planned" },
    "VIX_FUTURE":           { "parent": "FUTURE", "asset_class": "VOLATILITY", "instrument_type": "DERIVATIVE", "label": "VIX Future",           "status": "planned" },
    "COMMODITY_FUTURE":     { "parent": "FUTURE", "abstract": true, "label": "Commodity Future" },
    "GOLD_FUTURE":          { "parent": "COMMODITY_FUTURE", "asset_class": "METALS",       "instrument_type": "DERIVATIVE", "label": "Gold Future",         "status": "planned" },
    "BASE_METAL_FUTURE":    { "parent": "COMMODITY_FUTURE", "asset_class": "METALS",       "instrument_type": "DERIVATIVE", "label": "Base Metal Future",   "status": "planned" },
    "ENERGY_FUTURE":        { "parent": "COMMODITY_FUTURE", "asset_class": "ENERGY",       "instrument_type": "DERIVATIVE", "label": "Energy Future",       "status": "planned" },
    "AGRICULTURAL_FUTURE":  { "parent": "COMMODITY_FUTURE", "asset_class": "AGRICULTURAL", "instrument_type": "DERIVATIVE", "label": "Agricultural Future", "status": "planned" },

    "OPTION": { "parent": null, "abstract": true, "label": "Option" },
    "EQUITY_OPTION":     { "parent": "OPTION", "abstract": true, "label": "Equity Option" },
    "EQUITY_VANILLA":    { "parent": "EQUITY_OPTION",    "asset_class": "EQUITY", "instrument_type": "DERIVATIVE", "label": "Equity Option (vanilla)",    "status": "planned" },
    "FX_OPTION":         { "parent": "OPTION", "abstract": true, "label": "FX Option" },
    "FX_VANILLA":        { "parent": "FX_OPTION",        "asset_class": "FX",     "instrument_type": "DERIVATIVE", "label": "FX Vanilla Option",          "status": "planned" },
    "COMMODITY_OPTION":  { "parent": "OPTION", "abstract": true, "label": "Commodity Option" },
    "COMMODITY_VANILLA": { "parent": "COMMODITY_OPTION", "asset_class": "METALS", "instrument_type": "DERIVATIVE", "label": "Commodity Vanilla Option",   "status": "planned" },
    "BOND_OPTION":       { "parent": "OPTION", "abstract": true, "label": "Bond Option" },
    "BOND_VANILLA":      { "parent": "BOND_OPTION",      "asset_class": "RATES",  "instrument_type": "DERIVATIVE", "label": "Bond Vanilla Option",        "status": "planned" },
    "RATES_OPTION":      { "parent": "OPTION", "abstract": true, "label": "Rates Option" },
    "SWAPTION":          { "parent": "RATES_OPTION", "abstract": true, "label": "Swaption" },
    "SWAPTION_VANILLA":  { "parent": "SWAPTION",         "asset_class": "RATES",  "instrument_type": "DERIVATIVE", "label": "Swaption (vanilla)",         "status": "planned" },
    "INTEREST_RATE_CAP":   { "parent": "RATES_OPTION",   "asset_class": "RATES",  "instrument_type": "DERIVATIVE", "label": "Interest Rate Cap",          "status": "planned" },
    "INTEREST_RATE_FLOOR": { "parent": "RATES_OPTION",   "asset_class": "RATES",  "instrument_type": "DERIVATIVE", "label": "Interest Rate Floor",        "status": "planned" },

    "SWAP": { "parent": null, "abstract": true, "label": "Swap" },
    "RATES_SWAP":      { "parent": "SWAP", "abstract": true, "label": "Rates Swap" },
    "IRS":             { "parent": "RATES_SWAP", "asset_class": "RATES", "instrument_type": "DERIVATIVE", "label": "Interest Rate Swap", "status": "planned" },
    "CREDIT_SWAP":     { "parent": "SWAP", "abstract": true, "label": "Credit Swap" },
    "CDS":             { "parent": "CREDIT_SWAP", "asset_class": "CREDIT", "instrument_type": "DERIVATIVE", "label": "Credit Default Swap",   "status": "planned" },
    "TRS_BOND":        { "parent": "CREDIT_SWAP", "asset_class": "CREDIT", "instrument_type": "DERIVATIVE", "label": "Bond Total Return Swap","status": "planned" },
    "EQUITY_SWAP":     { "parent": "SWAP", "abstract": true, "label": "Equity Swap" },
    "TRS_EQUITY":      { "parent": "EQUITY_SWAP", "asset_class": "EQUITY", "instrument_type": "DERIVATIVE", "label": "Equity Total Return Swap","status": "planned" },
    "FX_SWAP_GROUP":   { "parent": "SWAP", "abstract": true, "label": "FX Swap Group" },
    "FX_SWAP":         { "parent": "FX_SWAP_GROUP", "asset_class": "FX", "instrument_type": "DERIVATIVE", "label": "FX Swap",                  "status": "planned" },
    "XCCY_SWAP":       { "parent": "FX_SWAP_GROUP", "asset_class": "FX", "instrument_type": "DERIVATIVE", "label": "Cross-Currency Swap",      "status": "planned" },
    "VOLATILITY_SWAP": { "parent": "SWAP", "abstract": true, "label": "Volatility Swap" },
    "VARIANCE_SWAP":   { "parent": "VOLATILITY_SWAP", "asset_class": "VOLATILITY", "instrument_type": "DERIVATIVE", "label": "Variance Swap", "status": "planned" },

    "FORWARD": { "parent": null, "abstract": true, "label": "Forward" },
    "FX_FORWARD": { "parent": "FORWARD", "asset_class": "FX", "instrument_type": "DERIVATIVE", "label": "FX Forward", "status": "planned" },

    "FINANCING": { "parent": null, "abstract": true, "status": "planned", "label": "Financing Transaction" },
    "REPO":         { "parent": "FINANCING", "asset_class": "RATES", "instrument_type": "CASH", "label": "Repurchase Agreement",          "status": "planned" },
    "REVERSE_REPO": { "parent": "FINANCING", "asset_class": "RATES", "instrument_type": "CASH", "label": "Reverse Repurchase Agreement",  "status": "planned" },

    "FUND_LP": { "parent": null, "asset_class": "ALTERNATIVE", "instrument_type": "CASH", "label": "Fund LP Interest", "status": "planned" }
  },

  "asset_classes": {
    "FIXED_INCOME": { "parent": null,           "label": "Fixed Income" },
    "RATES":        { "parent": "FIXED_INCOME", "label": "Rates" },
    "CREDIT":       { "parent": "FIXED_INCOME", "label": "Credit" },
    "EQUITY":       { "parent": null,           "label": "Equity" },
    "VOLATILITY":   { "parent": null,           "label": "Volatility" },
    "CASH":         { "parent": null,           "label": "Cash" },
    "FX":           { "parent": null,           "label": "Foreign Exchange" },
    "CRYPTO":       { "parent": null,           "label": "Crypto" },
    "COMMODITY":    { "parent": null,           "label": "Commodity" },
    "METALS":       { "parent": "COMMODITY",    "label": "Metals" },
    "ENERGY":       { "parent": "COMMODITY",    "label": "Energy" },
    "AGRICULTURAL": { "parent": "COMMODITY",    "label": "Agricultural" },
    "REAL_ESTATE":  { "parent": null,           "label": "Real Estate" },
    "ALTERNATIVE":  { "parent": null,           "label": "Alternative" }
  },

  "instrument_types": ["CASH", "DERIVATIVE", "REFERENCE_INDEX"]
}