financial markets are graphs
TRANSCRIPT
Building your own Doomsday Machine with Graphs
The Big Short
Kevin Van Gundy
What was the Great Recession?
What is a Recession?
"EVERYTHING IS GOING TO BE AWESOME FOREVER!!!"
"EVERYTHING IS AWESOME"
"It's just a setback, I'm still awesome"
"I've made terrible choices"
Good Times
"EVERYTHING IS AWESOME"
Let's Talk about Graphs
Graph Theory is rooted in the methodology used by Leonhard Euler in 1735 to solve the Seven Bridges of Königsberg problem.
V4
V5
V1
V2
V3
V = { V1,V2,…,V5} E = { (V1,V2), (V2,V5), (V4,V5), (V4,V5),
(V5,V5) }
"Interesting"
The sub-prime mortgage crisis is
graph.
YOU
:Borrower
:Property
:Borrower
:Property
:Borrower
:Property
:Borrower
:Bank
:Mortgage
:Property
:Bank
:Borrower
:Mortgage
:PURCHASES
:OWES
:SECURED_BY
:HOLDS
:Property
:Bank
:Borrower
:Mortgage
:PURCHASES
:OWES
:SECURED_BY
:Property
:Borrower
:Bank:Bank
These interest payments are swell…but is there a way I
could get more cash to make more of these
awesome loans?
Collateralized Debt Obligation - CDO"A structured financial product that pools together cash flow-generating assets and repackages this asset pool into discrete tranches that can be sold to investors."
investopedia.com
:Bank
CDO
:HOLDS
Mortgages
:Bank:Bond
:Bond
:ISSUES
:COLLATERALIZED_BY
:Bond
Tranche Tranche TrancheTranche
:HOLDS
AAA
:Bond
:Bank
CDO
:Bond
:Bond
:Bond
Tranche Tranche TrancheTranche
:HOLDS:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:ISSUES
AAAA
BBB
B
:Bond
:Bond
:Bond
:HOLDS
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
CDO
:ISSUES
AAAA BBB
B
:Bond
:Bond
:Bond
:Bond
:Bond
:COLLATERALIZED BY
A
"CDO2"
:Bond
:Bond
:Bond
:Bond
:COLLATERALIZED BY
:ISSUES
:BankAAA
:Bond
:Bond
:Bond
:HOLDS
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
:Bond
CDO
:ISSUES
A BBB
B
:Bond
:Bond
:Bond
:Bond
:Bond
:COLLATERALIZED BY
A
"CDO2"
:Bond
:Bond
:Bond
:Bond
:COLLATERALIZED BY
:ISSUES
:BankAAA
RDBMS RDBMS RDBMS RDBMS
Mortgage Mortgagee
91651729 51923755192623 4279701885612763 8810735971837725 3290616949429020 6692926042494465 9913477739146181 3247551166372990 8580435088931189 5045642718175687 6111283812145664 3377241747577318 6707196039443706 5559811966256087 849122280145674 7809837143719159 2140606911659966 39861986
426710 32958244901813 71655474
32787669 9075520093491793 5402299097377090 2809449430319931 1122601594301845 26043212
Mortgage CDO
93731642 690753803 167978217 1017395136 739931295 711030481 18614291 660507740 445250794 53967482 670158644 1057905080 533824421 676315487 783496510 15464919 385272273 4
813653 980365451 1039694496 1021323306 399299958 33551715 510825810 1
CDO CDO78249394 5147696385564824 5430126357969062 1349645173998739 4238791991669472 869517248353726 917528692832666 548624139332422 56579885
83248100 8788482434092628 947001039201348 3625284722500537 767431638408927 4333683577879678 5770785056377196 5800507550534094 9441206637285127 9604462953364905 8330589271960914 357172245530002 6408825749769372 56348849378251 54931785732557 36794103
41720443 77599794
CDO CDO96060505 6675541134587321 9037691768096802 132373291440323 23002632
29280500 7794570383284299 4053371590867599 2067682619387945 111445449220061 58121014
90015438 53689103010113 16737179
42741034 885941995537961 26783548
88510223 142324046826523 24358742
82670620 7323561611152889 9067286117811221 968978285746917 4366161721903196 441569525993667 7606153
67176869 4041598467553070 9030262182871896 43308563
Mortgage CDO
59769099 546158482 881992989 193920491 280048306 135844588 1022348051 723750498 816549878 15586012 5
53514084 545861207 799792762 182696389 330434781 771725562 536378590 354112007 714487204 938519441 281261932 497156862 22404435 9
30946174 1
RDBMS
So…we just closed our eyes and hoped
for the best
"EVERYTHING IS GOING TO BE AWESOME FOREVER!!!"
It wasn't awesome.
Is there a better way?
Yes.
Graph Databases
MATCH (c:CDO)-[:COLLATERALIZED_BY*]->(m:Mortgage)WHERE c.rating IN ['A','AAA']
WITH c, avg(m.applicantCreditScore) as avgCreditScoreWHERE avgCreditScore > 500
RETURN c
Since that ship has sailed…
What else are Graphs?
Asset Graph
Bondz
HAS_
INTE
REST
Hedge
Fund
MutualFund
Stock
OWNS
OWNS
Stock
ETF
OWNS
OWNS
Stock
ISSUES
HAS
Options
ON
ISSUES
COMPANY
HAS
OWNS
#1 Asset Graph
#1 Asset Graph
Customer Graph
Manager
Research
VP
Dallas
Director
United States
Central
Region
CEO
North America
Strategy
ANALYST
Wholesale
Banking
Texas
#2 Customer Graph
business meet
Payment Graph
#3 Payment Graph
SMB
SMB
SMB
SMB
SMB
SMB
SMB
SMB
Amount: $18,000
Transactions: 10
Amount: $22,000
Transactions: 200
SOLD_TO
SOLD_TO
SOLD_TO
Amount: $32,000Transactions: 170
Amount: $22,000
Transactions: 200
SOLD_TO
SMB
SMB
SMB
Amount: $8,000
Transactions: 14SOLD_TOAmount: $24,000Transactions: 11
SOLD_TO
Amount: $17,000
Transactions: 300
SOLD_TO
Amount: $11,000
Transactions: 1
99
SOLD_TO
Am
ount: $15,000Tr ansactions: 10
SOLD
_TOA
mount: $15,000
Transactions: 10
SOLD
_TO
A Graph of Money Laundering#3 Payment Graph
Master Data Graph
Systems Planning, Impact Analysis, Data Governance, Micro-Services
Enterprise Architecture | System of Systems
#4 Master Data Graph
#4 Master Data Graph
• Organizational Structures including sales territories, reporting structures, geography
• Product Structures including product & feature hierarchies, time dimension
• Network Inventories including configuration management, physical and logistics networks
Enterprise Hierarchies
What have we learned?
Graph Theory is "Interesting"
The causes of sub-prime
mortgage crisis
and most importantly…
Graphs Databases are the Answer
Thank You!