440 likes | 578 Views
Navigating the MDDL Specification. James E. Hartley Chief Technologist, FISD 29 April 2003. Topics. What’s in a Release? Terminology In the Data Model When Viewing the Schemas In Instance Documents Useful Tools and Features Considered. What’s in a Release?.
E N D
Navigating theMDDL Specification James E. Hartley Chief Technologist, FISD 29 April 2003
Topics • What’s in a Release? • Terminology • In the Data Model • When Viewing the Schemas • In Instance Documents • Useful Tools and Features Considered
What’s in a Release? • Data Model – the Source .XML file • Glossary – Terms and Definitions • The Base Schema – no inheritance • The Full Schema – inheritance allowed • Schema Docs (Pictures from the Base) • Technical Specification (Word Doc) • Supporting XML/XSD Files
Supporting XML/XSD Files • mddlref-*.xsd • For Special Element “references” • mddllink-*.xsd • For XLink functionality (advanced) • xml.xsd • Standard XML attributes
Sender Recipient Container Property Base Type Classification Construct Domain (Class, Subclass) Scheme (C.V.) References Period Group Inheritance Shorthand Special Words Used in MDDL
Special Word: Sender, Recipient • A Sender is the individual, system, organization that generates and transmits (delivers) an MDDL instance document • A Receiver (can you guess?) is the system (etc.) that receives an instance document
Special Word: Container • A Container is an MDDL element intended to hold other elements and DOES NOT have a value of its own. • Example (“ask” is a “Container”): <ask> <last>102.34</last> </ask>
Special Word: Property • A Property is an MDDL element that has a value of its own – and MAY hold other properties • Example (“last” is a “Decimal”): <last> <mdDecimal>102.34</mdDecimal> <currency>USD</currency> </last>
Special Word: Base Type • The Base Type of a property or a container implies the atomic type, or content model, for the element. • Example: • “ask” is of Base Type “container” • “last” is of Base Type “decimal” • “address” is of Base Type “string” • “issueDate” is of Base Type “dateTime”
string decimal integer boolean dateTime duration uri math (in Schemas) container Base Types
Special Word: Classification • A Classification identifies what children properties are necessary to fully qualify a property. • Example: • “last” is of Classification “Price” • “issueDate” is of Classification “DateTime” • “peRatio” is of Classification “Rate” • “daysInMonth” is of Classification “Quantity”
DateTime Rate Measure Quantity Price Fee Amount Container Root Enumeration Simple Classifications
Classification: DateTime • Must (May) Have the Following Children: • indicatorsType • marketCenter • sequence • source
previousDateTime sequence source valuationType valuationRef calculationType dateTime fraction indicatorsType marketCenter multiplier Classification: Rate
Classification: Measure, Quantity • Measure: Identical to “Rate” • Quantity: “Rate” plus • unitType
Classification: Price, Fee, Amount • Price, Fee, Amount: “Rate” plus • currency • paymentType
Classification: Container, Root • “Container” is a Placeholder for containers • No real values • Will ONLY contain children elements • All Domains, Classes, Subclasses • There is Only One “Root” Element • You guessed it – “mddl”
Classification: Enumeration • Property Constrained by Discrete Values • Treated as a String • Attribute “scheme” • Identifies the controlled vocabulary (C.V.) • May default to value in Schema • C.V. Lists Legal Values for Property • For example, ISO Country Codes • Consider, however, NYSE Listed Instruments
Classification: Simple • Basic property • May have children properties • Governed by Base Type • Like a Container – but may have a value
Special Word: Construct • A Construct is a top-level element that loosely identifies the REASON for the market data provided in the document • A “snap” is for a Snapshot of data at an instant in time (dateTime provided) • A “timeseries” holds a related collection of “snap”s (as separate “event”s)
Special Word: Domain, Class, Subclass • A Domain, Class, or Subclass is a container used to classify and organize properties for a specific asset class. • Defines Financial Product Hierarchy • equityDomain, commonClass • civDomain, fundClass, mutualSubclass • civDomain, fundClass, moneyMarketSubclass • Instruments Identified at Lowest Level
Special Word: Controlled Vocabulary • A Controlled Vocabulary (or Scheme) is a list of terms used to constrain the legal values of a string property. • MDDL catalogues two types: • Internal C.V.s are those that are created and maintained by MDDL.org and are intended to contain an exhaustive list of terms • External C.V.s are those used in MDDL but not controlled by MDDL. Likely NOT exhaustive.
Special Word: C.V. (con’t) • Examples of External Schemes: • Exhaustive Lists Maintained (Copies): • ISO 3166 Country Codes • ISO 4217 Currency Codes • Thirdparty sources of data • Lists Referenced (and not maintained): • Ticker Symbols by Exchange • ISO 10383 Market Identification Code • ISO 10962 Classification of Financial Instruments
Special Elements • <mddl version=“2.0-draft”> • header • other (for extensions) • references • Any “*Group” • Subordinate container facilitates inheritance • All Containers, Domains, Classes, Subclasses
Special Element: references • The references element within the header can be used to hold common information • The container or property is given an “id” attribute (per normal XML guidelines) • Then the common content can be pointed to in place of actual content using the “mddlref” namespaced elements • NOTE: MAY BE DEPRECATED
Special Element: references (con’t) • This (if used multiple times): <agent> <location> <address>123 Institution Ave</address> <municipality>Somewhere</municipality> <stateOrProvince>AB</stateOrProvince> <postalCode>12345-1234</postalCode> </location> </agent>
Special Element: references (con’t) • Place it in the “references” element: <header><references> <location id=“locationID”> <address>123 Institution Ave</address> <municipality>Somewhere</municipality> <stateOrProvince>AB</stateOrProvince> <postalCode>12345-1234</postalCode> </location> </references></header>
Special Element: references (con’t) • And then reference it: <agent> <ref:location xlink:href=“#locationID”/> </agent> • Benefits: • Removes duplicated data • Syntax allows “editing” referenced content • Drawback: Complicates processing
Special Properties • instrumentIdentifier (and similars) • fraction • multiplier • period • sequence
Special Property: instrumentIdentifier • Element to Define Instrument of Interest <instrumentIdentifier> <name>Your Favorite Fund</name> <code scheme=“http://www.ypd.net/symbol”> <mdString>YFF</mdstring> <nameRef>../../name</nameRef> </code> </instrumentIdentifier>
instrumentIdentifier (con’t) • Scheme Identifies Symbology: • ISIN (ISO 6166): http://www.mddl.org/ext/scheme/iso6166 • Numbering Agencies: http://www.mddl.org/ext/scheme/agency?SRC=SEDOL • Tickers: http://www.mddl.org/ext/scheme/ticker?MIC=ABC • Additional Syntax for Identifying Scope: <scopeType>international</scopeType>
Special Property: fraction • The fraction element can be used if it is important to know that a value is to be rounded or that a decimal is a fraction • Number rounded, truncate for display: <mdDecimal>123.43</mdDecimal> <fraction actualDenominator=“1000” displayDenominator=“10”/>
Special Property: fraction (con’t) • Decimal doesn’t reflect quoting unit: <mdDecimal>123.1875</mdDecimal> <faction actualDenominator=“32” displayDenominator=“8”/>
Special Property: multiplier • The multiplier indicates all quoted values should be multiplied by the factor • USE SPARINGLY (complicates processing) • Multiply by 0.01 to get GBP: <currency> <mdString>GBP</mdString> <multiplier>0.01</multiplier> </currency>
Special Property: period • A period can specify date and times: • A “start”, an “end”, a “duration” • Any combination of the above • As well a “recurring” indicator <period><recurring>true</recurring> <start>2003-04-01T11:00:00Z</start> <end>2004-04-01T11:00:00Z</end> <duration>P1M</duration> </period>
Special Property: sequence • The sequence property is a unique identifier given to an instance document, assigned by the sender, to facilitate sequencing and missed updates • Should be lexically increasing (it’s a string) • May indicate a previous document which this one replaces (due to error, etc.)
Special Word: Inheritance • This: <ask> <last><mdDecimal>102.34</mdDecimal> <currency>USD</currency> </last> <high><mdDecimal>103.95</mdDecimal> <currency>USD</currency> </high> </ask>
Special Word: Inheritance (con’t) • Becomes: <ask> <currency>USD</currency> <last><mdDecimal>102.34</mdDecimal></last> <high><mdDecimal>103.95</mdDecimal></high> </ask>
Special Word: Shorthand • This: <last> <mdDecimal>102.34</mdDecimal> </last> • Becomes: <last>102.34</last>
Inheritance and Shorthand • This: <ask> <last><mdDecimal>102.34</mdDecimal> <currency>USD</currency> </last> <high><mdDecimal>103.95</mdDecimal> <currency>USD</currency> </high> </ask>
Inheritance and Shorthand (con’t) • Becomes: <ask> <currency>USD</currency> <last>102.34</last> <high>103.95</high> </ask>
Remember the Processing Rules • Explode Shortcuts: • Inheritance, Shorthands, References • Before Validation or Processing • Tony Coates Will Cover Details
Useful Tools and Features Considered • Glossary and Schema Docs Tied Together • Highlighting “Base Type” and “Classification” • Ability to Generate Extended Schemas • Use MDDL Data Model to add extensions • Ability to Generate Limited Schemas • For specific Domains/Classes/Subclasses