certified symbolic management of financial multi party
play

Certified Symbolic Management of Financial Multi-Party Contracts - PowerPoint PPT Presentation

Certified Symbolic Management of Financial Multi-Party Contracts Patrick Bahr 1 Jost Berthold 2 Martin Elsman 3 1 IT University of Copenhagen 2 Commonwealth Bank of Australia 3 University of Copenhagen ICFP 2015 Example: American Option Contract


  1. Certified Symbolic Management of Financial Multi-Party Contracts Patrick Bahr 1 Jost Berthold 2 Martin Elsman 3 1 IT University of Copenhagen 2 Commonwealth Bank of Australia 3 University of Copenhagen ICFP 2015

  2. Example: American Option Contract in natural language ◮ At any time within the next 90 days, ◮ party X may decide to ◮ buy EUR 100 from party Y, ◮ for a fixed rate 1 . 1 of USD. 2 / 13

  3. Example: American Option Contract in natural language ◮ At any time within the next 90 days, ◮ party X may decide to ◮ buy EUR 100 from party Y, ◮ for a fixed rate 1 . 1 of USD. Translation into our contract language if obs ( X exercises option , 0) within 90 then 100 × (EUR( Y → X ) & (1 . 1 × USD( X → Y ))) else ∅ 2 / 13

  4. Example: American Option Contract in natural language ◮ At any time within the next 90 days, ◮ party X may decide to ◮ buy EUR 100 from party Y, ◮ for a fixed rate 1 . 1 of USD. Translation into our contract language if obs ( X exercises option , 0) within 90 then 100 × (EUR( Y → X ) & (1 . 1 × USD( X → Y ))) else ∅ 2 / 13

  5. Example: American Option Contract in natural language ◮ At any time within the next 90 days, ◮ party X may decide to ◮ buy EUR 100 from party Y, ◮ for a fixed rate 1 . 1 of USD. Translation into our contract language if obs ( X exercises option , 0) within 90 then 100 × (EUR( Y → X ) & (1 . 1 × USD( X → Y ))) else ∅ 2 / 13

  6. Example: American Option Contract in natural language ◮ At any time within the next 90 days, ◮ party X may decide to ◮ buy EUR 100 from party Y, ◮ for a fixed rate 1 . 1 of USD. Translation into our contract language if obs ( X exercises option , 0) within 90 then 100 × (EUR( Y → X ) & (1 . 1 × USD( X → Y ))) else ∅ 2 / 13

  7. Example: American Option Contract in natural language ◮ At any time within the next 90 days, ◮ party X may decide to ◮ buy EUR 100 from party Y, ◮ for a fixed rate 1 . 1 of USD. Translation into our contract language if obs ( X exercises option , 0) within 90 then 100 × (EUR( Y → X ) & (1 . 1 × USD( X → Y ))) else ∅ 2 / 13

  8. Example: American Option Contract in natural language ◮ At any time within the next 90 days, ◮ party X may decide to ◮ buy EUR 100 from party Y, ◮ for a fixed rate 1 . 1 of USD. Translation into our contract language if obs ( X exercises option , 0) within 90 then 100 × (EUR( Y → X ) & (1 . 1 × USD( X → Y ))) else ∅ 2 / 13

  9. Example: American Option Contract in natural language ◮ At any time within the next 90 days, ◮ party X may decide to ◮ buy EUR 100 from party Y, ◮ for a fixed rate 1 . 1 of USD. Translation into our contract language if obs ( X exercises option , 0) within 90 then 100 × (EUR( Y → X ) & (1 . 1 × USD( X → Y ))) else ∅ 2 / 13

  10. Goals ◮ Combinators that capture financial contracts ◮ time constraints ◮ external events/data ◮ multi-party ◮ portfolios 3 / 13

  11. Goals ◮ Combinators that capture financial contracts ◮ Symbolic analysis of contracts 3 / 13

  12. Goals ◮ Combinators that capture financial contracts ◮ Symbolic analysis of contracts ◮ Certified implementation 3 / 13

  13. Overview ◮ Denotational semantics based on cash-flows ◮ Type system � causality ◮ Reduction semantics ◮ Formalised in the Coq theorem prover ◮ Certified implementation via code extraction 4 / 13

  14. An Overview of the Contract Language Contract combinators ◮ ∅ ◮ a ( p → q ) ◮ c 1 & c 2 ◮ e × c ◮ if e within d then c 1 else c 2 5 / 13

  15. An Overview of the Contract Language Contract combinators ◮ ∅ ◮ d ↑ c ◮ a ( p → q ) ◮ let x = e in c ◮ c 1 & c 2 ◮ e × c ◮ if e within d then c 1 else c 2 5 / 13

  16. An Overview of the Contract Language Contract combinators ◮ ∅ ◮ d ↑ c ◮ a ( p → q ) ◮ let x = e in c ◮ c 1 & c 2 ◮ e × c ◮ if e within d then c 1 else c 2 Expression Language Real-valued and Boolean-valued expressions, extended by obs ( l , d ) observe the value of l at time d acc ( f , d , e ) accumulation over the last d days 5 / 13

  17. Example: Credit Default Swap Bond if obs ( X defaults , 0) within 30 then ∅ else 1000 × EUR( X → Y ) 6 / 13

  18. Example: Credit Default Swap Bond if obs ( X defaults , 0) within 30 then ∅ else 1000 × EUR( X → Y ) Credit Default Swap (10 × EUR( Y → Z )) & if obs ( X defaults , 0) within 30 then 900 × EUR ( Z → Y ) else ∅ 6 / 13

  19. Example: Credit Default Swap Bond C bond = if obs ( X defaults , 0) within 30 then ∅ else 1000 × EUR( X → Y ) Credit Default Swap C CDS = (10 × EUR( Y → Z )) & if obs ( X defaults , 0) within 30 then 900 × EUR ( Z → Y ) else ∅ 6 / 13

  20. Example: Credit Default Swap Bond C bond = if obs ( X defaults , 0) within 30 then ∅ else 1000 × EUR( X → Y ) Credit Default Swap C CDS = (10 × EUR( Y → Z )) & if obs ( X defaults , 0) within 30 then 900 × EUR ( Z → Y ) else ∅ C bond & C CDS 6 / 13

  21. Example: Credit Default Swap Bond C bond = if obs ( X defaults , 0) within 30 then ∅ else 1000 × EUR( X → Y ) Credit Default Swap C CDS = (10 × EUR( Y → Z )) & if obs ( X defaults , 0) within 30 then 900 × EUR ( Z → Y ) else ∅ C bond & C CDS ≡ (10 × EUR( Y → Z )) & if obs ( X defaults , 0) within 30 then 900 × EUR ( Z → Y ) else 1000 × EUR( X → Y ) 6 / 13

  22. Denotational Semantics � · � · : Contr × Env → CashFlow � c � ρ = T 0 T 1 T 2 T 3 T 4 . . . time 0 1 2 3 4 � c � ρ ∈ CashFlow = N → Transactions T i ∈ Transactions = Party × Party × Asset → R ρ ∈ Env = Label × Z → B ∪ R 7 / 13

  23. Denotational Semantics � · � · : Contr × Env → CashFlow � c � ρ = T 0 T 1 T 2 T 3 T 4 . . . time 0 1 2 3 4 R 0 R 1 R 2 R 3 R 4 . . . � c � ρ ∈ CashFlow = N → Transactions T i ∈ Transactions = Party × Party × Asset → R ρ ∈ Env = Label × Z → B ∪ R 7 / 13

  24. Denotational Semantics � · � · : Contr × Env → CashFlow � c � ρ = T 0 T 1 T 2 T 3 T 4 . . . time − 4 − 3 − 2 − 1 0 1 2 3 4 R − 4 R − 3 R − 2 R − 1 . . . R 0 R 1 R 2 R 3 R 4 . . . � c � ρ ∈ CashFlow = N → Transactions T i ∈ Transactions = Party × Party × Asset → R ρ ∈ Env = Label × Z → B ∪ R 7 / 13

  25. Denotational Semantics � · � · : Contr × Env → CashFlow � c � ρ = T 0 T 1 T 2 T 3 T 4 . . . time − 4 − 3 − 2 − 1 0 1 2 3 4 R − 4 R − 3 R − 2 R − 1 . . . R 0 R 1 R 2 R 3 R 4 . . . ρ � c � ρ ∈ CashFlow = N → Transactions T i ∈ Transactions = Party × Party × Asset → R ρ ∈ Env = Label × Z → B ∪ R 7 / 13

  26. Denotational Semantics � · � · : Contr × Env → CashFlow � c � ρ = T 0 T 1 T 2 T 3 T 4 . . . time − 4 − 3 − 2 − 1 0 1 2 3 4 R − 4 R − 3 R − 2 R − 1 . . . R 0 R 1 R 2 R 3 R 4 . . . ρ � c � ρ ∈ CashFlow = N → Transactions T i ∈ Transactions = Party × Party × Asset → R ρ ∈ Env = Label × Z → B ∪ R 7 / 13

  27. Denotational Semantics � · � · : Contr × Env → CashFlow � c � ρ = T 0 T 1 T 2 T 3 T 4 . . . time − 4 − 3 − 2 − 1 0 1 2 3 4 R − 4 R − 3 R − 2 R − 1 . . . R 0 R 1 R 2 R 3 R 4 . . . ρ � c � ρ ∈ CashFlow = N → Transactions T i ∈ Transactions = Party × Party × Asset → R ρ ∈ Env = Label × Z → B ∪ R 7 / 13

  28. Type System Time-Indexed Types ◮ e : Real t , e : Bool t value of e available at time t (and later) ◮ c : Contr t no obligations strictly before t 8 / 13

  29. Type System Time-Indexed Types ◮ e : Real t , e : Bool t value of e available at time t (and later) ◮ c : Contr t no obligations strictly before t Typing Rules Γ ⊢ e : Real s Γ ⊢ c : Contr s t ≤ s Γ ⊢ e × c : Contr t l ∈ Label τ t ≤ s t ≤ 0 Γ ⊢ a ( p → q ) : Contr t Γ ⊢ obs ( l , t ) : τ s . . . 8 / 13

  30. Type System Time-Indexed Types ◮ e : Real t , e : Bool t value of e available at time t (and later) ◮ c : Contr t no obligations strictly before t Typing Rules Γ ⊢ e : Real s Γ ⊢ c : Contr s t ≤ s Γ ⊢ e × c : Contr t l ∈ Label τ t ≤ s t ≤ 0 Γ ⊢ a ( p → q ) : Contr t Γ ⊢ obs ( l , t ) : τ s . . . 8 / 13

  31. Reduction Semantics T ⇒ ρ c ′ = c 9 / 13

  32. Reduction Semantics T ⇒ ρ c ′ = c � c � ˆ ρ = T 0 T 1 T 2 T 3 T 4 T 5 . . . time 0 1 2 3 4 5 6 � c ′ � ˆ ρ = 9 / 13

  33. Reduction Semantics T ⇒ ρ c ′ = c � c � ˆ ρ = T 0 T 1 T 2 T 3 T 4 T 5 . . . time 0 1 2 3 4 5 6 � c ′ � ˆ ρ = 9 / 13

  34. Reduction Semantics T 0 ⇒ ρ c ′ = c � c � ˆ ρ = T 0 T 1 T 2 T 3 T 4 T 5 . . . time 0 1 2 3 4 5 6 � c ′ � ˆ ρ = 9 / 13

  35. Reduction Semantics T 0 ⇒ ρ c ′ = c � c � ˆ ρ = T 0 T 1 T 2 T 3 T 4 T 5 . . . time 0 1 2 3 4 5 6 � c ′ � ˆ ρ = 9 / 13

  36. Reduction Semantics T 0 ⇒ ρ c ′ = c � c � ˆ ρ = T 0 T 1 T 2 T 3 T 4 T 5 . . . time 0 1 2 3 4 5 6 � c ′ � ˆ ρ = T 1 T 2 T 3 T 4 T 5 T 6 . . . 9 / 13

  37. Reduction Semantics T 0 ⇒ ρ c ′ = c � c � ˆ ρ = T 0 T 1 T 2 T 3 T 4 T 5 . . . time 0 1 2 3 4 5 6 � c ′ � ˆ ρ = T 1 T 2 T 3 T 4 T 5 T 6 . . . 9 / 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend