tales from the trenches hasan amjad · 2017-03-08 · sell any investment, or otherwise transact in...
TRANSCRIPT
![Page 1: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/1.jpg)
PRIVATE AND CONFIDENTIAL. NOT TO BE DISTRIBUTED
AUTHORISED AND REGULATED BY THE FINANCIAL CONDUCT AUTHORITY
01 MARCH 2017
TALES FROM THE TRENCHES HASAN AMJAD
![Page 2: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/2.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Disclaimer
2
This document is for information only and does not constitute an offer or recommendation to buy or sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future. Whilst all reasonable care has been taken to ensure that the stated facts are accurate and opinions are fair and reasonable neither Cantab Capital Partners LLP nor any of its members, partners or employees shall be responsible in any way for the contents of this document. It is not, under any circumstances, intended for distribution to the general public. All opinions and estimates included in the document are subject to change without notice and Cantab Capital Partners LLP is under no obligation to update or revise information contained in the document. Cantab Capital Partners LLP disclaims any liability for any loss, damage, costs or expenses (including direct, indirect, special and consequential) howsoever arising which any person may suffer or incur as a result of viewing or utilising any information included in this document. Cantab Capital Partners LLP is authorised and regulated by the Financial Conduct Authority in the United Kingdom (Firm Reference No 455487). Registered in England No. OC317557. Registered office: City House, 126-130 Hills Road, Cambridge, CB2 1RE, UK. © Cantab Capital Partners LLP
![Page 3: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/3.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Introduction
3
Cantab Capital is a multi-asset fund manager, with in-house execution.
![Page 4: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/4.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Presentation
4
Two modelling problems looking for a good home
■ Not from cash equity
■ But from widely traded markets
■ But concrete and simple to state
■ But lacking an elegant solution
![Page 5: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/5.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Presentation
5
Two modelling problems looking for a good home
■ Not from cash equity
■ But from widely traded markets
■ But concrete and simple to state
■ But lacking an elegant solution
And a qualitatively different problem, with a solution
![Page 6: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/6.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action
6
Price
Time
![Page 7: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/7.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action – 40x zoom
7
![Page 8: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/8.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action – 2400x zoom
8
![Page 9: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/9.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action – 72000x zoom
9
![Page 10: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/10.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action – 72000x zoom
10
Free money
for 10ms!
![Page 11: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/11.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action – 72000x zoom
11
Free money
for 10ms!
![Page 12: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/12.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action – 72000x zoom
12
Free money
for 10ms!
CANTAB to broker
A: “I’ll take that
bid”
CANTAB to broker
B: “I’ll take that
offer”
![Page 13: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/13.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action – 72000x zoom
13
Free money
for 10ms!
CANTAB to broker
A: “I’ll take that
bid”
CANTAB to broker
B: “I’ll take that
offer”
Broker A to
CANTAB: “Deal!”
![Page 14: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/14.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
OTC FX price action – 72000x zoom
14
Free money
for 10ms!
CANTAB to broker
A: “I’ll take that
bid”
CANTAB to broker
B: “I’ll take that
offer”
Broker A to
CANTAB: “Deal!”
Broker B to
CANTAB: “No deal”
![Page 15: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/15.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
The Problem
15
Free money
for 10ms!
CANTAB to broker
A: “I’ll take that
bid”
CANTAB to broker
B: “I’ll take that
offer”
Broker A to
CANTAB: “Deal!”
Broker B to
CANTAB: “No deal”
![Page 16: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/16.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Futures market price action
16
![Page 17: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/17.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Typical top of book in a futures market
17
![Page 18: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/18.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Typical top of book in a futures market
18
Number of lots on offer
![Page 19: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/19.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Typical top of book in a futures market
19
Number of lots on offer
Number of lots on bid
![Page 20: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/20.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Typical top of book in a futures market
20
Number of lots on offer
Number of lots on bid
Typical matching rule: variations on “price-time”
![Page 21: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/21.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Price action(?) in a different futures market
21
![Page 22: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/22.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Price action(?) in a different futures market
22
“one-tick” market
![Page 23: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/23.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Price action(?) in a different futures market
23
“one-tick” market
Matching rule: variations on “pro-rata”
![Page 24: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/24.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Most of the price information not found in the price
24
![Page 25: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/25.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Most of the price information not found in the price
25
“buy pressure”
![Page 26: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/26.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Most of the price information not found in the price
26
“buy pressure”
“sell pressure”
![Page 27: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/27.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Most of the price information not found in the price
27
“buy pressure”
“sell pressure”
“buy pressure”
![Page 28: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/28.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Most of the price information not found in the price
28
“buy pressure”
“sell pressure”
“buy pressure”
“Bid-offer imbalance” looks like a good indicator
![Page 29: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/29.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
The Problem
29
![Page 30: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/30.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Price action in a heavily traded futures contract
30
![Page 31: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/31.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Unorthodox price moves
31
![Page 32: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/32.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Unusually high trading volume
32
![Page 33: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/33.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Algo disaster
33
6 seconds
![Page 34: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/34.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Lifecycle of a simple order
34
initial state
await accept
place order
![Page 35: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/35.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Lifecycle of a simple order
35
initial state
await accept
await accept or cancel
active
place order
accepted
cancel request rejected
aborted
![Page 36: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/36.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Lifecycle of a simple order
36
finished
initial state
await accept
await accept or cancel
active
active, await cancel
place order
final fill accepted
rejected cancel request
filled
cancel request
aborted
![Page 37: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/37.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Lifecycle of a simple order
37
finished
initial state
await accept
await accept or cancel
active
active, await cancel
place order
final fill accepted
accepted
rejected cancel request
cancelled
filled
cancel request
aborted
![Page 38: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/38.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Lifecycle of a simple order
38
finished
initial state
await accept
await accept or cancel
active
active, await cancel
place order
final fill
final fill accepted
accepted
cancelled
rejected cancel request
cancelled
filled
filled
cancel request
aborted
![Page 39: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/39.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model Checking
39
finished
initial state
await accept
await accept or cancel
active
active, await cancel
place order
final fill
final fill accepted
accepted
cancelled
rejected cancel request
cancelled
filled
filled
cancel request
aborted
Linear Temporal Logic: “Precise provable statements about time”
![Page 40: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/40.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model Checking
40
finished
initial state
await accept
await accept or cancel
active
active, await cancel
place order
final fill
final fill accepted
accepted
cancelled
rejected cancel request
cancelled
filled
filled
cancel request
aborted
Linear Temporal Logic: F(finished)
“In the future, we will be finished”
![Page 41: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/41.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model Checking
41
finished
initial state
await accept
await accept or cancel
active
active, await cancel
place order
final fill
final fill accepted
accepted
cancelled
rejected cancel request
cancelled
filled
filled
cancel request
aborted
Linear Temporal Logic: F(finished)
“In the future, we will be finished”
![Page 42: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/42.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model Checking
42
finished
initial state
await accept
await accept or cancel
active
active, await cancel
place order
final fill
final fill accepted
accepted
cancelled
rejected cancel request
cancelled
filled
filled
cancel request
aborted
Linear Temporal Logic: G(F(finished))
“Globally in the future, we will be finished”
![Page 43: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/43.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model Checking
43
finished
initial state
await accept
await accept or cancel
active
active, await cancel
place order
final fill
final fill accepted
accepted
cancelled
rejected cancel request
cancelled
filled
filled
cancel request
aborted
Linear Temporal Logic: G(F(finished))
“Globally in the future, we will be finished”
![Page 44: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/44.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model checking
44
• Can deal with millions or even infinite number of states
![Page 45: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/45.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model checking
45
• Can deal with millions or even infinite number of states • Provably covers all execution paths (unlike standard tests)
![Page 46: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/46.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model checking
46
• Can deal with millions or even infinite number of states • Provably covers all execution paths (unlike standard tests) • Extensions
1. Boolean logic: G (order → F (accepted | rejected | cancelled ) ) 2. Arithmetic: G (accepted → 𝑓𝑖𝑙𝑙𝑠 + 𝑤𝑜𝑟𝑘𝑖𝑛𝑔 ≤ 𝑝𝑎𝑟𝑒𝑛𝑡 𝑜𝑟𝑑𝑒𝑟) 3. Concrete time: G(𝑜𝑟𝑑𝑒𝑟 𝑡𝑖𝑚𝑒 − 𝑡𝑖𝑐𝑘 𝑡𝑖𝑚𝑒 ≤ 𝑙𝑎𝑡𝑒𝑛𝑐𝑦 𝑡ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑)
![Page 47: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/47.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model checking
47
• Can deal with millions or even infinite number of states • Provably covers all execution paths (unlike standard tests) • Extensions
1. Boolean logic: G (order → F (accepted | rejected | cancelled ) ) 2. Arithmetic: G (accepted → 𝑓𝑖𝑙𝑙𝑠 + 𝑤𝑜𝑟𝑘𝑖𝑛𝑔 ≤ 𝑝𝑎𝑟𝑒𝑛𝑡 𝑜𝑟𝑑𝑒𝑟) 3. Concrete time: G(𝑜𝑟𝑑𝑒𝑟 𝑡𝑖𝑚𝑒 − 𝑡𝑖𝑐𝑘 𝑡𝑖𝑚𝑒 ≤ 𝑙𝑎𝑡𝑒𝑛𝑐𝑦 𝑡ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑)
![Page 48: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/48.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model checking
48
• Can deal with millions or even infinite number of states • Provably covers all execution paths (unlike standard tests) • Extensions
1. Boolean logic: G (order → F (accepted | rejected | cancelled ) ) 2. Arithmetic: G (accepted → 𝑓𝑖𝑙𝑙𝑠 + 𝑤𝑜𝑟𝑘𝑖𝑛𝑔 ≤ 𝑝𝑎𝑟𝑒𝑛𝑡 𝑜𝑟𝑑𝑒𝑟) 3. Concrete time: G(𝑜𝑟𝑑𝑒𝑟 𝑡𝑖𝑚𝑒 − 𝑡𝑖𝑐𝑘 𝑡𝑖𝑚𝑒 ≤ 𝑙𝑎𝑡𝑒𝑛𝑐𝑦 𝑡ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑)
![Page 49: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/49.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model checking
49
• Can deal with millions or even infinite number of states • Provably covers all execution paths (unlike standard tests) • Extensions
1. Boolean logic: G (order → F (accepted | rejected | cancelled ) ) 2. Arithmetic: G (accepted → 𝑓𝑖𝑙𝑙𝑠 + 𝑤𝑜𝑟𝑘𝑖𝑛𝑔 ≤ 𝑝𝑎𝑟𝑒𝑛𝑡 𝑜𝑟𝑑𝑒𝑟) 3. Concrete time: G(𝑜𝑟𝑑𝑒𝑟 𝑡𝑖𝑚𝑒 − 𝑡𝑖𝑐𝑘 𝑡𝑖𝑚𝑒 ≤ 𝑙𝑎𝑡𝑒𝑛𝑐𝑦 𝑡ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑)
![Page 50: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/50.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model checking
50
• Can deal with millions or even infinite number of states • Provably covers all execution paths (unlike standard tests) • Extensions
1. Boolean logic: G (order → F (accepted | rejected | cancelled ) ). 2. Arithmetic: G (accepted → 𝑓𝑖𝑙𝑙𝑠 + 𝑤𝑜𝑟𝑘𝑖𝑛𝑔 ≤ 𝑝𝑎𝑟𝑒𝑛𝑡 𝑜𝑟𝑑𝑒𝑟) 3. Concrete time: G(𝑜𝑟𝑑𝑒𝑟 𝑡𝑖𝑚𝑒 − 𝑡𝑖𝑐𝑘 𝑡𝑖𝑚𝑒 ≤ 𝑙𝑎𝑡𝑒𝑛𝑐𝑦 𝑡ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑)
• Does not require executing the computer code
![Page 51: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/51.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Model checking
51
• Can deal with millions or even infinite number of states • Provably covers all execution paths (unlike standard tests) • Extensions
1. Boolean logic: G (order → F (accepted | rejected | cancelled ) ). 2. Arithmetic: G (accepted → 𝑓𝑖𝑙𝑙𝑠 + 𝑤𝑜𝑟𝑘𝑖𝑛𝑔 ≤ 𝑝𝑎𝑟𝑒𝑛𝑡 𝑜𝑟𝑑𝑒𝑟) 3. Concrete time: G(𝑜𝑟𝑑𝑒𝑟 𝑡𝑖𝑚𝑒 − 𝑡𝑖𝑐𝑘 𝑡𝑖𝑚𝑒 ≤ 𝑙𝑎𝑡𝑒𝑛𝑐𝑦 𝑡ℎ𝑟𝑒𝑠ℎ𝑜𝑙𝑑)
• Does not require executing the computer code
There are caveats and assumptions. Talk to us!
![Page 52: TALES FROM THE TRENCHES HASAN AMJAD · 2017-03-08 · sell any investment, or otherwise transact in any investments. Past performance is not necessarily a guide to the future](https://reader034.vdocuments.site/reader034/viewer/2022042321/5f0b08857e708231d42e8579/html5/thumbnails/52.jpg)
© Cantab – Part of GAM Systematic. Authorised and Regulated by the Financial Conduct Authority.
Fin
■ Two old(-ish) problems
□ “Last Look” in OTC FX
□ Price moves in pro-rata “one tick” markets
■ One new(-ish) solution: Quality assurance using “model checking”
Any takers?
52