SlideShare ist ein Scribd-Unternehmen logo
1 von 97
L.G.H.C. Nalinda
2011CS005
11000058
Domain Specific Language for
Specify Operations of a Central
Counterparty
Supervisor: Dr. Chamath Keppetiyagama
Domain Specific Language to Define Operations for
Central Counterparty
▷Domain – Financial Market
▷Central Counterparty (CCP) – Financial Institute
Financial Market Specific Language to CCP
Road Map
▷Financial Contracts
▷Motivation
▷Research Hypothesis
▷Research Literature
▷Design
▷Representation Of CCP Operations
▷Evaluation & Analysis
▷Conclusion And Future Work
Financial Contracts
Financial Contract
▷Financial Contract = Promise + Legal
▷Transfer $100 On 31st Dec. 2016
Future Date Promise
Future Cash Flow
▷Different Contracts  Different Purposes
Different Interests
Contract Definitions Different
Different Operations
Motivation
DSL for Finance Sector
Motivation
Haskell Contract Combinator
Library
Peyton Jones, Marc-Eber, Julian (2000)
▷Fixed, Precisely Specified Set of Combinators (Unified Mechanism)
▷Describe a Contract
▷Process a Contract
▷Find Value of a Contract
▷Compositional Nature – (Can Glue Combinators Together)
Contract Primitives + Observable Primitives
IntroductionHCCL
Primitives for Defining Contracts | HCCL
IntroductionHCCL
Primitives for Defining Observables
IntroductionHCCL
Composing Contracts
Composing ZCB
“Receive £200 on Future Date t1”
C1 = one GBP
C2 = truncate t1 (one GBP)
= truncate t1 (C1)
C3 = scale 200 (truncate t1(one GBP))
= scale 200 (C2)
C4 = get (scale 200 (truncate t1(one GBP)))
get (C3)
IntroductionComposing Contracts
ZCB :: Date -> Double -> Currency -> Contract
Contract Definitions
IntroductionComposing Contracts
▷ZCB :: Date  Double  Currency  Contract
▷EU_OPTION :: Date  Contract  Contract
▷AMERICAN_OPTION :: (Date,Date)  Contract  Contract
Central Counterparty
Absence of CCP
CCP
With CCP
CCP
Operations of CCP
▷Margin Calculation
Purpose : No Counterparty Default Occur
At the End of Each Business Day
.
▷Possibilities
Dr. Trader Account
Cr. Trader Account
Restate to Initial Margin
CCP
Rule 9102 – Long Option Position
Margin Requirement
.
Methodology
the period to expiry is greater or equal to 9
months, 50% of the option’s time value, else
100% of the option’s time value
Future Cash Flow
.
Research Hypothesis
If we can use Peyton Jones’s
language to compose FC/FD, we
can use the same language to
compose CCP Rules
Research Literature
Summary
IntroductionResearch Literature
DSL for Finance Sector Has been a Major Requirement Since Early Days
Payton, Eber, Julian HCCL
Mediratta Complex Derivatives
Gaillourdet Software Language Approach
Bahr, Jost, Elsman Symbolic Management of Finance
Contracts & Symbolic Management of
Multiparty Contracts
CCP Operations Have Not Yet Addressed using DSL Approach
Design
Rule | Design Architecture IntroductionDesign
Seed Contract | Hypothesis
IntroductionDesign
Operations of CCP
IntroductionDesign
Representation of CCP
Operations
Sell 100 Dell shares for a
price of £4800 anywhere from
today to 240 days from today,
or DO NOTHING at all during the
time
Contract | Analysis
▷Giving user a “Choice”  Option Contract
Compose Option Contract using HCCL
▷Receive £ 4800 : C1 = (Get (Scale (Obs [4800.0]) (One GBP)))
▷Transfer(Sell) 100 Dell Shares : C2 : (Give (Scale(Obs [100.0]) (OneE DEL))
Compose Option Contract using HCCL (Cntd.)
▷Composite Contract : C3 = And C1 C2
▷Adding Option to Contract : C4 = Or C3 Zero
▷Maturity @240th day: C5 = Truncate 240 C4
Instrument
▷Easy Way to Introduce
▷Grasp underlying rights and obligations  Name
Option Premium
▷Amount Pay For The Instrument
▷Option Premium Is A Contract
▷Pay £ 200 To Purchase “ABC_Instrument”
TruncateT ((),1) (Scale (Obs [200.0]) (One GBP))
Trade Creation
Buyer Is
The
OWNER
Data Type| Trade
data Trade = Trade Instrument Contract
▷Trade
Option Premium Paid – £ 200
Instrument Purchased – “ABC_Instrument”
Underlying Contract – Option Created
This Trade Brings To CCP
Rights and Obligations Defined In Trade
▷Owner
-Sell 100 Dell + Receive 4800 GBP
or
- DO NOTHING
Trade Novation
▷Buyer | Owner – Long Position
▷Seller | Option Writer – Short Position
Analyze Trade
▷Get Instrument From Trade
▷Get Option Premium From Trade
Progress
Analyze Instrument
▷Equity (Equity) - Dell
▷Maturity Date (Int) - 240
▷Number Of Shares – (Obs Double) – (Obs 100.0)
▷Amount To Be Paid – (Obs Double) – (Obs 4800)
▷Currency – (Currency) – GBP (£)
▷Amount Paid (Obs Double) – (Obs 200)
▷Currency – (Currency) – GBP (£)
Progress
Analyze Option Premium
Long Option Position
Progress
Composing Rule 9102 | (a)
▷Options’ Time Value
- Time Varying Quantity
- Observable Double (Obs Double (eg. Obs 200))
- Compute following, Option Premium Paid (Obs Double)
- lift2 Operator Of HCCL
- Convert (Obs Double) to Double using Haskell inbuilt functions
Composing Rule 9102 | (b)
▷Normal Margin (o1)
- Time Varying Quantity
- Observable Double (Obs Double)
▷In The Money Value (o2)
- Time Varying Quantity
- Observable Double (Obs Double)
▷Lesser
- Observable Comparison
lift2 min o1 o2
Composing Rule 9102
Composing Rule 9102
▷rule9102One
▷rule9102Two
▷rule9102Composite
Research Hypothesis Proved
Evaluation & Analysis
Environment
▷Facts About Observables and Choices – Symbolic Management of Derivatives
- External to the FC/FD
- Direct impact on the FC/FD
IntroductionResearch Literature
Rule Equivalence(via Contract Equivalence)
▷Contract Equivalence
Same Environments
Two Different Contracts
Contracts Are Identical In That Environment
Evaluation And Analysis
Patrick Bhar
▷Rule Equivalence
Same Environments
Two Different Rules
Rules Are Identical In That Environment
GIVEN NOVATED CONTRACT
Evaluation And Analysis
Rules Transformation (via Contract Transformation)
▷Contract Transformation
Specialization Function “f”
Partial Evaluation Of Contract “C”  f(C,ρ)
New Environment - ρʹ
Same Cash Flows
Evaluation And Analysis
Patrick Bhar
▷Rules (Seed Contract) Transformation
Specialization Function “f”
Partial Evaluation Of Contract “Cseed”  f(Cseed,ρ)
New Environment - ρʹ
Same Cash Flows
Evaluation And Analysis
Rule Decomposition(via Contract Decomposition)
▷Rule 9102
rule9102One
rule9102Two
Evaluation And Analysis
Data Types: Instrument
Evaluation And Analysis
Equality of Two Instruments
Evaluation And Analysis
New Instruments From Existing Instruments
Evaluation And Analysis
Data Types: Trade
Evaluation And Analysis
▷Purpose – Isolating Operations That Can Perform On Data Types
▷Decouple Each Level Of Contract Management Via New Data Types
▷Only Core Operations
Margin Calculation Engine For CCP
Evaluation And Analysis
Conclusion and Future Work
Conclusion
Conclusion and Future Work
Conclusion
▷ Proved Hypothesis – Haskell Contract Combinator Library  CCP Rules
▷DSL approach “Margin Calculation”
lucrative
Easy (fixed set of combinators and observables)
▷Symbolic Management
Rule Equivalence
Rule Transformation
Rule Decomposition
(Rule Monotonicity)
▷Base research for CCP
Conclusion And Future Work
Future Work
▷Put Option Only (Other Contract types)
▷Novation – Only one side analyzed
- Two Option Positions
- Long Option Position 
- Short Option Position ???
- Netting and Position Calculation (new observables ?)
▷One Rule – Rule 9102
▷Type Conversion
▷Margin Calculation Engine
IntroductionConclusion And Future Work
Mediratta
CS+Finance+Maths
UI
Skilled People
THANK YOU 
Q&A
Rule Monotonicity (via Contract Monotonicity)
▷Contract Monotonicity
Two Different Environments
Partially Agree
Given Contract Yield Same Cash Flow
Evaluation And Analysis
Patrick Bhar
▷Rule Monotonicity
- Two Different Environments
- Partially Agree
- Given Rules Yield Same Cash Flow
- GIVEN NOVATED CONTRACT
Evaluation And Analysis
Financial Markets
Peyton Jones, Marc-Eber, Julian (2000)
▷Fixed, Precisely Specified Set of Combinators
▷Describe a Contract
▷Process a Contract
▷Find Value of a Contract
▷Compositional Nature
Contract Primitives + Observable Primitives
IntroductionResearch Literature
Market Observables
Evaluation And Analysis
▷Addition
▷Division
▷Minimum
Gaillardet Observable Values Must Be:
- Boolean
- Real Number
- Integer
▷Options Time Value
▷In The Money Value
▷Margin Required
▷Intrinsic Value
Haskell Pattern Matching
IntroductionResearch Literature
Complex Derivatives
▷Mediratta – Credit Default Swap & Power Reverse Dual Currency Swap
▷Valuation – evalC :: Model  Contract
- evalO :: Model  Contract
More Complex Derivatives Can Compose Using Fixed Set of
Combinators & Observables While
Preserving Uniqueness of the Contract
IntroductionResearch Literature
Composing Rule 9102 | (a)
▷Date
▷Option’s Time Value in Double
▷Currency
Software Language Approach
▷Peyton – Justify that FP Approach Can Use to Define and Value Derivatives
- Lacking Highlighting SE Language Concepts
- No Unified Approach 
▷Gaillourdet – HCCL in a SW Language Point of View
- Provided a Formal Definition for the Language (Syntax)
Syntax of Observables
Syntax of Contract
- Denotational Semantics
Observables
Contracts
IntroductionResearch Literature
Option Time Value
▷Time Value = Option Price – Intrinsic Value
▷Intrinsic Value – Price at which the Commodity is being traded at considered
date. Observable  Obs Double
▷In the Money -> Strike Price Vs Spot Rate
IntroductionResearch Literature
After Novation
▷Buyer And Seller Treat Separately
▷Margin Calculation Is IMPORTANT
▷Constructing Core Level Contracts (
▷Partial Contract Implementation
▷Construction of Rule Using HCCL
▷Finalizing Seed Contract
▷Generate All Possible Results
Progress
Work In Progress
Operations of CCP
▷Get Instrument From Trade
▷Get Option Premium From Trade
▷Analyze Instrument
Instrument Name
Equity
Maturity
Number Of Shares Traded
Amount Agree To Pay
Currency
▷Analyze Option Premium
Stakeholder Interests vs Economic Stability
▷History
Enron
2007 2008 Crisis
Greek Crisis
▷Minimize Risk– Effective Derivative Management
▷Computer Science
Big Data
Data Mining
Real Time Analytics
Neural Networks ++
Financial Markets
Stock Exchanges (SE)
▷Buyers and Sellers Meet
▷Financial Contracts/ Financial Derivatives
Legal Contracts
Types: Futures, Options, Swaps, Swaptions, Bonds ++
CDS, PRDC Swaps ++
▷Rules and Regulations
Uncertainty
Effective Derivative & Contract mgt:
Financial Markets
Effective Derivative Mgt
▷Stakeholder Expectations vs Economic Stability
▷History
Enron
2007 2008 Crisis
Greek Crisis
▷Rules and Regulations
Uncertainty
Effective Derivative & Contract mgt:
Financial Markets
Effective Derivative Mgt(Cntd.)
▷Minimize Risk
▷Types of Risk
Operational, Legal
Business, Financial
▷Computer Science
Big Data
Data Mining
Real Time Analytics
Neural Networks ++
Financial Markets
ZCB(Contd.)
“Pay € 100 on Future Date t2”
C5 = give (scale 200 (truncate t2 (one EUR)))
IntroductionQ&A
Currency - €/EUR
Date - t2
Action - “Pay”
Amount - £200
and :: Contract -> Contract -> Contract
C4 = get (scale 200 (truncate t2 (one GBP)))
C5 = give (scale 100 (truncate t2 (one EUR)))
C6 = and C4 C5
Composing European Option
C 7 = European (date “02 Sep 2015”)
( zcb (date “09 Nov 2016”) 0.4 GBP `and`
zcb (date “12 Oct 2016”) 8.4 USD `and`
zcb (date “18 Nov 2016”) 0.4 GBP `and`
give (zcb (date “09 Nov 2016”) 0.4 GBP)
C8 = European Option = C7 `or` zero
IntroductionQ&A
European :: Date -> Contract -> Contract
Peyton Jones (Cntd)
▷Value Process – a Partial Function of Time
How Much this Contract Worth
Incorporate Environment Conditions
Generating Information from Defined Contract
▷Abstract Evaluation – How to Translate Arbitrary Contract into a Value Process
- Semantics for Contract Primitives
- Semantics for Observables
▷Concrete Implementation – Implementation of Abstract Semantics
- Model
IntroductionResearch Literature
Peyton Jones (Cntd)
IntroductionResearch Literature
Peyton Jones (Cntd)
Model
IntroductionResearch Literature
Semantics for Contracts | VP IntroductionQ&A
Semantics for Observables | VP
IntroductionQ&A
Denotational Semantics | Gaillourdet
IntroductionQ&A
Software Language Approach (Cntd.)
▷Observable Value – Boolean | Real | Integer
▷Time – Natural Number
▷Constant K – Boolean | Real | Integer
▷Unknown Observables – “S”
▷Binary Operators & Comparison Operators – Two Arguments of Same Type
- Binary – Returns Same Type
- Comparison – Returns Boolean
▷Unary – One Argument and Return Same Type
▷Type Casting – (C2D o | D2C o)
IntroductionResearch Literature
Software Language Approach (Cntd.)
▷Denotational Semantics – Map Each of Programs to Mathematical Object
- Denotation for Observables
- Denotation for Contracts
▷Denotation for Observables – (S  N  V)  ( N  V )
▷Denotation for Contracts – (S  N  V)  ( N  D )
▷“e” – Environment
IntroductionResearch Literature
Symbolic Contract Management
▷Symbolic Contract Management – Why symbolic – Ease of Expressing
- Denotational Semantics Information
- Expression (Set of Symbols)
- Monotonicity (Europe vs Asia)
▷Contract Management and Analysis
- Contract Equivalence
- Inferring Contract Properties
- Contract Dependence (Observables Affect on Cash Flows)
- Contract Causality (Future Observable)
- Contract Horizon (Life Time)
▷Contract Transformation – Specialization & Reduction
IntroductionResearch Literature
Symbolic Contract Management
▷Specialization–
▷Reduction
IntroductionResearch Literature
Architecture | Motivation IntroductionQ&A
Tree Representation IntroductionQ&A
C5
And
Or
Or
And C4
C3
C2C1
(Obs Double) to Double
▷Contracts (Double)
Amount Paid
# of Shares Traded ++
▷Extracted Values + Computations (Obs Double)
Time Value
Intrinsic Value ++
eg: The Lesser of Normal Margin And In The Money Value
Methodology
(Obs Double) to Double (Cntd.)
▷Double  (Obs Double)
konst
▷(Obs Double)  (Double)
Our Own Function
Methodology
(Obs Double) to Double (Cntd.)
Methodology
A : Show a => a -> String (String representation of the value)
B : matchRegex (Regex  String  Maybe[String])
"[-+]?([0-9]*.[0-9]+|[0-9]+)“
C : fromJust :: Maybe a -> a
D : Operator (!!)
E : read a :: Double

Weitere ähnliche Inhalte

Andere mochten auch

Rainbowfish &skin button
Rainbowfish &skin buttonRainbowfish &skin button
Rainbowfish &skin button又瑋 賴
 
Dengue fever
Dengue feverDengue fever
Dengue feverDr Slayer
 
Acoustic barcodes&FlatFitFab
Acoustic barcodes&FlatFitFabAcoustic barcodes&FlatFitFab
Acoustic barcodes&FlatFitFab又瑋 賴
 
Sdal molfino, emily mapping conflict onto insfrastructure
Sdal molfino, emily mapping conflict onto insfrastructureSdal molfino, emily mapping conflict onto insfrastructure
Sdal molfino, emily mapping conflict onto insfrastructurekimlyman
 
Portico&video bubbles
Portico&video bubblesPortico&video bubbles
Portico&video bubbles又瑋 賴
 
Domain Specific Language for Specify Operations of a Central Counterparty
Domain Specific Language for Specify Operations of a Central CounterpartyDomain Specific Language for Specify Operations of a Central Counterparty
Domain Specific Language for Specify Operations of a Central CounterpartyChamin Nalinda Loku Gam Hewage
 
Presentacion Final.pptx
Presentacion Final.pptxPresentacion Final.pptx
Presentacion Final.pptxUNISON
 
Grafik analisis kebangkrutan
Grafik analisis kebangkrutanGrafik analisis kebangkrutan
Grafik analisis kebangkrutanfadhly arsani
 
Depend&dingdong
Depend&dingdongDepend&dingdong
Depend&dingdong又瑋 賴
 
Psychological disorder
Psychological disorder Psychological disorder
Psychological disorder UNISON
 
Sdal air health and social development (jan. 27, 2014) final
Sdal air health and social development (jan. 27, 2014) finalSdal air health and social development (jan. 27, 2014) final
Sdal air health and social development (jan. 27, 2014) finalkimlyman
 
Hubungan kantor pusat dan cabang
Hubungan kantor pusat dan cabangHubungan kantor pusat dan cabang
Hubungan kantor pusat dan cabangfadhly arsani
 

Andere mochten auch (16)

Rainbowfish &skin button
Rainbowfish &skin buttonRainbowfish &skin button
Rainbowfish &skin button
 
Dengue fever
Dengue feverDengue fever
Dengue fever
 
Reclaim the fat
Reclaim the fatReclaim the fat
Reclaim the fat
 
Acoustic barcodes&FlatFitFab
Acoustic barcodes&FlatFitFabAcoustic barcodes&FlatFitFab
Acoustic barcodes&FlatFitFab
 
join venture
join venturejoin venture
join venture
 
Sdal molfino, emily mapping conflict onto insfrastructure
Sdal molfino, emily mapping conflict onto insfrastructureSdal molfino, emily mapping conflict onto insfrastructure
Sdal molfino, emily mapping conflict onto insfrastructure
 
Portico&video bubbles
Portico&video bubblesPortico&video bubbles
Portico&video bubbles
 
Domain Specific Language for Specify Operations of a Central Counterparty
Domain Specific Language for Specify Operations of a Central CounterpartyDomain Specific Language for Specify Operations of a Central Counterparty
Domain Specific Language for Specify Operations of a Central Counterparty
 
Presentacion Final.pptx
Presentacion Final.pptxPresentacion Final.pptx
Presentacion Final.pptx
 
Masalah khusus
Masalah khususMasalah khusus
Masalah khusus
 
Grafik analisis kebangkrutan
Grafik analisis kebangkrutanGrafik analisis kebangkrutan
Grafik analisis kebangkrutan
 
Graffiti fur
Graffiti furGraffiti fur
Graffiti fur
 
Depend&dingdong
Depend&dingdongDepend&dingdong
Depend&dingdong
 
Psychological disorder
Psychological disorder Psychological disorder
Psychological disorder
 
Sdal air health and social development (jan. 27, 2014) final
Sdal air health and social development (jan. 27, 2014) finalSdal air health and social development (jan. 27, 2014) final
Sdal air health and social development (jan. 27, 2014) final
 
Hubungan kantor pusat dan cabang
Hubungan kantor pusat dan cabangHubungan kantor pusat dan cabang
Hubungan kantor pusat dan cabang
 

Ähnlich wie Domain Specific Language for Specify Operations of a Central Counterparty(CCP)

Introduction to Contracts and Functional Contracts
Introduction to Contracts and Functional ContractsIntroduction to Contracts and Functional Contracts
Introduction to Contracts and Functional ContractsDaniel Prager
 
Human in the Loop AI for Building Knowledge Bases
Human in the Loop AI for Building Knowledge Bases Human in the Loop AI for Building Knowledge Bases
Human in the Loop AI for Building Knowledge Bases Yunyao Li
 
Smart Data Webinar: A semantic solution for financial regulatory compliance
Smart Data Webinar: A semantic solution for financial regulatory complianceSmart Data Webinar: A semantic solution for financial regulatory compliance
Smart Data Webinar: A semantic solution for financial regulatory complianceDATAVERSITY
 
Fibo proof of concept for blockchain applications
Fibo proof of concept for blockchain applicationsFibo proof of concept for blockchain applications
Fibo proof of concept for blockchain applicationsMike Bennett
 
Melbourne Datathon Challenge 2019 (Buy Low Sell High)
Melbourne Datathon Challenge 2019 (Buy Low Sell High)Melbourne Datathon Challenge 2019 (Buy Low Sell High)
Melbourne Datathon Challenge 2019 (Buy Low Sell High)Vishva Abeyrathne
 
agcXML: Organizing the Business Information of Design and Construction
agcXML: Organizing the Business Information of Design and ConstructionagcXML: Organizing the Business Information of Design and Construction
agcXML: Organizing the Business Information of Design and ConstructionMichael Tardif
 
JPX TOKYO STOCK EXCHANGE TOP PERFORMING STOCKS
JPX TOKYO STOCK EXCHANGE TOP PERFORMING STOCKSJPX TOKYO STOCK EXCHANGE TOP PERFORMING STOCKS
JPX TOKYO STOCK EXCHANGE TOP PERFORMING STOCKSkaushikdey53
 
Neural Architectures for Named Entity Recognition
Neural Architectures for Named Entity RecognitionNeural Architectures for Named Entity Recognition
Neural Architectures for Named Entity RecognitionRrubaa Panchendrarajan
 
Kafka Summit 2018: A Journey Building Kafka Connectors - Pegerto Fernandez
Kafka Summit 2018: A Journey Building Kafka Connectors - Pegerto FernandezKafka Summit 2018: A Journey Building Kafka Connectors - Pegerto Fernandez
Kafka Summit 2018: A Journey Building Kafka Connectors - Pegerto FernandezOpenCredo
 
SQL Query Optimization: Why Is It So Hard to Get Right?
SQL Query Optimization: Why Is It So Hard to Get Right?SQL Query Optimization: Why Is It So Hard to Get Right?
SQL Query Optimization: Why Is It So Hard to Get Right?Brent Ozar
 
Inventory Management
Inventory ManagementInventory Management
Inventory ManagementVishal Joshi
 
Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Arnaud Le Hors
 
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...AlexACMSC
 
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenCraig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenPostgresOpen
 
IP Driven M&A - Diligence
IP Driven M&A - DiligenceIP Driven M&A - Diligence
IP Driven M&A - DiligenceErik Oliver
 
Supporting trade finance with letters of credit on corda
Supporting trade finance with letters of credit on cordaSupporting trade finance with letters of credit on corda
Supporting trade finance with letters of credit on cordaR3
 
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...Joseph Alaimo Jr
 
Drooling for drools (JBoss webex)
Drooling for drools (JBoss webex)Drooling for drools (JBoss webex)
Drooling for drools (JBoss webex)Geoffrey De Smet
 
Eng econ lecture
Eng econ lectureEng econ lecture
Eng econ lectureArul Kumar
 

Ähnlich wie Domain Specific Language for Specify Operations of a Central Counterparty(CCP) (20)

Introduction to Contracts and Functional Contracts
Introduction to Contracts and Functional ContractsIntroduction to Contracts and Functional Contracts
Introduction to Contracts and Functional Contracts
 
PODS 2013 - Montali - Verification of Relational Data-Centric Dynamic Systems...
PODS 2013 - Montali - Verification of Relational Data-Centric Dynamic Systems...PODS 2013 - Montali - Verification of Relational Data-Centric Dynamic Systems...
PODS 2013 - Montali - Verification of Relational Data-Centric Dynamic Systems...
 
Human in the Loop AI for Building Knowledge Bases
Human in the Loop AI for Building Knowledge Bases Human in the Loop AI for Building Knowledge Bases
Human in the Loop AI for Building Knowledge Bases
 
Smart Data Webinar: A semantic solution for financial regulatory compliance
Smart Data Webinar: A semantic solution for financial regulatory complianceSmart Data Webinar: A semantic solution for financial regulatory compliance
Smart Data Webinar: A semantic solution for financial regulatory compliance
 
Fibo proof of concept for blockchain applications
Fibo proof of concept for blockchain applicationsFibo proof of concept for blockchain applications
Fibo proof of concept for blockchain applications
 
Melbourne Datathon Challenge 2019 (Buy Low Sell High)
Melbourne Datathon Challenge 2019 (Buy Low Sell High)Melbourne Datathon Challenge 2019 (Buy Low Sell High)
Melbourne Datathon Challenge 2019 (Buy Low Sell High)
 
agcXML: Organizing the Business Information of Design and Construction
agcXML: Organizing the Business Information of Design and ConstructionagcXML: Organizing the Business Information of Design and Construction
agcXML: Organizing the Business Information of Design and Construction
 
JPX TOKYO STOCK EXCHANGE TOP PERFORMING STOCKS
JPX TOKYO STOCK EXCHANGE TOP PERFORMING STOCKSJPX TOKYO STOCK EXCHANGE TOP PERFORMING STOCKS
JPX TOKYO STOCK EXCHANGE TOP PERFORMING STOCKS
 
Neural Architectures for Named Entity Recognition
Neural Architectures for Named Entity RecognitionNeural Architectures for Named Entity Recognition
Neural Architectures for Named Entity Recognition
 
Kafka Summit 2018: A Journey Building Kafka Connectors - Pegerto Fernandez
Kafka Summit 2018: A Journey Building Kafka Connectors - Pegerto FernandezKafka Summit 2018: A Journey Building Kafka Connectors - Pegerto Fernandez
Kafka Summit 2018: A Journey Building Kafka Connectors - Pegerto Fernandez
 
SQL Query Optimization: Why Is It So Hard to Get Right?
SQL Query Optimization: Why Is It So Hard to Get Right?SQL Query Optimization: Why Is It So Hard to Get Right?
SQL Query Optimization: Why Is It So Hard to Get Right?
 
Inventory Management
Inventory ManagementInventory Management
Inventory Management
 
Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618
 
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
 
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenCraig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
 
IP Driven M&A - Diligence
IP Driven M&A - DiligenceIP Driven M&A - Diligence
IP Driven M&A - Diligence
 
Supporting trade finance with letters of credit on corda
Supporting trade finance with letters of credit on cordaSupporting trade finance with letters of credit on corda
Supporting trade finance with letters of credit on corda
 
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...
 
Drooling for drools (JBoss webex)
Drooling for drools (JBoss webex)Drooling for drools (JBoss webex)
Drooling for drools (JBoss webex)
 
Eng econ lecture
Eng econ lectureEng econ lecture
Eng econ lecture
 

Mehr von Chamin Nalinda Loku Gam Hewage

Mehr von Chamin Nalinda Loku Gam Hewage (7)

Domain Specific Language for Specify Operations of a Central Counterparty(CCP)
Domain Specific Language for Specify Operations of a Central Counterparty(CCP)Domain Specific Language for Specify Operations of a Central Counterparty(CCP)
Domain Specific Language for Specify Operations of a Central Counterparty(CCP)
 
Branch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection AlgorithmsBranch And Bound and Beam Search Feature Selection Algorithms
Branch And Bound and Beam Search Feature Selection Algorithms
 
World’s Fastest Supercomputer | Tianhe - 2
World’s Fastest Supercomputer |  Tianhe - 2World’s Fastest Supercomputer |  Tianhe - 2
World’s Fastest Supercomputer | Tianhe - 2
 
Structured Cabling Technologies
Structured Cabling TechnologiesStructured Cabling Technologies
Structured Cabling Technologies
 
IP Multicasting
IP MulticastingIP Multicasting
IP Multicasting
 
Last Mile Access Technologies
Last Mile Access TechnologiesLast Mile Access Technologies
Last Mile Access Technologies
 
Big Data Social Network Analysis
Big Data Social Network AnalysisBig Data Social Network Analysis
Big Data Social Network Analysis
 

Kürzlich hochgeladen

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 

Kürzlich hochgeladen (20)

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 

Domain Specific Language for Specify Operations of a Central Counterparty(CCP)

  • 1. L.G.H.C. Nalinda 2011CS005 11000058 Domain Specific Language for Specify Operations of a Central Counterparty Supervisor: Dr. Chamath Keppetiyagama
  • 2. Domain Specific Language to Define Operations for Central Counterparty ▷Domain – Financial Market ▷Central Counterparty (CCP) – Financial Institute Financial Market Specific Language to CCP
  • 3. Road Map ▷Financial Contracts ▷Motivation ▷Research Hypothesis ▷Research Literature ▷Design ▷Representation Of CCP Operations ▷Evaluation & Analysis ▷Conclusion And Future Work
  • 5. Financial Contract ▷Financial Contract = Promise + Legal ▷Transfer $100 On 31st Dec. 2016 Future Date Promise Future Cash Flow ▷Different Contracts  Different Purposes Different Interests Contract Definitions Different Different Operations
  • 7. DSL for Finance Sector Motivation
  • 9. Peyton Jones, Marc-Eber, Julian (2000) ▷Fixed, Precisely Specified Set of Combinators (Unified Mechanism) ▷Describe a Contract ▷Process a Contract ▷Find Value of a Contract ▷Compositional Nature – (Can Glue Combinators Together) Contract Primitives + Observable Primitives IntroductionHCCL
  • 10. Primitives for Defining Contracts | HCCL IntroductionHCCL
  • 11. Primitives for Defining Observables IntroductionHCCL
  • 13. Composing ZCB “Receive £200 on Future Date t1” C1 = one GBP C2 = truncate t1 (one GBP) = truncate t1 (C1) C3 = scale 200 (truncate t1(one GBP)) = scale 200 (C2) C4 = get (scale 200 (truncate t1(one GBP))) get (C3) IntroductionComposing Contracts ZCB :: Date -> Double -> Currency -> Contract
  • 14. Contract Definitions IntroductionComposing Contracts ▷ZCB :: Date  Double  Currency  Contract ▷EU_OPTION :: Date  Contract  Contract ▷AMERICAN_OPTION :: (Date,Date)  Contract  Contract
  • 18. Operations of CCP ▷Margin Calculation Purpose : No Counterparty Default Occur At the End of Each Business Day . ▷Possibilities Dr. Trader Account Cr. Trader Account Restate to Initial Margin CCP
  • 19. Rule 9102 – Long Option Position Margin Requirement . Methodology the period to expiry is greater or equal to 9 months, 50% of the option’s time value, else 100% of the option’s time value Future Cash Flow .
  • 21. If we can use Peyton Jones’s language to compose FC/FD, we can use the same language to compose CCP Rules
  • 23. Summary IntroductionResearch Literature DSL for Finance Sector Has been a Major Requirement Since Early Days Payton, Eber, Julian HCCL Mediratta Complex Derivatives Gaillourdet Software Language Approach Bahr, Jost, Elsman Symbolic Management of Finance Contracts & Symbolic Management of Multiparty Contracts CCP Operations Have Not Yet Addressed using DSL Approach
  • 25. Rule | Design Architecture IntroductionDesign
  • 26. Seed Contract | Hypothesis IntroductionDesign
  • 29. Sell 100 Dell shares for a price of £4800 anywhere from today to 240 days from today, or DO NOTHING at all during the time
  • 30. Contract | Analysis ▷Giving user a “Choice”  Option Contract
  • 31. Compose Option Contract using HCCL ▷Receive £ 4800 : C1 = (Get (Scale (Obs [4800.0]) (One GBP))) ▷Transfer(Sell) 100 Dell Shares : C2 : (Give (Scale(Obs [100.0]) (OneE DEL))
  • 32. Compose Option Contract using HCCL (Cntd.) ▷Composite Contract : C3 = And C1 C2 ▷Adding Option to Contract : C4 = Or C3 Zero ▷Maturity @240th day: C5 = Truncate 240 C4
  • 33. Instrument ▷Easy Way to Introduce ▷Grasp underlying rights and obligations  Name
  • 34. Option Premium ▷Amount Pay For The Instrument ▷Option Premium Is A Contract ▷Pay £ 200 To Purchase “ABC_Instrument” TruncateT ((),1) (Scale (Obs [200.0]) (One GBP))
  • 36. Data Type| Trade data Trade = Trade Instrument Contract ▷Trade Option Premium Paid – £ 200 Instrument Purchased – “ABC_Instrument” Underlying Contract – Option Created This Trade Brings To CCP
  • 37. Rights and Obligations Defined In Trade ▷Owner -Sell 100 Dell + Receive 4800 GBP or - DO NOTHING
  • 38. Trade Novation ▷Buyer | Owner – Long Position ▷Seller | Option Writer – Short Position
  • 39. Analyze Trade ▷Get Instrument From Trade ▷Get Option Premium From Trade Progress
  • 40. Analyze Instrument ▷Equity (Equity) - Dell ▷Maturity Date (Int) - 240 ▷Number Of Shares – (Obs Double) – (Obs 100.0) ▷Amount To Be Paid – (Obs Double) – (Obs 4800) ▷Currency – (Currency) – GBP (£) ▷Amount Paid (Obs Double) – (Obs 200) ▷Currency – (Currency) – GBP (£) Progress Analyze Option Premium
  • 42. Composing Rule 9102 | (a) ▷Options’ Time Value - Time Varying Quantity - Observable Double (Obs Double (eg. Obs 200)) - Compute following, Option Premium Paid (Obs Double) - lift2 Operator Of HCCL - Convert (Obs Double) to Double using Haskell inbuilt functions
  • 43. Composing Rule 9102 | (b) ▷Normal Margin (o1) - Time Varying Quantity - Observable Double (Obs Double) ▷In The Money Value (o2) - Time Varying Quantity - Observable Double (Obs Double) ▷Lesser - Observable Comparison lift2 min o1 o2
  • 48. Environment ▷Facts About Observables and Choices – Symbolic Management of Derivatives - External to the FC/FD - Direct impact on the FC/FD IntroductionResearch Literature
  • 49. Rule Equivalence(via Contract Equivalence) ▷Contract Equivalence Same Environments Two Different Contracts Contracts Are Identical In That Environment Evaluation And Analysis Patrick Bhar
  • 50. ▷Rule Equivalence Same Environments Two Different Rules Rules Are Identical In That Environment GIVEN NOVATED CONTRACT Evaluation And Analysis
  • 51. Rules Transformation (via Contract Transformation) ▷Contract Transformation Specialization Function “f” Partial Evaluation Of Contract “C”  f(C,ρ) New Environment - ρʹ Same Cash Flows Evaluation And Analysis Patrick Bhar
  • 52. ▷Rules (Seed Contract) Transformation Specialization Function “f” Partial Evaluation Of Contract “Cseed”  f(Cseed,ρ) New Environment - ρʹ Same Cash Flows Evaluation And Analysis
  • 53. Rule Decomposition(via Contract Decomposition) ▷Rule 9102 rule9102One rule9102Two Evaluation And Analysis
  • 55. Equality of Two Instruments Evaluation And Analysis
  • 56. New Instruments From Existing Instruments Evaluation And Analysis
  • 57. Data Types: Trade Evaluation And Analysis ▷Purpose – Isolating Operations That Can Perform On Data Types ▷Decouple Each Level Of Contract Management Via New Data Types ▷Only Core Operations
  • 58. Margin Calculation Engine For CCP Evaluation And Analysis
  • 61. Conclusion ▷ Proved Hypothesis – Haskell Contract Combinator Library  CCP Rules ▷DSL approach “Margin Calculation” lucrative Easy (fixed set of combinators and observables) ▷Symbolic Management Rule Equivalence Rule Transformation Rule Decomposition (Rule Monotonicity) ▷Base research for CCP Conclusion And Future Work
  • 62. Future Work ▷Put Option Only (Other Contract types) ▷Novation – Only one side analyzed - Two Option Positions - Long Option Position  - Short Option Position ??? - Netting and Position Calculation (new observables ?) ▷One Rule – Rule 9102 ▷Type Conversion ▷Margin Calculation Engine IntroductionConclusion And Future Work Mediratta CS+Finance+Maths UI Skilled People
  • 64. Q&A
  • 65. Rule Monotonicity (via Contract Monotonicity) ▷Contract Monotonicity Two Different Environments Partially Agree Given Contract Yield Same Cash Flow Evaluation And Analysis Patrick Bhar
  • 66. ▷Rule Monotonicity - Two Different Environments - Partially Agree - Given Rules Yield Same Cash Flow - GIVEN NOVATED CONTRACT Evaluation And Analysis
  • 68. Peyton Jones, Marc-Eber, Julian (2000) ▷Fixed, Precisely Specified Set of Combinators ▷Describe a Contract ▷Process a Contract ▷Find Value of a Contract ▷Compositional Nature Contract Primitives + Observable Primitives IntroductionResearch Literature
  • 69. Market Observables Evaluation And Analysis ▷Addition ▷Division ▷Minimum Gaillardet Observable Values Must Be: - Boolean - Real Number - Integer ▷Options Time Value ▷In The Money Value ▷Margin Required ▷Intrinsic Value
  • 71. Complex Derivatives ▷Mediratta – Credit Default Swap & Power Reverse Dual Currency Swap ▷Valuation – evalC :: Model  Contract - evalO :: Model  Contract More Complex Derivatives Can Compose Using Fixed Set of Combinators & Observables While Preserving Uniqueness of the Contract IntroductionResearch Literature
  • 72. Composing Rule 9102 | (a) ▷Date ▷Option’s Time Value in Double ▷Currency
  • 73. Software Language Approach ▷Peyton – Justify that FP Approach Can Use to Define and Value Derivatives - Lacking Highlighting SE Language Concepts - No Unified Approach  ▷Gaillourdet – HCCL in a SW Language Point of View - Provided a Formal Definition for the Language (Syntax) Syntax of Observables Syntax of Contract - Denotational Semantics Observables Contracts IntroductionResearch Literature
  • 74. Option Time Value ▷Time Value = Option Price – Intrinsic Value ▷Intrinsic Value – Price at which the Commodity is being traded at considered date. Observable  Obs Double ▷In the Money -> Strike Price Vs Spot Rate IntroductionResearch Literature
  • 75. After Novation ▷Buyer And Seller Treat Separately ▷Margin Calculation Is IMPORTANT ▷Constructing Core Level Contracts ( ▷Partial Contract Implementation ▷Construction of Rule Using HCCL ▷Finalizing Seed Contract ▷Generate All Possible Results Progress Work In Progress
  • 76. Operations of CCP ▷Get Instrument From Trade ▷Get Option Premium From Trade ▷Analyze Instrument Instrument Name Equity Maturity Number Of Shares Traded Amount Agree To Pay Currency ▷Analyze Option Premium
  • 77. Stakeholder Interests vs Economic Stability ▷History Enron 2007 2008 Crisis Greek Crisis ▷Minimize Risk– Effective Derivative Management ▷Computer Science Big Data Data Mining Real Time Analytics Neural Networks ++ Financial Markets
  • 78. Stock Exchanges (SE) ▷Buyers and Sellers Meet ▷Financial Contracts/ Financial Derivatives Legal Contracts Types: Futures, Options, Swaps, Swaptions, Bonds ++ CDS, PRDC Swaps ++ ▷Rules and Regulations Uncertainty Effective Derivative & Contract mgt: Financial Markets
  • 79. Effective Derivative Mgt ▷Stakeholder Expectations vs Economic Stability ▷History Enron 2007 2008 Crisis Greek Crisis ▷Rules and Regulations Uncertainty Effective Derivative & Contract mgt: Financial Markets
  • 80. Effective Derivative Mgt(Cntd.) ▷Minimize Risk ▷Types of Risk Operational, Legal Business, Financial ▷Computer Science Big Data Data Mining Real Time Analytics Neural Networks ++ Financial Markets
  • 81. ZCB(Contd.) “Pay € 100 on Future Date t2” C5 = give (scale 200 (truncate t2 (one EUR))) IntroductionQ&A Currency - €/EUR Date - t2 Action - “Pay” Amount - £200 and :: Contract -> Contract -> Contract C4 = get (scale 200 (truncate t2 (one GBP))) C5 = give (scale 100 (truncate t2 (one EUR))) C6 = and C4 C5
  • 82. Composing European Option C 7 = European (date “02 Sep 2015”) ( zcb (date “09 Nov 2016”) 0.4 GBP `and` zcb (date “12 Oct 2016”) 8.4 USD `and` zcb (date “18 Nov 2016”) 0.4 GBP `and` give (zcb (date “09 Nov 2016”) 0.4 GBP) C8 = European Option = C7 `or` zero IntroductionQ&A European :: Date -> Contract -> Contract
  • 83. Peyton Jones (Cntd) ▷Value Process – a Partial Function of Time How Much this Contract Worth Incorporate Environment Conditions Generating Information from Defined Contract ▷Abstract Evaluation – How to Translate Arbitrary Contract into a Value Process - Semantics for Contract Primitives - Semantics for Observables ▷Concrete Implementation – Implementation of Abstract Semantics - Model IntroductionResearch Literature
  • 86. Semantics for Contracts | VP IntroductionQ&A
  • 87. Semantics for Observables | VP IntroductionQ&A
  • 88. Denotational Semantics | Gaillourdet IntroductionQ&A
  • 89. Software Language Approach (Cntd.) ▷Observable Value – Boolean | Real | Integer ▷Time – Natural Number ▷Constant K – Boolean | Real | Integer ▷Unknown Observables – “S” ▷Binary Operators & Comparison Operators – Two Arguments of Same Type - Binary – Returns Same Type - Comparison – Returns Boolean ▷Unary – One Argument and Return Same Type ▷Type Casting – (C2D o | D2C o) IntroductionResearch Literature
  • 90. Software Language Approach (Cntd.) ▷Denotational Semantics – Map Each of Programs to Mathematical Object - Denotation for Observables - Denotation for Contracts ▷Denotation for Observables – (S  N  V)  ( N  V ) ▷Denotation for Contracts – (S  N  V)  ( N  D ) ▷“e” – Environment IntroductionResearch Literature
  • 91. Symbolic Contract Management ▷Symbolic Contract Management – Why symbolic – Ease of Expressing - Denotational Semantics Information - Expression (Set of Symbols) - Monotonicity (Europe vs Asia) ▷Contract Management and Analysis - Contract Equivalence - Inferring Contract Properties - Contract Dependence (Observables Affect on Cash Flows) - Contract Causality (Future Observable) - Contract Horizon (Life Time) ▷Contract Transformation – Specialization & Reduction IntroductionResearch Literature
  • 93. Architecture | Motivation IntroductionQ&A
  • 95. (Obs Double) to Double ▷Contracts (Double) Amount Paid # of Shares Traded ++ ▷Extracted Values + Computations (Obs Double) Time Value Intrinsic Value ++ eg: The Lesser of Normal Margin And In The Money Value Methodology
  • 96. (Obs Double) to Double (Cntd.) ▷Double  (Obs Double) konst ▷(Obs Double)  (Double) Our Own Function Methodology
  • 97. (Obs Double) to Double (Cntd.) Methodology A : Show a => a -> String (String representation of the value) B : matchRegex (Regex  String  Maybe[String]) "[-+]?([0-9]*.[0-9]+|[0-9]+)“ C : fromJust :: Maybe a -> a D : Operator (!!) E : read a :: Double

Hinweis der Redaktion

  1. Expectations vs Stability Stakeholders may make higher profits Financial Contract / Financial Derivative Enron -> Falsify their profits, illegal documentation 2007 -> Legal loopholes, power centralization with limited player Greek  Monetary and Fiscal policies adhere to EU regulations  Solite Rules and Regulations Why  Environment is uncertain, Satisfy conditions to become eligible Effective derivative contract mgt:  Meet stakeholder expectations
  2. Let’s look at the corporate sector financial markets
  3. This is an example of a future date proime that is legally binded.
  4. Up to this point, (4) we have seen How FM evolved What kind of Derivatives are trading Stakeholder Groups and Interests Risk High Economic Segment Contract Mgt is Important Computer Science is Promising
  5. DSL for Finance Sector Unified Mechanism for Defining Contracts DSL to Embed Properties of Contracts Benefits Simple Valuation … Complex Back-End Operation Management
  6. We ‘ve seen DSL is favorable approach to adapt. HCCL facilitates -> DSL approach to FC , to deine Contracts and define Operations of FC
  7. Library Offers -> fixed Define Observables, Scaling Observable -> Time varying quantity, value is objective
  8. Explain that we can use these to define contrac
  9. Two edges of the sails are stitched to the radial lines and the other two edges are free. The edge facing the parachute skirt is called the leading edge and the edge facing the vent is called the trailing edge.
  10. The Combinators Can Glue together
  11. Pay -> Cash outflow One Single Line we can define a contract
  12. Last section ,
  13. Trader A sees growth in DELL share in the time to come. So thought of bying DELL shares at There Trader B in the market who is willing to sell DELL share to the price Trader A willing to purchase Decides today , to buy X amount of DELL shares at Future Date t, for a Specific price Per share At future date t, A wishes to exercise contract, but B says no, or vice versa, Counter party risk
  14. Trader A and Trader B goes to reliable trusted party Contract Counter Party. What CCP does, initial contract  make it two (Contract Novation) For a trade - CCP buyer and Seller at same time. One con
  15. CCP is a highly regulated institutes Traders needed to satisfy certain criteria to become members of CCP Derivatives are subjected to Rules  Rule Books Margin Calculation Derivative has a life period of n time. At the end of each business day Margin Calculated according to rules specified. Margin -> How to make sure that counterparty default does not occur, incorporate uncertainty. Explain Possibilities
  16. Explain Long Option Position Margin Requirement is a cash flow The Rule, by itself reflects a future cash flow
  17. And there by Operations of CCP Specify Operations of a CCP Using a Domain Specific Language approach
  18. Most important reseach related to my research will be highlighted
  19. CCP Operations are Summation of all these Respective Research Areas
  20. Target -> Checks applicability Input  what are the necessary inputs (expiry, current date) Logic  Hypothisis – rule implementation using payton jones
  21. Research Hypothesis ================ Rule is a finance Contract -> Daily margin calculation
  22. Up to this point, (4) we have seen How FM evolved What kind of Derivatives are trading Stakeholder Groups and Interests Risk High Economic Segment Contract Mgt is Important Computer Science is Promising
  23. The example contract that we choose in our research is this. The contract is , selling 100 dell shares, for 4800 GBP at future date 240
  24. When analyzing the above contract, we can clearly see to major parts. major parts: buy and sell + do nothing (mee slide eke kiyanna, methane contract 2k tiyanawa kiyala) Building block of the previously defined contracts Futher, we can see, there are two contracts in the this contract as well, selling 100 Del and reciving money
  25. Option Contract , clearly see the two options
  26. Describing the rights and obligations of contracts evertime when needed, is a tedious task (repeating number of shares, amount to be paid, share type). Complex ones may be even more harder. So, via a name it’s easy to introduce a contract  Instruments Easy way of introducing to the market. In Haskell we can define data type as follows: Data type name | Data tye constructor From this way we add the defined contract to a new context called, Instrument. The defined contract is introduced to the market in the form of an instrument. Market players knows the inherent properties of this instrument, the commodity, number of shares traded. At this point we created our Instrument.
  27. Market participant would willing to pay for the instrument Cash flow – Now, we have an instrument in the market , also a buyer who is willing to pay option premium to purchase the instrument.
  28. Option Writer (Seller) – Introduce Instrument to Market Buyer – Pay the Premium And Purchase The Option Buyer Is The OWNER Of Instrument ========================= Here we are dealing with two data types, Instrument and Option Premium , to represent this trade we create another data type called trade.
  29. This trade is brings to CCP To represent this trade, we created a new data type called Trade Trade data type takes, has the value constructor Trade, that takes two input arguments, The first argument is of data type Instrument. The option premium paid 200 GBP and Instrument ABC is wrapped in this data type Trade.
  30. LET’S LOOk at the rights and obligations specified in this trade. The owner of this ABC instrument has following rights and obligations. Since he purchased the instrument by paying option premium. Owner has the right of selling, 100 Dell and receive 4800 GBP from option writer. =========================== But default risk is there, CCP undertake this risk by novating the above contract and acting as the middle party.
  31. Now the both buyer and seller deals with , CCP. Here CCP act as the seller to original buyer and buyer to original seller. At this time CCP regulations open a state called Long Position to Buyer and state call Short position to Seller. That is the legal requirement. Now buyer and seller treat sepeartely.
  32. How we did in our research. We create the data type trade to incorporate the scenario of , purchasing instrument by paying Option Premium. Our research we use HCCL and Haskell to their optimum level. We use Haskell pattern matching technique to extract the needed results. For example, to obtain the instrument from trade, we defind function as follows, Similarly to obtain option premium, we defined function getInstrumentPremiumFromTrade function. Accordig to the pattern specified in the function, it retrieves Instrument, this function contract
  33. In design phase we identified, it is needed to identify inputs for the rule from the original contract/trade. This analysis is carried our for that. Similarly defining set of functions and following Haskell pattern matching technique, we extracted following from both Instrument and Option Premium. For example, the underlying equity, Del, maturity date, 240 , With in bracket I specify the , data type of the corresponding values.
  34. Th
  35. Option time value compute from the amount spent for Option Premium. When economic conditions get vary, this amout we pay for the premium is also get vary. Hence it is also an observable
  36. We define rule9102One to determine the cash flow semantic with respect to
  37. Th
  38. Using combinators, scale, one, and, truncate we prove the amount of adjustment. Furter in our way, we used Haskell library inbuilt function in performing compuations
  39. And there by Operations of CCP Specify Operations of a CCP Using a Domain Specific Language approach
  40. Up to this point, (4) we have seen How FM evolved What kind of Derivatives are trading Stakeholder Groups and Interests Risk High Economic Segment Contract Mgt is Important Computer Science is Promising
  41. CCP is a highly regulated institutes Traders needed to satisfy certain criteria to become members of CCP Derivatives are subjected to Rules  Rule Books Margin Calculation Derivative has a life period of n time. At the end of each business day Margin Calculated according to rules specified. Margin -> How to make sure that counterparty default does not occur, incorporate uncertainty. Explain Possibilities
  42. CCP is a highly regulated institutes Traders needed to satisfy certain criteria to become members of CCP Derivatives are subjected to Rules  Rule Books Margin Calculation Derivative has a life period of n time. At the end of each business day Margin Calculated according to rules specified. Margin -> How to make sure that counterparty default does not occur, incorporate uncertainty. Explain Possibilities
  43. CCP is a highly regulated institutes Traders needed to satisfy certain criteria to become members of CCP Derivatives are subjected to Rules  Rule Books Margin Calculation Derivative has a life period of n time. At the end of each business day Margin Calculated according to rules specified. Margin -> How to make sure that counterparty default does not occur, incorporate uncertainty. Explain Possibilities
  44. CCP is a highly regulated institutes Traders needed to satisfy certain criteria to become members of CCP Derivatives are subjected to Rules  Rule Books Margin Calculation Derivative has a life period of n time. At the end of each business day Margin Calculated according to rules specified. Margin -> How to make sure that counterparty default does not occur, incorporate uncertainty. Explain Possibilities
  45. CCP is a highly regulated institutes Traders needed to satisfy certain criteria to become members of CCP Derivatives are subjected to Rules  Rule Books Margin Calculation Derivative has a life period of n time. At the end of each business day Margin Calculated according to rules specified. Margin -> How to make sure that counterparty default does not occur, incorporate uncertainty. Explain Possibilities
  46. To make instrument, while preserving contract properties Market players knows the rights and obligations of the underlying contract of the instrument. Complex Contracts – Hard to Illustrate Name Of The Instrument  Rights & Obligations of Contract Identical Names – Similar Instruments && Similar Contracts Similar Contracts Can Have Different Instrument Names
  47. To make instrument, while preserving contract properties Market players knows the rights and obligations of the underlying contract of the instrument.
  48. To make instrument, while preserving contract properties Market players knows the rights and obligations of the underlying contract of the instrument.
  49. To make instrument, while preserving contract properties Market players knows the rights and obligations of the underlying contract of the instrument.
  50. HCCL driven DSL architecture for CCP
  51. Up to this point, (4) we have seen How FM evolved What kind of Derivatives are trading Stakeholder Groups and Interests Risk High Economic Segment Contract Mgt is Important Computer Science is Promising
  52. Absence of a DSL – Separate mechanisms are there to represent each contract Drawback -> When a new Derivative comes to the market, it’s again need to create new mechanism to represent it. Suppose 3 management mechanisms such as valuation, deduction et. , for each combination of activities, separate programs needs to write With DSL One Unified mechanism to Define All Derivatives. What ever the derivative, it will be constructed , utilizing the mechanism, The processing activities will also based on same mechanism Total Number of Programs can be reduced  Effective Contract Management New contract/processing arrive, same mechanism will be used to to define and process contract
  53. Large Number of Contracts / Derivatives How are we going to define them, Each Derivative Different Definition How to preserve the properties of each derivative, incorporate complexity, uncertainity Eventhough successfully defined, the processing/managemt becomes even cumbersome task DSL for Finance Sector To eliminate ambiguities and complexities of defining contracts  Unified mechanism suggest
  54. CCP is a highly regulated institutes Traders needed to satisfy certain criteria to become members of CCP Derivatives are subjected to Rules  Rule Books Margin Calculation Derivative has a life period of n time. At the end of each business day Margin Calculated according to rules specified. Margin -> How to make sure that counterparty default does not occur, incorporate uncertainty. Explain Possibilities
  55. Properties of contracts of contracts
  56. Let’s look at the corporate sector financial markets
  57. Define Observables, Scaling Observable -> Time varyig quantity, value is objective
  58. To make instrument, while preserving contract properties Market players knows the rights and obligations of the underlying contract of the instrument.
  59. Define Observables, Scaling Observable -> Time varyig quantity, value is objective
  60. Justifies the applicability of HCCL for complex derivatives. There will be more derivatives, more complex, Identify the cash flow semantics -> precisely define the cash flows, ,  so it can use to
  61. We define rule9102One to determine the cash flow semantic with respect to
  62. Peyton -> Sense of implementation flavor. - Lacking will lead to divese set of approaches, Different researcher can come up with their own approach,  not unified, not suitable in the long term, Gaillourdet -> SW point -> to make it a uniform process Syntax – arrangement of words so that they make meaningful sentences.
  63. Peyton -> Sense of implementation flavor. - Lacking will lead to divese set of approaches, Different researcher can come up with their own approach,  not unified, not suitable in the long term, Gaillourdet -> SW point -> to make it a uniform process Syntax – arrangement of words so that they make meaningful sentences.
  64. Design – seed, contract reduction specialization support Contract equivalances Infor more contracts Symbolic management Matter of jst simulating the environment
  65. This trade is brings to CCP To represent this trade, we created a new data type called Trade
  66. Expectations vs Stability Stakeholders may make higher profits Financial Contract / Financial Derivative Enron -> Falsify their profits, illegal documentation 2007 -> Legal loopholes, power centralization with limited player Greek  Monetary and Fiscal policies adhere to EU regulations  Solite Rules and Regulations Why  Environment is uncertain, Satisfy conditions to become eligible Effective derivative contract mgt:  Meet stakeholder expectations
  67. Buyer and Seller A place where parties with different interest meet with each other. (Not the conventional buyer and seller) Happens through brokerage firms, a legal corporation that undertakes interest of others Give an example (one party wishes to sell crude oid, other party wishes to buy crude oil in exchange for Gold) Financial Contract / Financial Derivative Contract  Legal Obligations where parties are bind to satisfy at future date Types: explain each of these type (each type has their own deliverables, responsibilities obligations) CDS -> The two derivatives given are highly traded derivatives. (more derivatives will evolve, meet demands  why there will be more devatives  uncertainity in the economy Rules and Regulations Why  Environment is uncertain, Satisfy conditions to become eligible Effective derivative contract mgt:  Meet stakeholder expectations
  68. Expectations vs Stability Stakeholders may make higher profits Financial Contract / Financial Derivative Enron -> Falsify their profits, illegal documentation 2007 -> Legal loopholes, power centralization with limited player Greek  Monetary and Fiscal policies adhere to EU regulations  Solite Rules and Regulations Why  Environment is uncertain, Satisfy conditions to become eligible Effective derivative contract mgt:  Meet stakeholder expectations
  69. Minimize Risk 100% is extremely unlikely, minimize to maximum scale Types of Risks Operational -> Legal -> Business -> Financial -> Computer Science Big Data Concepts High Volumes, Wide Variety, Rapid Velocity (3Vs) Data Mining -> Customer Churn Analysis, Storck Market Predictions Real Time Analytics -> Fraud Detection, Bankruptcy predictions Nueral Networks -> So call AI applications in Stock Markets () CS is a dominant pillar
  70. Pay -> Cash outflow One Single Line we can define a contract
  71. This European contract represent, 3 receipts and one payment, hodler can decide at date 2 Sep 2015, whether to receive it or not.
  72. Value Process -> Partial Function of Time Abstract -> Use contract primitives and observables to define contract. What are the semantic given to these value process. There n Concrete Implementation – Model, model incorporate the time factor, (model models an observable) Model -> Forex Mode, Interest Rate Model
  73. Entire Value Process in a nutshell Here two main important point, What are evaluation semantics Model
  74. Model – models an observable that is an external to the contract over time. Model – y model is lattice ?, each node, a value in time, each step -> a point in time construction is solely depend on valuers intension,  Compare the two
  75. Denotation is equivalent to Value Process in Peyton Jones Research, This research -> discussed in views of SE Language approach Model value process mathematically Denotation Observables – Value of unknown Observable -> to its time values Example – Int rate fluctuations over time model in mathematically Unknown observable – S – Int rate Time – N (natural number V - Set of values Trhough a model, set of values at each time step. Denotation of Contracts -> Contract – series of cash flows Through a model , contract values at each time point. (Domain D of the Denotation of Contracts)
  76. The information generated from Denotational Semantics will be used for symbolic contract mgt. Contract Mgt: Equivalence – 2 different contracts, semantics are total – same cash flows Inferring Properties – Deduce properties from denotational semantics Transformation: - Transform to much smaller contracts At denotation – Different contracts at different time periods  management more easy (simpler contracts)
  77. Specialization -> As time progress -> more info about environment -> more accurate -> replace environment -> better management C contract specialized to f(c,rho) -> but will give same cash flows as C, we can replace C with F(c,rho) because more infor better management Reduction – Advance contract by one period -> the total contract semantics = semantics of C at period 1 + semantics of contract C’ over (n-1) time
  78. We scale values of type “Double” Computations : lift lift2
  79. Type Double is wrapped in a context To take value Double out form this context there was no function I the library. Convert the data type (Observable Double) --> Data type Double
  80. Goal utilize exiting Haskell functions and operations to their optimum level. C: removes the Maybe wrapper Purpose:: HCCL doesn’t have this option. This is an approach that we propose through our research. To apply lib to CCP operations