Skip to main content

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_typeMeaningDiscounting
NOMINALnominal rate compounded frequency×/yr (street YTM)(1 + y/f)^(-f·t)
EFFECTIVEeffective-annual rate(1 + y)^(-t)
AT_MATURITYmoney-market simple discount (T-bills / Letras)1 / (1 + y·t)
PRICE_QUANTITYequity / 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.

NameNotes
ACT/ACT.ISDAISDA §4.16(b), split at the year boundary
ACT/ACT.ICMAISDA §4.16(c) / ICMA Rule 251; a regular period collapses to 1/f
ACT/ACT.ISMAalias of ICMA
ACT/ACT.AFBAFB 1994
ACT/360money-market
ACT/365.FIXED
ACT/365Lleap-aware denominator
ACT/364
30/360US / Bond Basis
30E/360Eurobond
30E/360.ISDA+ February maturity rule
30/360.GERMANalias of 30E/360.ISDA
1/1degenerate, for FpML completeness
BUS/252Brazil B3 / ANBIMA: business days / 252, using the built-in ANBIMA holiday calendar. Bit-exact vs Tesouro Direto LTN / NTN-F
ACT/ACT.DRMHDominican 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_typeCoupon per periodUsed for
FIXED (default)coupon_rate / frequency × outstandingconventional fixed-rate bonds (Treasuries, corporates, Eurobonds)
ACCRUALcoupon_rate × yearFraction(day_count) × outstandingmoney-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_typeday_countcalculation_code
NOMINALACT/ACT.ICMAACT/ACT.ICMA|NOMINAL
NOMINAL30E/36030E/360|NOMINAL
EFFECTIVEACT/365.FIXEDACT/365.FIXED|EFFECTIVE
AT_MATURITYACT/360ACT/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:

FieldAxis it controls
accrual_day_countaccrued interest (coupon corrido)
coupon_day_countthe ACCRUAL coupon amount
discount_day_countthe 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.