financial-multiparty-contracts bahr-berthold-elsman dragisa-zunic

21
Certified symbolic management of financial multiparty contracts 1 Dragiˇ sa ˇ Zuni´ c Meta-CLF2 reading group February 20, 2017. 1. Research by P. Bahr, J. Berthold and M. Elsman in http://dl.acm. org/citation.cfm?id=2784747 1 / 21

Upload: dragisa-zunic

Post on 12-Apr-2017

35 views

Category:

Economy & Finance


0 download

TRANSCRIPT

Certified symbolic management of financialmultiparty contracts 1

Dragisa ZunicMeta-CLF2 reading group

February 20, 2017.

1. Research by P. Bahr, J. Berthold and M. Elsman in http://dl.acm.

org/citation.cfm?id=2784747 �� ��1 / 21

Examples :�� ��1 of 4

I we use examples from foreign exchange (FX) marketI days as a basic time unitI first we look at a forward contract

�� ��3 / 21

Examples :�� ��2 of 4

I because we want to represent American option..I the language has the conditional : if..within..then..else..I one party may, at any time before the contract ends, decide to

execute a purchase

�� ��4 / 21

Examples :�� ��3 of 4

I next we deal with an asian optionI on a set date in the future, a party may decide to buy an

underlying (or not to buy)I but the price is established from an of past prices (all the days)

�� ��5 / 21

Examples :�� ��4 of 4 (multiparty contract)

I to illustrate the multiparty aspect of the languageI consider credit default swap (CDS) on a zero-coupon bond

�� ��6 / 21

Examples :�� ��4 of 4 (multiparty contract)

I the above bond contract is denoted cbond , and CDS contractcCDS

I when we combine them as cbond&cCDS we get the contractwe wanted : CDS for a zero coupon bond

I compound contract - Y acts as both holder of the bond, andbuyer of the CDS

I Y interacts with both X and Z �� ��7 / 21

Examples :�� ��4 of 4 (multiparty contract)

I compound contract - Y acts as both holder of the bond, andbuyer of the CDS

I Y interacts with both X and Z

�� ��8 / 21

Syntax and type system

I An overview of the contract language - including theexpression sub-language

I l ∈ Label - refers to observables (eg., interest rate, X exercisesan option, etc.)

I p, q ∈ Party - refers to participants / partiesI a ∈ Asset - refers toI x ∈ Var - refers to expressions �� ��9 / 21

Syntax and type system

I we assume that each label in Label is assigned a unique typeτ , and we write Labelτ for the set of labels of type τ

I examples : “FX(USD,DKK)” ∈ LabelReal , and “X exercisesoption” ∈ LabelBool

I sometimes a party/client has control over an observable �� ��10 / 21

Syntax and type system

�� ��11 / 21

Syntax and type system

I The form let x = e in c - evaluates expression e at a currenttime, and stores the resulting value in x, for later reference inthe contract c

�� ��12 / 21

Syntax and type system

I For example, write an option contract that is cancelledas soon as a foreign exchange rate rises beyond the previouslyobserved exchange rate (threshold) :

�� ��13 / 21

Typing of expression operators

�� ��14 / 21

Denotational semantics of expressions

�� ��15 / 21

Denotational semantics of contracts : part 1

�� ��16 / 21

Denotational semantics of contracts : part 2

�� ��17 / 21

Equivalences on contracts

�� ��18 / 21

Next

I Contract causality - only allow for contracts that make sense.Namely input from the external environment of tomorrowshould not influence cash-flow of today - Such contracts arenot causal.

I eg. cash-flow today specified by an exchange rate of tomorrow

I Contract horizon - definition

I Refined original typing rules - so that the well typedcontracts are causal

I Theorem : If contract is well typed then it is causal

I Theorem : Type inference is sound and complete

�� ��19 / 21

Content of research

I an expressive multi-party contract DSL

I a type system that statically ensures the that the contractsfollow the principle of causality

I a reduction semantics that for the contract language, whichevolves contracts over time, in accordance with thedenotational semantics

I formally verified correctness : type inference, reductionsemantics, contract specialisation and horizon inference

I using the code extraction of Coq, to generate Haskel code forcontract certified analysis and transformation

�� ��20 / 21

Sources

I Certified symbolic management of financial multi-partycontracts → http://dl.acm.org/citation.cfm?id=2784747

I Implementations in Coq and Haskell →https://github.com/HIPERFIT/contracts

I Composing contracts : an adventure in financial engineering→ http://dl.acm.org/citation.cfm?id=351267

Thank you

�� ��21 / 21