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
Bookbuilt from FpML documents. - capfloor 🔒
- A
capFloor, afraand abulletPayment. - cashflows 🔒
- The
cashflowsblock 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
creditDefaultSwapon one reference entity or on an index, and acreditDefaultSwapOptionon 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 vanillafxOption(NDO included), and astrategyof 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
inflationRateCalculationstream, 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 termrepo, and a EuropeanequityOption. - settlement 🔒
- Non-deliverable settlement: the FX fixing a settlement rate option names.
- swap 🔒
- A
swapproduct: eachswapStreaminto a leg, the pair into a single-currency or cross-currency swap. - swaption 🔒
- The swap wrappers: a
swaptionon its swap, acancelableProvisioncancelling one, and anearlyTerminationProvisionending 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.
- Credit
References - The credit identities a caller states for the reference entities its
trades name, keyed by the entity’s
entityIdorentityName. - Fpml
Book - A book read from FpML, with what was not booked.
- Fpml
Trade - A trade read from an FpML document.
- Party
Ref - 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.
- Read
Options - 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.
- Stated
Cashflow - One
paymentCalculationPeriodof a stream’s stated cashflows. - Stated
Exchange - One
principalExchangeof a stream’s stated cashflows.
Enums§
- Fpml
Error - Why a document could not be read.
- Party
Selector - 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
tradethat carry no economics and are passed over.otherPartyPaymentis read separately, as a fee where we pay or receive.
Functions§
- complete
- Completes the stated cashflows of the first trade in
textwith its values onmarket, 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
optionsselects. - read_
trade 🔒 - trades 🔒
- The document’s
tradeelements, outermost only.