Skip to main content

emrgex — fixed-income calculator

emrgex is an API for pricing fixed-income (renta fija) instruments. Send it a bond and a quote and it returns the price, yield, accrued interest, and a full set of risk metrics — or send a price and it solves the yield. It handles government and corporate bonds, money-market bills, amortizing and callable structures, and index-linked instruments.

What it does

  • Price ↔ yield. Quote by yield, clean_price, dirty_price, or a transacted cash amount; emrgex computes the rest.
  • Risk metrics. Clean/dirty price, accrued interest, Macaulay & modified duration, convexity, DV01, current yield, TEC (effective-annual purchase rate), Sherman ratio, and yield-to-worst for callables.
  • Cashflows & carry. Generate a bond's cashflow schedule, or compute daily carry to a horizon.
  • Batch. Price thousands of instruments in a single request.

The core idea: named global conventions

Instead of opaque, product-specific codes, a calculation in emrgex is defined by three independent, globally-recognized axes:

AxisWhat it setsExamples
rate_typehow the yield compoundsNOMINAL, EFFECTIVE, AT_MATURITY
day_counthow time is measured (FpML / ISDA)ACT/ACT.ICMA, 30E/360, BUS/252
coupon_typehow the coupon amount is computedFIXED, ACCRUAL

Any rate_type combines with any day_count; their join is the instrument's calculation_code (e.g. ACT/ACT.ICMA|NOMINAL). See Conventions.

Two ways to price

  • Stored instruments — reference a bond already in the catalog by its id.
  • Ad-hoc instruments — define the bond inline in your request.

Both recompute the full valuation on every call. See Instruments.

Next steps

:::note Base URL The development service is at https://calc.dev.emrgex.com. Every endpoint is under /v1. :::