Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example:...
Transcript of Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example:...
![Page 1: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/1.jpg)
1© 2016 The MathWorks, Inc.
Building, Scaling, and Implementing Risk Model and Stress Test Frameworks
By Bet Herrera Sucarrat, PhDApplication EngineerMathWorks
![Page 2: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/2.jpg)
2
Risk Communities: Manage Risk
Solvency II AIFMD EBA/CCAR EMIR Basel III IFRS 13 MIFID IIBanks
Brokers
AIFMs
Custodians/Fund AdminInsurance
AssetManagersWealthManagement
= Direct = Indirect
![Page 3: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/3.jpg)
3
REGION CB deliversstress & method
Banks to deliver stress plans
Stress Results delivered
ResultsPublished by CB
Euro Region February 2016 Q3 2016 Q3 2016
USA (CCAR) Nov 2015 5 Apr 2016 5 Apr 2016First year plans and results are combined
UK End 2015 30 Jun 2016 1st Dec 2016
Stress Testing Calendar
“CCAR submission in spring dominates Quant time. There is a workflow involved. You have to go through portfolios, apply scenarios, ….. but there is a lot needed to improve this process.”
![Page 4: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/4.jpg)
4
Model Interdependence
![Page 5: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/5.jpg)
5
ALM
Group Risk
Scenario Providers(Internal or External)
Credit Risk
Market Risk
Finance Group
Supervisors
Operational Risk
Equities
FICCRetail
Wholesale
Consultancies
Liquidity Risk
Strategy / Exec
Treasury
Organizational Interdependence
Stress Testing Team
![Page 6: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/6.jpg)
6
ChallengesBusiness ChallengesMany regulatorsShort Seasonal CyclesMultiple TeamsTransparencyReproducibilitySupervisor requestsTechnical ChallengesData Aggregation and alignmentScenarios and ModelsModel ManagementValidation and VerificationAggregationReporting and AccessExcel
![Page 7: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/7.jpg)
7
Potential SolutionsBusiness Challenges MATLAB PhilosophyMany regulators Single Stack; Easily RepurposedShort Seasonal Cycles Rapid Development with Formal MethodsMultiple Teams Common and Bespoke Interfaces to StackTransparency Readable, documented codeReproducibility Encapsulation and Objects, documented code & scriptsSupervisor requests Clear Process. Trusted numerics by industryTechnical Challenges MATLAB CapabilitiesData Aggregation Database, Tables, Reading from Multiple Formats and FeedsScenarios and Models Proven pre-built tools, Build-Your-Own; ObjectsModel Management Object Oriented ProgrammingValidation and Verification DebuggingAggregation Statistical Aggregation, DatabaseReporting and Access Report Generator, Interactive Analysis in Spreadsheets, apps
Web, Databases…Excel Managed Excel add-ins
![Page 8: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/8.jpg)
8
PROTOTYPING, MODELLING &
ANALYSIS
APPLICATION DEVELOPMENT
TESTING: VALIDATION AND VERIFICATION
(ENTERPRISE) IMPLEMENTATION
Model-Centered Research and Production Process
Our Macro Stress Testing Example
CRO; Risk Manager; Analyst
DeveloperRisk Modeller; Quant; Analyst
![Page 9: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/9.jpg)
9
Example: Stress test value portfolio of bonds
§ We want to forecast value of portfolio of bonds under distressed scenarios§ We need:
– A model of the yield curve– A way to generate scenarios– A way to apply scenarios from regulators– A way to document results and save data
![Page 10: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/10.jpg)
10
Enterprise implementation
![Page 11: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/11.jpg)
11
Give access to the models to more peopleExcel
®add-ins
Desktop
MATLABProductionServer(s)
WebServer(s)
Web & Enterprise• Royalty-free• Encryption to protect
intellectual property
![Page 12: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/12.jpg)
12
Scale up with MATLAB Production Server
Most efficient path for creating enterprise applications
Deploy MATLAB programs into production– Manage multiple MATLAB programs and versions– Update programs without server restarts– Reliably service large numbers of concurrent requests
Integrate with web, database, and application servers
§ The example seen uses – RESTful API for the request-response relationship with the server.– JSON to represent MATLAB data types.
§ Client code is written JavaScript and embedded in HTML pages.
MATLAB Production Server(s)
HTMLXML
Java Script
Web Server(s)
![Page 13: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/13.jpg)
13
Stress Test Example: Macroeconomic Modelling§ Diebold et al proposed a yield curve model with macro factors that tries to describe an economy
– We implement this for the Modelling the US Economy demo
– Vector Autoregressive Model
– Use Econometrics Toolbox§ Load and transform the data§ Partition to support backtesting§ Fit the models to the data§ Decide best model§ Make forecasts
![Page 14: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/14.jpg)
14
Process: Yield Curve Modelling – Diebold et al
§ Model the yield curve following Nelson Siegel (1987)
§ Diebold & Li (2002) showed that the yield curve could be interpreted in a dynamic fashion with time varying constants Level, Slope and Curvature
![Page 15: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/15.jpg)
15
MATLAB is Developer Friendly
![Page 16: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/16.jpg)
16
Application development
§ Use OO features to§ Hide low level implementation by model developer so that framework is easy to use by
non experts§ Save objects with data, description, model used and results for reproducibility
§ Use parallel computing to speed up the process
§ Use deployment products to give easy access to the tools developed by other teams
§ Use automatically report generator functionality to document diagnostics, test results and model outputs
![Page 17: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/17.jpg)
17
Apply models to more data
Explore
Prototype
Access Share/Deploy
Work on the desktop
Scale capacity as needed
Scale
Parallel Computing ToolboxMATLAB
MATLAB Distributed Computing Server (MDCS)
![Page 18: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/18.jpg)
18
ResultsBusiness Challenges MATLAB PhilosophyMany regulators Single Stack; Easily RepurposedShort Seasonal Cycles Rapid Development with Formal MethodsMultiple Teams Common and Bespoke Interfaces to StackTransparency Readable, documented codeReproducibility Encapsulation and Objects, documented code & scriptsSupervisor requests Clear Process. Trusted numerics by industryTechnical Challenges MATLAB CapabilitiesData Aggregation Database, Tables, Reading from Multiple Formats and FeedsScenarios and Models Proven pre-built tools, Build-Your-Own; ObjectsModel Management Object Oriented ProgrammingValidation and Verification DebuggingAggregation Statistical Aggregation, DatabaseReporting and Access Report Generator, Interactive Analysis in Spreadsheets, apps
Web, Databases…Excel Managed Excel add-ins
![Page 19: Building, Scaling, and Implementing Risk Model and Stress ...€¦ · Stress Test Example: Macroeconomic Modelling § Diebold et al proposed a yield curve model with macro factors](https://reader034.fdocuments.us/reader034/viewer/2022052106/60415758cf74ea2d5109dc82/html5/thumbnails/19.jpg)
19
Q&A
?