Building, Scaling, and Implementing Risk Model and Stress ... file3 REGION CB delivers stress &...

19
1 © 2016 The MathWorks, Inc. Building, Scaling, and Implementing Risk Model and Stress Test Frameworks By Bet Herrera Sucarrat, PhD Application Engineer MathWorks

Transcript of Building, Scaling, and Implementing Risk Model and Stress ... file3 REGION CB delivers stress &...

1© 2016 The MathWorks, Inc.

Building, Scaling, and Implementing Risk Model and Stress Test Frameworks

By Bet Herrera Sucarrat, PhDApplication EngineerMathWorks

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

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.”

4

Model Interdependence

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

6

ChallengesBusiness ChallengesMany regulatorsShort Seasonal CyclesMultiple TeamsTransparencyReproducibilitySupervisor requestsTechnical ChallengesData Aggregation and alignmentScenarios and ModelsModel ManagementValidation and VerificationAggregationReporting and AccessExcel

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

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

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

10

Enterprise implementation

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

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)

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

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

15

MATLAB is Developer Friendly

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

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)

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

19

Q&A

?