Presentation is loading. Please wait.

Presentation is loading. Please wait.

MSCF/CMU1 FpML The Financial Product Markup Language.

Similar presentations


Presentation on theme: "MSCF/CMU1 FpML The Financial Product Markup Language."— Presentation transcript:

1 MSCF/CMU1 FpML The Financial Product Markup Language

2 MSCF/CMU2 FpML XML language for representing derivatives Sponsored by ISDA (for OTC derivatives) Intended to support - communications within firms - communications between firms A quote that says it all: “We can write code to price and hedge a triple currency rainbow barrier option but we can’t check that a clerk entered a trade the right way around.” From a slide presentation by Brian Lynn (CTO of GemSoup )

3 MSCF/CMU3 FpML Defines XML representations for –interest rate derivatives –credit default swaps –most equity derivatives –most vanilla and exotic FX products –energy derivatives (under development)

4 MSCF/CMU4 Adoption? An outsider looking in The FpML Working group members are an impressive bunch (see www.fpml.org) Names of adopters usually include: Bank of America, JPMorgan, Goldman Sachs, Barclays, AIG Probably an uphill fight

5 5 Example Document FX Spot <!DOCTYPE FpML PUBLIC "-//FpML//DTD Financial product Markup Language 3-0//EN" "" > <FpML version = "3-0" currencySchemeDefault = " http://www.fpml.org/ext/iso4217" partyIdSchemeDefault = " http://www.fpml.org/ext/iso9362" quoteBasisSchemeDefault = " http://www.fpml.org/spec/2001/quote-basis-1-0"> <tradeId tradeIdScheme = "http://www.citi.com/fx/trade-id ">CITI123

6 MSCF/CMU6 <tradeId tradeIdScheme = "http://www.barclays.com/fx/trade-id ">BARC987 2001-10-23 GBP 10000000

7 MSCF/CMU7 USD 14800000 2001-10-25 GBP USD CURRENCY2PERCURRENCY1 1.48

8 MSCF/CMU8 CITIUS33 BARCGB2L

9 MSCF/CMU9 A C# Program that reads FpML // Reading an FpML file using System.Xml; using System.IO; using System; class XmlDemo { static void displayPayment(XmlElement pay) { Console.WriteLine("Payment"); XmlElement ccy = (XmlElement)pay.FirstChild; XmlText t = (XmlText)ccy.FirstChild; Console.WriteLine("Currency: " + t.Value); XmlElement val = (XmlElement)ccy.NextSibling; XmlText v = (XmlText)val.FirstChild; Console.WriteLine("Amount: " + v.Value); }

10 MSCF/CMU10 static void Main() { XmlTextReader reader = new XmlTextReader("fx_example_01.xml"); // build an empty DOM tree XmlDocument doc = new XmlDocument(); // load the tree from a string doc.Load(reader); // get the root of the xml XmlElement root = doc.DocumentElement; // write its value Console.WriteLine(root.Name);

11 MSCF/CMU11 XmlNodeList nl = root.GetElementsByTagName("paymentAmount"); XmlElement payment1 = (XmlElement)(nl[0]); XmlElement payment2 = (XmlElement)(nl[1]); displayPayment(payment1); displayPayment(payment2); }

12 MSCF/CMU12 Output D:\McCarthy\www\46-690\examples\fpmlreader>XmlURLDemo.exe FpML Payment Currency: GBP Amount: 10000000 Payment Currency: USD Amount: 14800000

13 MSCF/CMU13 An FpML Web Service using System; using System.Web.Services; using System.Xml; namespace handlefpml { [WebService(Namespace="http://localhost/AnFpMLService/")] public class FPMLWebService : System.Web.Services.WebService { [WebMethod] public double GetExchangeRate(XmlElement root) { XmlNodeList nl = root.GetElementsByTagName("paymentAmount"); XmlElement payment1 = (XmlElement)(nl[0]); XmlElement payment2 = (XmlElement)(nl[1]); // Server side code // Pass the document as a parameter

14 MSCF/CMU14 XmlElement ccy1 = (XmlElement)payment1.FirstChild; XmlElement val1 = (XmlElement)ccy1.NextSibling; XmlText v1 = (XmlText)val1.FirstChild; double amt1 = double.Parse(v1.Value); XmlElement ccy2 = (XmlElement)payment2.FirstChild; XmlElement val2 = (XmlElement)ccy2.NextSibling; XmlText v2 = (XmlText)val2.FirstChild; double amt2 = double.Parse(v2.Value); return amt2 / amt1; }

15 MSCF/CMU15 FpML Web Service Client // Read an FpML file // Pass it to a web service using System.Xml; using System.IO; using System; class WebServiceClient { static void Main() { XmlTextReader reader = new XmlTextReader("fx_example_01.xml"); // build an empty DOM tree XmlDocument doc = new XmlDocument(); // The FpML document is on the client. // It is passed to the web // service on the server.

16 MSCF/CMU16 // load the tree from a string doc.Load(reader); Console.WriteLine("Document loaded"); // get access to the proxy (generated from wsdl) FPMLWebService ws = new FPMLWebService(); Console.WriteLine("Making remote call"); Double d = ws.GetExchangeRate(doc.DocumentElement); Console.WriteLine("Rate = " + d); }

17 MSCF/CMU17 Output D:\McCarthy\www\46-690\examples\fpmlwebservice\client>WebServiceClient.exe Document loaded Making remote call Rate = 1.48

18 MSCF/CMU18 Some FpML Tools GemScribe – FpML Editing and viewing GemDelta is a tool for matching and comparing FpML documents GemVault – for storing and retrieving FpML documents Gem Soup Tools for FpML/Spreadsheet integration The FpML Version 4 user’s guide (fpml.org) SystemWire Validation tools


Download ppt "MSCF/CMU1 FpML The Financial Product Markup Language."

Similar presentations


Ads by Google