View
90
Download
1
Embed Size (px)
Citation preview
THIS IS YOUR PRESENTATION TITLE
L.G.H.C. Nalinda2011CS00511000058Domain 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
Expectations vs StabilityStakeholders may make higher profits
Financial Contract / Financial Derivative Enron -> Falsify their profits, illegal documentation2007 -> Legal loopholes, power centralization with limited playerGreek Monetary and Fiscal policies adhere to EU regulations Solite
Rules and RegulationsWhy Environment is uncertain, Satisfy conditions to become eligible Effective derivative contract mgt: Meet stakeholder expectations
Road MapFinancial ContractsMotivationResearch HypothesisResearch LiteratureDesign Representation Of CCP OperationsEvaluation & Analysis Conclusion And Future Work
Financial Contracts
Lets look at the corporate sector financial markets
Financial ContractFinancial Contract = Promise + Legal
Transfer $100 On 31st Dec. 2016Future Date PromiseFuture Cash Flow Different Contracts Different PurposesDifferent InterestsContract Definitions DifferentDifferent Operations
This is an example of a future date proime that is legally binded.
Motivation
Up to this point, (4) we have seen How FM evolvedWhat kind of Derivatives are tradingStakeholder Groups and InterestsRisk High Economic SegmentContract Mgt is ImportantComputer Science is Promising
DSL for Finance Sector
Motivation
DSL for Finance SectorUnified Mechanism for Defining ContractsDSL to Embed Properties of ContractsBenefitsSimple Valuation Complex Back-End Operation Management
Haskell Contract Combinator Library
We ve seen DSL is favorable approach to adapt.
HCCL facilitates -> DSL approach to FC , to deine Contracts and define Operations of FC
Peyton Jones, Marc-Eber, Julian (2000)Fixed, Precisely Specified Set of Combinators (Unified Mechanism)
Describe a ContractProcess a ContractFind Value of a Contract
Compositional Nature (Can Glue Combinators Together)
Contract Primitives + Observable Primitives
Introduction
HCCL
Library Offers -> fixed
Define Observables, Scaling
Observable -> Time varying quantity,value is objective
Primitives for Defining Contracts | HCCL
Introduction
HCCL
Explain that we can use these to define contrac
Primitives for Defining Observables
Introduction
HCCL
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.
Composing Contracts
The Combinators Can Glue together
Composing ZCBReceive 200 on Future Date t1
C1 = one GBPC2= 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)
Introduction
Composing ContractsZCB :: Date -> Double -> Currency -> Contract
Contract Definitions
Introduction
Composing ContractsZCB :: Date Double Currency Contract
EU_OPTION :: Date Contract Contract
AMERICAN_OPTION :: (Date,Date) Contract Contract
Pay -> Cash outflow
One Single Line we can define a contract
Central Counterparty
Last section ,
Absence of CCP
CCP
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 purchaseDecides 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
With CCP
CCP
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
Operations of CCP
Margin CalculationPurpose : No Counterparty Default OccurAt the End of Each Business Day.PossibilitiesDr. Trader AccountCr. Trader AccountRestate to Initial Margin
CCP
CCP is a highly regulated institutesTraders needed to satisfy certain criteria to become members of CCPDerivatives are subjected to Rules Rule Books
Margin CalculationDerivative 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
Rule 9102 Long Option PositionMargin Requirement.
Methodologythe period to expiry is greater or equal to 9 months, 50% of the options time value, else 100% of the options time value
Future Cash Flow.
Explain Long Option Position
Margin Requirement is a cash flowThe Rule, by itself reflects a future cash flow
Research Hypothesis
If we can use Peyton Joness language to compose FC/FD, we can use the same language to compose CCP Rules
And there by Operations of CCP
Specify Operations of a CCP Using a Domain Specific Language approach
Research Literature
Most important reseach related to my research will be highlighted
Summary
Introduction
Research LiteratureDSL for Finance Sector Has been a Major Requirement Since Early DaysPayton, Eber, Julian HCCLMedirattaComplex DerivativesGaillourdetSoftware Language ApproachBahr, Jost, ElsmanSymbolic Management of Finance Contracts & Symbolic Management of Multiparty ContractsCCP Operations Have Not Yet Addressed using DSL Approach
CCP Operations are Summation of all these Respective Research Areas
Design
Rule | Design Architecture
Introduction
Design
Target -> Checks applicability
Input what are the necessary inputs (expiry, current date)
Logic Hypothisis rule implementation using payton jones
Seed Contract | Hypothesis
Introduction
Design
Research Hypothesis================Rule is a finance Contract -> Daily margin calculation
Operations of CCP
Introduction
Design
Representation of CCP Operations
Up to this point, (4) we have seen How FM evolvedWhat kind of Derivatives are tradingStakeholder Groups and InterestsRisk High Economic SegmentContract Mgt is ImportantComputer Science is Promising
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
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
Contract | Analysis
Giving user a Choice Option Contract
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
Compose Option Contract using HCCLReceive 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
Option Contract , clearly see the two options
InstrumentEasy Way to Introduce
Grasp underlying rights and obligations Name
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 its 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.
Option PremiumAmount Pay For The Instrument
Option Premium Is A Contract
Pay 200 To Purchase ABC_InstrumentTruncateT ((),1) (Scale (Obs [200.0]) (One GBP))
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.
Trade Creation
Buyer Is TheOWNER
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.
Data Type| Tradedata Trade = Trade Instrument Contract
TradeOption Premium Paid 200 Instrument Purchased ABC_InstrumentUnderlying Contract Option Created
This Trade Brings To CCP
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.
Rights and Obligations Defined In Trade
Owner-Sell 100 Dell + Receive 4800 GBPor- DO NOTHING
LETS 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.
Trade Novation
Buyer | Owner Long Position
Seller | Option Writer Short Position
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.
Analyze TradeGet Instrument From Trade
Get Option Premium From Trade
Progress
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
Analyze InstrumentEquity (Equity) - DellMaturity Date (Int) - 240Number 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 ()
ProgressAnalyze Option Premium
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.
Long Option Position
Progress
Th
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
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
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 Comparisonlift2 min o1 o2
We define rule9102One to determine the cash flow semantic with respect to
Composing Rule 9102
Th
Composing Rule 9102
rule9102One
rule9102Two
rule9102Composite
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
Research Hypothesis Proved
And there by Operations of CCP
Specify Operations of a CCP Using a Domain Specific Language approach
Evaluation & Analysis
Up to this point, (4) we have seen How FM evolvedWhat kind of Derivatives are tradingStakeholder Groups and InterestsRisk High Economic SegmentContract Mgt is ImportantComputer Science is Promising
Environment Facts About Observables and Choices Symbolic Management of Derivatives- External to the FC/FD- Direct impact on the FC/FD
Introduction
Research Literature
Rule Equivalence(via Contract Equivalence)Contract EquivalenceSame EnvironmentsTwo Different ContractsContracts Are Identical In That Environment
Evaluation And Analysis
Patrick Bhar
CCP is a highly regulated institutesTraders needed to satisfy certain criteria to become members of CCPDerivatives are subjected to Rules Rule Books
Margin CalculationDerivative 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
Rule EquivalenceSame EnvironmentsTwo Different RulesRules Are Identical In That EnvironmentGIVEN NOVATED CONTRACT
Evaluation And Analysis
CCP is a highly regulated institutesTraders needed to satisfy certain criteria to become members of CCPDerivatives are subjected to Rules Rule Books
Margin CalculationDerivative 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
Rules Transformation (via Contract Transformation)Contract TransformationSpecialization Function fPartial Evaluation Of Contract C f(C,)New Environment - Same Cash Flows
Evaluation And Analysis
Patrick Bhar
CCP is a highly regulated institutesTraders needed to satisfy certain criteria to become members of CCPDerivatives are subjected to Rules Rule Books
Margin CalculationDerivative 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
Rules (Seed Contract) TransformationSpecialization Function fPartial Evaluation Of Contract Cseed f(Cseed,)New Environment - Same Cash Flows
Evaluation And Analysis
CCP is a highly regulated institutesTraders needed to satisfy certain criteria to become members of CCPDerivatives are subjected to Rules Rule Books
Margin CalculationDerivative 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
Rule Decomposition(via Contract Decomposition)Rule 9102
rule9102One
rule9102Two
Evaluation And Analysis
CCP is a highly regulated institutesTraders needed to satisfy certain criteria to become members of CCPDerivatives are subjected to Rules Rule Books
Margin CalculationDerivative 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
Data Types: Instrument
Evaluation And Analysis
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 HaveDifferent Instrument Names
Equality of Two Instruments
Evaluation And Analysis
To make instrument, while preserving contract properties
Market players knows the rights and obligations of the underlying contract of the instrument.
New Instruments From Existing Instruments
Evaluation And Analysis
To make instrument, while preserving contract properties
Market players knows the rights and obligations of the underlying contract of the instrument.
Data Types: Trade
Evaluation And Analysis
Purpose Isolating Operations That Can Perform On Data Types Decouple Each Level Of Contract Management Via New Data TypesOnly Core Operations
To make instrument, while preserving contract properties
Market players knows the rights and obligations of the underlying contract of the instrument.
Margin Calculation Engine For CCP
Evaluation And Analysis
HCCL driven DSL architecture for CCP
Conclusion and Future Work
Up to this point, (4) we have seen How FM evolvedWhat kind of Derivatives are tradingStakeholder Groups and InterestsRisk High Economic SegmentContract Mgt is ImportantComputer Science is Promising
Conclusion
Conclusion and Future Work
Absence of a DSL Separate mechanisms are there to represent each contractDrawback -> When a new Derivative comes to the market, its 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 DSLOne 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 mechanismTotal Number of Programs can be reduced Effective Contract ManagementNew contract/processing arrive, same mechanism will be used to to define and process contract
Conclusion Proved Hypothesis Haskell Contract Combinator Library CCP Rules
DSL approach Margin CalculationlucrativeEasy (fixed set of combinators and observables)Symbolic ManagementRule Equivalence Rule TransformationRule Decomposition(Rule Monotonicity)Base research for CCP
Conclusion And Future Work
Large Number of Contracts / DerivativesHow are we going to define them, Each Derivative Different DefinitionHow to preserve the properties of each derivative, incorporate complexity, uncertainityEventhough successfully defined, the processing/managemt becomes even cumbersome task
DSL for Finance SectorTo eliminate ambiguities and complexities of defining contracts Unified mechanism suggest
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
Introduction
Conclusion And Future WorkMedirattaCS+Finance+MathsUISkilled People
THANK YOU
Q&A
Rule Monotonicity (via Contract Monotonicity)Contract MonotonicityTwo Different EnvironmentsPartially AgreeGiven Contract Yield Same Cash Flow
Evaluation And Analysis
Patrick Bhar
CCP is a highly regulated institutesTraders needed to satisfy certain criteria to become members of CCPDerivatives are subjected to Rules Rule Books
Margin CalculationDerivative 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
Rule Monotonicity- Two Different Environments- Partially Agree- Given Rules Yield Same Cash Flow- GIVEN NOVATED CONTRACT
Evaluation And Analysis
Properties of contracts of contracts
Financial Markets
Lets look at the corporate sector financial markets
Peyton Jones, Marc-Eber, Julian (2000)Fixed, Precisely Specified Set of Combinators
Describe a ContractProcess a ContractFind Value of a Contract
Compositional Nature
Contract Primitives + Observable Primitives
Introduction
Research Literature
Define Observables, Scaling
Observable -> Time varyig quantity,value is objective
Market Observables
Evaluation And AnalysisAdditionDivisionMinimum
Gaillardet Observable Values Must Be:- Boolean- Real Number- Integer
Options Time ValueIn The Money ValueMargin RequiredIntrinsic Value
To make instrument, while preserving contract properties
Market players knows the rights and obligations of the underlying contract of the instrument.
Haskell Pattern Matching
Introduction
Research Literature
Define Observables, Scaling
Observable -> Time varyig quantity,value is objective
Complex DerivativesMediratta Credit Default Swap & Power Reverse Dual Currency SwapValuation evalC :: Model Contract- evalO :: Model Contract
More Complex Derivatives Can Compose Using Fixed Set of Combinators & Observables WhilePreserving Uniqueness of the Contract
Introduction
Research Literature
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
Composing Rule 9102 | (a)
Date Options Time Value in DoubleCurrency
We define rule9102One to determine the cash flow semantic with respect to
Software Language ApproachPeyton 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 ObservablesSyntax of Contract - Denotational SemanticsObservablesContracts
Introduction
Research Literature
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 processSyntax arrangement of words so that they make meaningful sentences.
Option Time ValueTime 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
Introduction
Research Literature
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 processSyntax arrangement of words so that they make meaningful sentences.
After NovationBuyer And Seller Treat Separately
Margin Calculation Is IMPORTANT
Constructing Core Level Contracts (Partial Contract Implementation
Construction of Rule Using HCCLFinalizing Seed ContractGenerate All Possible Results
ProgressWork In Progress
Design seed, contract reduction specialization supportContract equivalances Infor more contractsSymbolic management
Matter of jst simulating the environment
Operations of CCP
Get Instrument From Trade
Get Option Premium From Trade
Analyze InstrumentInstrument NameEquity MaturityNumber Of Shares TradedAmount Agree To Pay Currency
Analyze Option Premium
This trade is brings to CCP
To represent this trade, we created a new data type called Trade
Stakeholder Interests vs Economic Stability
HistoryEnron2007 2008 CrisisGreek Crisis
Minimize Risk Effective Derivative ManagementComputer ScienceBig DataData MiningReal Time AnalyticsNeural Networks ++
Financial Markets
Expectations vs StabilityStakeholders may make higher profits
Financial Contract / Financial Derivative Enron -> Falsify their profits, illegal documentation2007 -> Legal loopholes, power centralization with limited playerGreek Monetary and Fiscal policies adhere to EU regulations Solite
Rules and RegulationsWhy Environment is uncertain, Satisfy conditions to become eligible Effective derivative contract mgt: Meet stakeholder expectations
Stock Exchanges (SE)Buyers and Sellers Meet
Financial Contracts/ Financial DerivativesLegal ContractsTypes: Futures, Options, Swaps, Swaptions, Bonds ++CDS, PRDC Swaps ++
Rules and RegulationsUncertaintyEffective Derivative & Contract mgt:
Financial Markets
Buyer and SellerA 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 othersGive 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 dateTypes: 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 RegulationsWhy Environment is uncertain, Satisfy conditions to become eligible Effective derivative contract mgt: Meet stakeholder expectations
Effective Derivative MgtStakeholder Expectations vs Economic Stability
HistoryEnron2007 2008 CrisisGreek Crisis
Rules and RegulationsUncertaintyEffective Derivative & Contract mgt:
Financial Markets
Expectations vs StabilityStakeholders may make higher profits
Financial Contract / Financial Derivative Enron -> Falsify their profits, illegal documentation2007 -> Legal loopholes, power centralization with limited playerGreek Monetary and Fiscal policies adhere to EU regulations Solite
Rules and RegulationsWhy Environment is uncertain, Satisfy conditions to become eligible Effective derivative contract mgt: Meet stakeholder expectations
Effective Derivative Mgt(Cntd.)Minimize Risk
Types of RiskOperational, LegalBusiness, Financial
Computer ScienceBig DataData MiningReal Time AnalyticsNeural Networks ++
Financial Markets
Minimize Risk100% is extremely unlikely, minimize to maximum scale
Types of RisksOperational ->Legal -> Business ->Financial ->
Computer ScienceBig Data Concepts High Volumes, Wide Variety, Rapid Velocity (3Vs)Data Mining -> Customer Churn Analysis, Storck Market Predictions Real Time Analytics -> Fraud Detection, Bankruptcy predictionsNueral Networks -> So call AI applications in Stock Markets ()CS is a dominant pillar
ZCB(Contd.)Pay 100 on Future Date t2
C5 = give (scale 200 (truncate t2 (one EUR)))
Introduction
Q&ACurrency - /EURDate -t2Action - PayAmount - 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
Pay -> Cash outflow
One Single Line we can define a contract
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
)
Introduction
Q&AEuropean :: Date -> Contract -> Contract
This European contract represent, 3 receipts and one payment, hodler can decide at date 2 Sep 2015, whether to receive it or not.
Peyton Jones (Cntd)Value Process a Partial Function of TimeHow Much this Contract WorthIncorporate Environment ConditionsGenerating Information from Defined Contract
Abstract Evaluation How to Translate Arbitrary Contract into a Value Process- Semantics for Contract Primitives- Semantics for ObservablesConcrete Implementation Implementation of Abstract Semantics- Model
Introduction
Research Literature
Value Process -> Partial Function of TimeAbstract -> 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
Peyton Jones (Cntd)
Introduction
Research Literature
Entire Value Process in a nutshell Here two main important point, What are evaluation semantics Model
Peyton Jones (Cntd)
Model
Introduction
Research Literature
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 timeconstruction is solely depend on valuers intension, Compare the two
Semantics for Contracts | VP
Introduction
Q&A
Semantics for Observables | VP
Introduction
Q&A
Denotational Semantics | Gaillourdet
Introduction
Q&A
Software Language Approach (Cntd.)Observable Value Boolean | Real | IntegerTime Natural NumberConstant 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)
Introduction
Research 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
Introduction
Research Literature
Denotation is equivalent to Value Process in Peyton Jones Research, This research -> discussed in views of SE Language approachModel value process mathematically
Denotation Observables Value of unknown Observable -> to its time values Example Int rate fluctuations over time model in mathematicallyUnknown 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)
Symbolic Contract ManagementSymbolic 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
Denotation for Contracts (S N V) ( N D )
e Environment
Introduction
Research Literature
The information generated from Denotational Semantics will be used for symbolic contract mgt.
Contract Mgt:Equivalence 2 different contracts, semantics are total same cash flowsInferring Properties Deduce properties from denotational semantics
Transformation: - Transform to much smaller contractsAt denotation Different contracts at different time periods management more easy (simpler contracts)
Symbolic Contract ManagementSpecialization
Reduction
Introduction
Research Literature
Specialization -> As time progress -> more info about environment -> more accurate -> replace environment -> better managementC 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
Architecture | Motivation
Introduction
Q&A
Tree Representation
Introduction
Q&AC5AndOrOrAndC4C3C2C1
(Obs Double) to Double
Contracts (Double)Amount Paid# of Shares Traded ++
Extracted Values + Computations (Obs Double)Time ValueIntrinsic Value ++eg: The Lesser of Normal Margin And In The Money Value
Methodology
We scale values of type Double
Computations : lift lift2
(Obs Double) to Double (Cntd.)
Double (Obs Double)konst
(Obs Double) (Double)Our Own Function
Methodology
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
(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
Goal utilize exiting Haskell functions and operations to their optimum level.
C: removes the Maybe wrapper
Purpose:: HCCL doesnt have this option. This is an approach that we propose through our research. To apply lib to CCP operations