Skip to main content

Module fpml

Module fpml 

Expand description

An FpML 5 confirmation-view reader: a trade document into a helixio instrument, with the cashflows the document itself states kept beside it.

The reader is the one place FpML element names appear. It walks the elements it needs with a read-only DOM, assembles legs coupon by coupon through the constructors every other product uses, and refuses by name any element that would change the economics and that it does not map: a silent default is the one answer a confirmation reader must never give.

A trade is read as the trade model states it: the reporting party is chosen by the caller (PartySelector), the trade carries its identifier, its counterparty and the CSA it discounts under, and it books its product beside every fee, premium and additional payment as Components. read_all reads every trade of a document, each to its own result, so one refusal does not cost the others.

Products dispatch by element in one closed match; anything not listed is refused by name. The swap mapper reads a fixed-versus-IBOR stream pair in one currency or two, with stated stub dates, notional and rate step schedules, an interpolated initial stub, compounding of calculation periods into a longer payment period, business-day payment and fixing offsets, principal exchanges and an FX-linked notional. A wrapper’s underlying swap is kept as FpmlTrade::underlying, whose legs FpmlTrade::stream_instrument gives for the stated cashflows to be checked against.

complete goes the other way for a stream’s stated cashflows: it prices the trade on a market and writes each row’s year fraction, rates, amount, discount factor and present value back into the document’s own text.

Modules§

book 🔒
A Book built from FpML documents.
capfloor 🔒
A capFloor, a fra and a bulletPayment.
cashflows 🔒
The cashflows block a stream may carry: what the document itself says the stream pays, read verbatim so the generated schedule can be held to it.
credit 🔒
Credit products: a creditDefaultSwap on one reference entity or on an index, and a creditDefaultSwapOption on one.
document 🔒
The document layer: namespace check, element access by local name, and the one error type every refusal is spelled in.
fx 🔒
FX products: fxSingleLeg (spot, forward, NDF), fxSwap, a European vanilla fxOption (NDO included), and a strategy of them.
index
The FpML floating-rate-index scheme value, resolved to a registered term or overnight index.
inflation 🔒
An inflation swap: a fixed stream against an inflationRateCalculation stream, read as a zero-coupon or a year-on-year inflation swap from the streams’ terms and dates.
security 🔒
Products on a security: a bondOption, a term repo, and a European equityOption.
settlement 🔒
Non-deliverable settlement: the FX fixing a settlement rate option names.
swap 🔒
A swap product: each swapStream into a leg, the pair into a single-currency or cross-currency swap.
swaption 🔒
The swap wrappers: a swaption on its swap, a cancelableProvision cancelling one, and an earlyTerminationProvision ending one at market.
trade 🔒
The trade model: who “us” is, what the trade is called, whom it faces, what it discounts under, and the dated amounts it books beside its product.
writer 🔒
The cashflow writer: a read document’s stated cashflows completed with what helixio prices them at, spliced into the document’s own text.

Structs§

Component
One component a trade books: its product, or a dated amount beside it.
CreditReferences
The credit identities a caller states for the reference entities its trades name, keyed by the entity’s entityId or entityName.
FpmlBook
A book read from FpML, with what was not booked.
FpmlTrade
A trade read from an FpML document.
PartyRef
One party as the document states it.
Read 🔒
What a product mapper returns: the components it books, the swap whose streams carry stated cashflows, and how its streams map to legs.
ReadOptions
What a read needs beyond the document: the reporting party, and the reference data the trade’s terms point into.
Refusal
A trade, or a document, that was not booked, and why.
StatedCashflow
One paymentCalculationPeriod of a stream’s stated cashflows.
StatedExchange
One principalExchange of a stream’s stated cashflows.

Enums§

FpmlError
Why a document could not be read.
PartySelector
Which party of a document reports: the one whose side every leg is read from.

Constants§

NAMESPACE
The namespace every document the reader accepts declares.
TRADE_METADATA 🔒
Elements of trade that carry no economics and are passed over. otherPartyPayment is read separately, as a fee where we pay or receive.

Functions§

complete
Completes the stated cashflows of the first trade in text with its values on market, and returns the document’s text with them inserted.
read
Reads the first trade of an FpML 5 confirmation document, as the first party the document declares.
read_all
Reads every trade of an FpML 5 confirmation document, in document order, as the party options selects.
read_trade 🔒
trades 🔒
The document’s trade elements, outermost only.