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 atransactedcash 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:
| Axis | What it sets | Examples |
|---|---|---|
rate_type | how the yield compounds | NOMINAL, EFFECTIVE, AT_MATURITY |
day_count | how time is measured (FpML / ISDA) | ACT/ACT.ICMA, 30E/360, BUS/252 |
coupon_type | how the coupon amount is computed | FIXED, 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
- Getting started — make your first request.
- API reference — the
/v1/quotesendpoint in full. - Examples — copy-paste recipes.
:::note Base URL
The development service is at https://calc.dev.emrgex.com. Every endpoint is under /v1.
:::