Conventions
A calculation in emrgex is defined by three independent, globally-recognized axes — there are no proprietary codes. You pick the compounding, the day-count, and the coupon formula independently, each from a name anyone in the market can identify.
1. rate_type — compounding / quotation basis
How the yield compounds when discounting.
rate_type | Meaning | Discounting |
|---|---|---|
NOMINAL | nominal rate compounded frequency×/yr (street YTM) | (1 + y/f)^(-f·t) |
EFFECTIVE | effective-annual rate | (1 + y)^(-t) |
AT_MATURITY | money-market simple discount (T-bills / Letras) | 1 / (1 + y·t) |
PRICE_QUANTITY | equity / fund NAV pass-through: value = price × quantity (no discounting; no day_count) | — |
2. day_count — year-fraction convention (FpML / ISDA)
How time is measured, named per the FpML / ISDA 2006 §4.16 taxonomy.
| Name | Notes |
|---|---|
ACT/ACT.ISDA | ISDA §4.16(b), split at the year boundary |
ACT/ACT.ICMA | ISDA §4.16(c) / ICMA Rule 251; a regular period collapses to 1/f |
ACT/ACT.ISMA | alias of ICMA |
ACT/ACT.AFB | AFB 1994 |
ACT/360 | money-market |
ACT/365.FIXED | |
ACT/365L | leap-aware denominator |
ACT/364 | |
30/360 | US / Bond Basis |
30E/360 | Eurobond |
30E/360.ISDA | + February maturity rule |
30/360.GERMAN | alias of 30E/360.ISDA |
1/1 | degenerate, for FpML completeness |
BUS/252 | Brazil B3 / ANBIMA: business days / 252, using the built-in ANBIMA holiday calendar. Bit-exact vs Tesouro Direto LTN / NTN-F |
ACT/ACT.DRMH | Dominican Republic government basis (Ministerio de Hacienda): actual days / actual days in the 12-month window ending at the payment date. Verified vs the issuer's published bases |
3. coupon_type — how the coupon amount is computed
coupon_type | Coupon per period | Used for |
|---|---|---|
FIXED (default) | coupon_rate / frequency × outstanding | conventional fixed-rate bonds (Treasuries, corporates, Eurobonds) |
ACCRUAL | coupon_rate × yearFraction(day_count) × outstanding | money-market and local-market bonds whose coupon tracks the period length |
The two coincide under ACT/ACT.ICMA and 30E/360 (a regular period is exactly 1/f) and
diverge under actual-day counts (ACT/365, ACT/360, ACT/ACT.ISDA). A per-quote
options.coupon_type overrides the instrument's setting for what-if analysis.
calculation_code — the global identifier
Every instrument exposes a calculation_code: the join of its two main axes,
<day_count>|<rate_type>. It is derived from the convention, never an input that overrides it.
ACT/ACT.ISDA|NOMINAL ACT/360|AT_MATURITY 30E/360|EFFECTIVE PRICE_QUANTITY
PRICE_QUANTITY has no day-count, so its code is just PRICE_QUANTITY.
Mixing matrix
The axes are orthogonal — any rate_type combines with any day_count:
| rate_type | day_count | calculation_code |
|---|---|---|
| NOMINAL | ACT/ACT.ICMA | ACT/ACT.ICMA|NOMINAL |
| NOMINAL | 30E/360 | 30E/360|NOMINAL |
| EFFECTIVE | ACT/365.FIXED | ACT/365.FIXED|EFFECTIVE |
| AT_MATURITY | ACT/360 | ACT/360|AT_MATURITY |
Validity rules: NOMINAL / EFFECTIVE require a positive frequency; AT_MATURITY and
PRICE_QUANTITY force frequency to 1; PRICE_QUANTITY takes no day_count; every other
combination requires a valid day_count.
Decoupled day-counts (advanced)
day_count normally drives three things at once. When an instrument needs different bases per
axis, override them individually — each is optional and falls back to day_count:
| Field | Axis it controls |
|---|---|
accrual_day_count | accrued interest (coupon corrido) |
coupon_day_count | the ACCRUAL coupon amount |
discount_day_count | the discount-time exponent t (present-value) |
For example, Dominican government ACT/ACT bonds accrue on the issuer's 365/366 base but discount
on street/ICMA periods — modeled as day_count: ACT/ACT.DRMH with
discount_day_count: ACT/ACT.ICMA.
Discover what's supported
curl https://calc.dev.emrgex.com/v1/admin/conventions
Returns every rate_type and day_count with a description, plus the calculation_code format.