counterparty credit risk (ccr) with matlab production server › content › dam › mathworks ›...
Post on 03-Jul-2020
23 Views
Preview:
TRANSCRIPT
1 © 2013 The MathWorks, Inc.
Counterparty Credit Risk (CCR) with
MATLAB Production Server
Brendan Hannigan and Gabo Lopez-Calva
2
Outline
Counterparty Credit Risk (CCR)
Introduction to MATLAB Production Server
Scaling CCR to Enterprise
Summary and Conclusions
3
CCR Workflow Overview
CCR: Credit-risk assessment of OTC instruments
Credit Valuation Adjustment (CVA): Expected loss
Price Portfolio (each date, each
instrument, each
scenario)
Get Default
Probabilities
Determine
CVA
Compute
Exposures
Simulate Risk
Factors
4
CCR Example in MATLAB
Goal: Compute exposure profiles & CVA for each
counterparty
5
CCR Example
Simulation
– Hull-White 1-factor model
– 1,000 scenarios
– 1 year monthly, 6 more years quarterly
Pricing
Default Prob CVA
Exposures Simulation
6
CCR Example
Pricing
– IR Swap Portfolio
– 5 Counterparties
– Netting Agreements
Pricing
Default Prob CVA
Exposures Simulation
Instruments
D
a
t
e
s
7
CCR Example
Exposure
– EE, PFE, EPE, etc.
– Exposure contributions,
counterparty and instrument
level
Pricing
Default Prob CVA
Exposures Simulation
8
CCR Example
CVA
– Default probability calibrated to CDS spreads
– CVA calculation
Pricing
Default Prob CVA
Exposures Simulation
Simulation Time
Default Probability Density
Simulation Time
Discounted Exposure
𝐶𝑉𝐴 = (1 − 𝑅) 𝐷𝑖𝑠𝑐𝐸𝑥𝑝 𝑡 𝑑𝑃𝐷(𝑡)𝑇
0
9
Enterprise Challenges
Accessing large data
Responding to new requirements
Maintaining software version
Supporting multiple use cases
10
Potential Solutions
11
Ideal Solution
Small data transfers
– Server and database collocated
Flexible analytics
Centralized analytics
Multiple interfaces
Scalable
12
What is MATLAB Production Server?
Enterprise framework for running packaged MATLAB programs
Server software
– Manages packaged MATLAB programs & worker pool
Runtime libraries
– MATLAB Compiler Runtime (MCR)
Lightweight client library (.NET & Java)
– Request MATLAB programs (functions)
.NET
MATLAB Production Server
Request
Broker
&
Program
Manager
13
Counterparty Risk & MATLAB Production Server
Web
Server
Application
Server
Database Server
Pricing
Risk
Analytics
Scenario
Generation
MATLAB Production Server
MATLAB
Compiler
Web Applications
(Risk Manager)
Desktop Applications
(Trader)
Batch Applications
(Overnight Simulations)
14
Use Case: Risk Manager
Goal: Monitor exposure profiles and CVA for each
counterparty
Web front end
15
Risk Manager: Architecture
Architecture
Other risk management use cases:
– CVA sensitivity analysis
– Different simulation models / calibration methods
– What-if scenarios, stress scenarios
Web
Server
MATLAB Production Server
Request
Broker
&
Program
Manager
Database Server
16
Use Case: Trader
Spreadsheet front end
Analyze a new trade
– Compute CVA
Up front charge
Running spread
– Compute new exposures
17
Trader: Architecture
VB to the .NET client library
Adds trade to portfolio
New exposures & CVA
Small data transfer
18
Use Case: The Developers
MATLAB Developer
– Goal: Develop and deploy new analytics
– Tools: MATLAB, MATLAB Compiler
Java / .NET Developer
– Goal: Build interfaces for new analytics
– Tools: Java, .NET, Excel, …
System Administrators
– Goal: Support software installation and maintenance
– Tools: MATLAB Production Server, other software
19
Algorithm
Use Case: The Developers
MATLAB
Developer
Production
MATLAB Production Server
MATLAB Production Server
CTF CTF
Application
Development
Production
Application
Client
Library
.NET or JAVA
Developer
MATLAB
Compiler
System
Administrator CTF
CTF
Client
Library
20
Summary
Counterparty credit risk is a big problem
– Large data
– Lots of users
– Changing landscape
MATLAB is a great development environment
End-to-end workflow support
– Research & develop analytics in MATLAB
– Enterprise deployment with MATLAB Production Server
top related