Credit Risk Modeling with MATLAB Martin Demel, Application Engineer 95% VaR: $798232. 95% CVaR: $1336167. AAA 93.68% 5.55% 0.59% 0.18% AA 2.44% 92.60% 4.03% 0.73% 0.15% 0.06% -1 0 1 2 3 4 A5 0.14% 6 4.18% 7 8 91.02% Losses (in USD) x 10 6 BBB 0.03% 0.23% 7.49% 3.90% 87.86% 0.60% 3.78% 0.08% 0.39% 0.06% 0.08% 0.16% BB 0.03% 0.12% 0.73% 8.27% 86.74% 3.28% 0.18% 0.64% B 0.11% 0.82% 9.64% 85.37% 2.41% 1.64% CCC 0.37% 1.84% 6.24% 81.88% 9.67% D 10 AAA AA A BBB BB B CCC D 2011 The MathWorks, Inc. 1
MathWorks at a Glance Earth s topography on a Miller cylindrical projection, created with MATLAB and Mapping Toolbox Headquarters: Natick, Massachusetts US Other U.S. Locations: California, Michigan, Texas, Washington, DC Europe: France, Germany, Italy, Netherlands, Spain, Sweden, Switzerland, United Kingdom Asia-Pacific: Australia, China, India, Japan, Korea Worldwide training and consulting Distributors serving more than 20 countries, e.g. HUMUSOFT s.r.o. 2
MathWorks Today Revenues ~$700M in 2011 More than 50% from outside the U.S. Privately held 2400 employees worldwide More than 1 million users in 175+ countries 3
Key Industries Aerospace and defense Automotive Biotech and pharmaceutical Communications Education Electronics and semiconductors Energy production Financial services Industrial automation and machinery Medical devices 4
MATLAB & Finance today 3 rd largest industry for MathWorks Strong growth in all countries, and largest industry in many countries: Spain Switzerland UK Italy Australia Over 2500 financial companies worldwide use MathWorks software Recognized as one of the leading financial development platforms 3 rd party vendors constantly talk to us about integrating into the MATLAB platform. 5
Core MathWorks Products The leading environment for technical computing The industry-standard, high-level programming language for algorithm development Numeric computation Parallel computing, with multicore and multiprocessor support Data analysis and visualization Toolboxes for signal and image processing, statistics, optimization, symbolic math, and other areas Tools for application development and deployment Foundation of MathWorks products 6
Deeply Rooted in Education 5000+ universities around the world 1400+ MATLAB and Simulink based books Academic support for research, fellowships, student competitions, and curriculum development Benefits for Industry: Everyone that comes in as a new hire already knows MATLAB, because they all had it in college. The learning curve is significantly lessened as a result. Jeff Corn, Chief of Engineering Projects Section, U.S. Air Force Every year, tens of thousands of engineers enter the workforce with MathWorks product skills and experience. Students learn theory and techniques while using MATLAB and Simulink. 7
Challenges through the organization Management Regulators Financial Engineer Traders Clients Quant Group Other groups Partners 8
Finance Customers Using MATLAB Asset Management Insurance Energy Trading Financial Services Banks (Commercial,Retail,Investment) Central Banks 9
UniCredit Bank Austria Develops and Rapidly Deploys a Consistent, Enterprise-Wide Market Data Engine Challenge Improve risk management operations throughout a multinational financial institution Solution Use MATLAB, MATLAB Compiler, and MATLAB Builder JA to build and rapidly deploy a consistent enterprise-wide data warehouse with easily accessible derived market data Results Development time reduced by 50% Risk management improved across the bank Operational, audit, and maintenance costs reduced Link to user story Zero-coupon yield curve plot in UniCredit Bank Austria s UMD environment. Many financial institutions are struggling to adapt their models to the volatility and limited availability of credit in today s markets. Using MathWorks products, we can develop and deploy models in response to new market conditions in days or weeks, instead of months." Peter W. Schweighofer UniCredit Bank Austria 10
Agenda Introducing MathWorks Introducting MATLAB (Portfolio Optimization Example) Introducting Algorithmic Trading with MATLAB Break Credit Risk Modeling with MATLAB Risk Management using various VaR computation methods Overview of derivatives pricing capabilities and further financial computing products Q&A 11
Demo: Portfolio Strategy Analysis Import data Compute efficient frontier Add transaction/ cost constraints 12
Computational Finance Workflow Access Files Research and Quantify Data Analysis & Visualization Share Reporting Databases Financial Modeling Applications Datafeeds Application Development Production Automate MATLAB 13
MATLAB Introduction MATLAB Programming Language MATLAB Interpreter MATLAB Development Environment 14
Portfolio analysis in MATLAB Access Explore & Discover Use of built-in toolbox functionalities Share Highly documented examples ready to run very few code lines! >> p = Portfolio('InitPort', initialwt); >> p = p.estimateassetmoments(returns); >> p = p.setassetmoments(assetmean, assetcov); >> p = p.setdefaultconstraints; >> eff_front_weights = p.estimatefrontier(nports); 15
Designing robust application MATLAB A Complete Development Environment MATLAB Editor/Debugger Capture work from history Color coded Break points Code Analyzer (Check code quality, get hints and warnings) Performance Tools Profiler Quality reports (execution time, code coverage) Source comparing 16
Building graphical user interfaces GUIDE A MATLAB GUI Builder Drag and drop wizard to architecture your GUI Automatic MATLAB code generation (callback to be implemented) Easy to deploy 17
Computational Finance Workflow Access Research and Quantify Share Files Data Analysis and Visualization Reporting Databases Financial Modeling Applications Datafeeds Application Development Production Spreadsheet Link EX Database Toolbox Datafeed Toolbox Fixed Income Financial Derivatives Econometrics Financial Toolbox Statistics Toolbox Optimization Toolbox Builder EX Builder NE Builder JA MATLAB Compiler Report Generator MATLAB Parallel Computing MATLAB Distributed Computing Server 18