The Financial products Markup Language (FpML) loader is used to load trades into the system. It is one of a number of loaders included in Strata.
Trades can be loaded using the
ResourceLocator locator = ResourceLocator.ofFile(filename); FpmlPartySelector selector = FpmlPartySelector.matching("MyBank"); FpmlDocumentParser parser = FpmlDocumentParser.of(selector); List<Trade> trades = parser.parseTrades(locator.getByteSource());
The FpML loader requires an
This is necessary as the FpML data structure is neutral as to the direction of a trade.
Instead of referring to “pay” and “receive”, it declares “party A pays” and party B receives.
The Strata data model takes the opposite view, with each trade stored with Pay/Receive or Buy/Sell concepts
expressed from “our” point of view. The selector is used to bridge the gap between the two.
As such, the job of the selector is to pick the party that represents “us” in the FpML data.
Advanced use cases may require configuring the FpML loader further.
The FpML format is defined at fpml.org and is an XML dialect. Registration is required to see the formal specification, however these links to working drafts also work:
- Data document - the overall XML document
- FX single
- FX swap
- Term deposit
- Bullet payment
The Strata parsers will ignore FpML elements that do not impact on pricing. However, if the parser detects an FpML element that is known to affect pricing but is not supported by Strata, an exception will be thrown.