MONTE-CARLO SIMULATION CALCULATION OF VAR (VALUE-AT-RISK) & CVAR (CONDITIONAL VALUE-AT-RISK)

Similar documents
Barrier Option. 2 of 33 3/13/2014

Market Risk VaR: Model- Building Approach. Chapter 15

Monte Carlo Introduction

Session 5. Predictive Modeling in Life Insurance

Alternative VaR Models

Appendix. A.1 Independent Random Effects (Baseline)

Monte Carlo Methods in Finance

Portfolio Risk Management and Linear Factor Models

NtInsight for ALM. Feature List

Year 0 $ (12.00) Year 1 $ (3.40) Year 5 $ Year 3 $ Year 4 $ Year 6 $ Year 7 $ 8.43 Year 8 $ 3.44 Year 9 $ (4.

Introduction to Monte Carlo

New Developments in MATLAB for Computational Finance Kevin Shea, CFA Principal Software Developer MathWorks

Financial Econometrics Notes. Kevin Sheppard University of Oxford

Market Risk Analysis Volume IV. Value-at-Risk Models

Market Risk Analysis Volume I

The misleading nature of correlations

Improving Returns-Based Style Analysis

Business Statistics 41000: Probability 3

Predictive modelling around the world Peter Banthorpe, RGA Kevin Manning, Milliman

Stochastic Grid Bundling Method

Monte Carlo Methods in Financial Engineering

Computational Finance Least Squares Monte Carlo

Advanced Financial Modeling. Unit 2

Algorithmic Trading using Reinforcement Learning augmented with Hidden Markov Model

CHAPTER II LITERATURE STUDY

Lending Club Loan Portfolio Optimization Fred Robson (frobson), Chris Lucas (cflucas)

Financial Risk Modeling on Low-power Accelerators: Experimental Performance Evaluation of TK1 with FPGA

Beating the market, using linear regression to outperform the market average

Financial Models with Levy Processes and Volatility Clustering

Comparison of Estimation For Conditional Value at Risk

I. Return Calculations (20 pts, 4 points each)

TRΛNSPΛRΣNCY ΛNΛLYTICS

Financial Mathematics and Supercomputing

Oracle Financial Services Market Risk User Guide

Measurement of Market Risk

Executive Summary: A CVaR Scenario-based Framework For Minimizing Downside Risk In Multi-Asset Class Portfolios

Calculating VaR. There are several approaches for calculating the Value at Risk figure. The most popular are the

Master s in Financial Engineering Foundations of Buy-Side Finance: Quantitative Risk and Portfolio Management. > Teaching > Courses

Bloomberg. Portfolio Value-at-Risk. Sridhar Gollamudi & Bryan Weber. September 22, Version 1.0

IEOR E4703: Monte-Carlo Simulation

Statistical Models and Methods for Financial Markets

Machine Learning for Quantitative Finance

Solving dynamic portfolio choice problems by recursing on optimized portfolio weights or on the value function?

WC-5 Just How Credible Is That Employer? Exploring GLMs and Multilevel Modeling for NCCI s Excess Loss Factor Methodology

Accelerated Option Pricing Multiple Scenarios

Ho Ho Quantitative Portfolio Manager, CalPERS

APPEND I X NOTATION. The product of the values produced by a function f by inputting all n from n=o to n=n

History of Monte Carlo Method

StatPro Revolution - Analysis Overview

Design of a Financial Application Driven Multivariate Gaussian Random Number Generator for an FPGA

Modeling credit risk in an in-house Monte Carlo simulation

Principles of Scenario Planning Under Solvency II. George Tyrakis Solutions Specialist

The Fundamental Review of the Trading Book: from VaR to ES

Computational Statistics Handbook with MATLAB

Models of Patterns. Lecture 3, SMMD 2005 Bob Stine

Linda Allen, Jacob Boudoukh and Anthony Saunders, Understanding Market, Credit and Operational Risk: The Value at Risk Approach

The following content is provided under a Creative Commons license. Your support

Monte Carlo Simulation (General Simulation Models)

Strategies for Improving the Efficiency of Monte-Carlo Methods

Section 0: Introduction and Review of Basic Concepts

yuimagui: A graphical user interface for the yuima package. User Guide yuimagui v1.0

Modelling Returns: the CER and the CAPM

Monte-Carlo Methods in Financial Engineering

Properties of the estimated five-factor model

2.1 Mathematical Basis: Risk-Neutral Pricing

SPEED UP OF NUMERIC CALCULATIONS USING A GRAPHICS PROCESSING UNIT (GPU)

Near Real-Time Risk Simulation of Complex Portfolios on Heterogeneous Computing Systems with OpenCL

Random Variables and Probability Distributions

Risk Measuring of Chosen Stocks of the Prague Stock Exchange

Handbook of Financial Risk Management

Forecasting volatility with macroeconomic and financial variables using Kernel Ridge Regressions

Linking Stress Testing and Portfolio Credit Risk. Nihil Patel, Senior Director

ECO220Y Sampling Distributions of Sample Statistics: Sample Proportion Readings: Chapter 10, section

Credit Risk Modeling Using Excel and VBA with DVD O. Gunter Loffler Peter N. Posch. WILEY A John Wiley and Sons, Ltd., Publication

3. Monte Carlo Simulation

Making Proxy Functions Work in Practice

Lecture 1: The Econometrics of Financial Returns

Measuring Risk. Review of statistical concepts Probability distribution. Review of statistical concepts Probability distribution 2/1/2018

Monte-Carlo Planning: Introduction and Bandit Basics. Alan Fern

Chapter 2 Uncertainty Analysis and Sampling Techniques

Market Risk Analysis Volume II. Practical Financial Econometrics

Introduction to Algorithmic Trading Strategies Lecture 8

Reasoning with Uncertainty

Web Appendix. Are the effects of monetary policy shocks big or small? Olivier Coibion

Portfolio Credit Risk II

Optimal Search for Parameters in Monte Carlo Simulation for Derivative Pricing

ECON5160: The compulsory term paper

Maximum Likelihood Estimation

Regression Review and Robust Regression. Slides prepared by Elizabeth Newton (MIT)

Downside Risk: Implications for Financial Management Robert Engle NYU Stern School of Business Carlos III, May 24,2004

Brooks, Introductory Econometrics for Finance, 3rd Edition

Real Options Valuation, Inc. Software Technical Support

Applications of GCorr Macro within the RiskFrontier Software: Stress Testing, Reverse Stress Testing, and Risk Integration

Understanding Risks in a Global Multi-Asset Class Portfolio

1 Introduction. Term Paper: The Hall and Taylor Model in Duali 1. Yumin Li 5/8/2012

Estimation of dynamic term structure models

bitarisk. BITA Vision a product from corfinancial. london boston new york BETTER INTELLIGENCE THROUGH ANALYSIS better intelligence through analysis

Review: Population, sample, and sampling distributions

Value-at-Risk (VaR) a Risk Management tool

The method of Maximum Likelihood.

Transcription:

MONTE-CARLO SIMULATION CALCULATION OF VAR (VALUE-AT-RISK) & CVAR (CONDITIONAL VALUE-AT-RISK) PRESENTER: SANJOY ROY 15-APR-2018

TERMINOLOGY V-a-R (Value-At-Risk) How much can one expect to lose Parameters defining VaR Portfolio, Time Period and p-value. A VaR of 1 million dollars with a 5% p-value and two weeks implies that the portfolio stands only a 5% chance of losing more than 1 million dollars over two weeks C-VaR (conditional-v-a-r) aka Expected Shortfall: same three parameters as a VaR statistic, but considers the expected loss instead of the cut-off value. A CVaR of 5 million dollars with a 5% p-value and two weeks indicates the belief that the average loss in the worst 5% of outcomes is 5 million dollars. A portfolio is a bunch of instruments which we are trying interested to gauge the V-a-R or expected loss. Market factors are the key-indices which are considered as imaginary super-set of instruments traded in a particular market/bourse eg, S&P500, US Treasury, Return change in an instrument or portfolio s value over a time period.

RESULTS PDF OF INDEXES USED

RESULTS THE SIMULATED RETURN OF PORTFOLIO

SUMMARY OF RESULTS

EXTENDED RESULTS AS A WEBLOG

D3 VISUALISATIONS ILLUSTRATING TRENDS

ARCHITECTURE

ASSUMPTIONS All financial data for instruments and market factors are extracted from YAHOO! Finance. The window of return is stipulated to 2-weeks for both instruments and factors, and the p-value is set to 5%. We are interested in the daily closing value of an instrument/index (factor) We will be using OLS (Ordinary Least Squares) Regression algorithm to model the relationship between market conditions (factors) and each instrument s returns. We will employ Multi-Variate Normal distribution to simulate the trial data. We will be using breeze library for plotting the probability density functions For a given distribution, we will choose a sample from the distribution, derive the standard deviation of the sample, and use Gaussian kernel on the sample (with the std-dev) to derive the probability density of the sample. The trials will be split into specific number of threads (which is parameterized) to be executed in parallel. For every trial, we will deploy Mersenne-Twister algorithm to generate a random number which will eventually help to build the simulated data for values of an instrument in each trial.

MONTE-CARLO SIMULATIONS OVERVIEW Step 1: We will model the relationship between market conditions (factors) and each instrument s returns. Using vector algebra, we will generalize the total return of an entire portfolio. Employ OLS (Ordinary Least Squares) Regression algorithm with polynomial features. Output of the model is the coefficients/weightage vector Step 2: Choosing a distribution function (MVND) with the parameters of the weightage vector - covariance (cov) and means (m) and a random number, or, MVND = f(random number, cov,m) Step 3: Generate the trial data based on for parameterized number of trials, and in how many parallel threads we want to generate the workload. For every iteration in the trial the MVND = f(random number, cov,m) function provides a simulated distribution of instrument prices. Each vector of simulated distribution of instrument return is applied the weightage vector to provide the instrument return (as mandated by the model in Step 1). All such instrument returns constitutes the simulated vector of returns of a portfolio.

MONTE-CARLO SIMULATIONS OVERVIEW Step 04: Calculate the Risk Measures from the simulated returns V-a-R (at p-value) which essentially means pick the return, from the simulated return vector generated by the MC Trial, which is in the bottom p% of the distribution. C-V-a-R (at p-value) calculate the average return of the bottom p% of the distribution Step 05: Evaluating the results Boot-Strapping the confidence interval Back-testing on historical data

DATA FLOW HOW WE ARE DOING IT Provisions made to run the monte-carlo simulation to calculate the V-a-R and C-V-a-R for a particular stock (which can be parameterized) or an entire set of portfolio. Extract publicly traded instrument and indices from YAHOO! finance Stage the instruments in an HDFS directory which indicates a portfolio. Stage the factors in another HDFS directory which indicates the factor. Filter the portfolio of instruments and the indices on the same time-window of 2-weeks to generate the instrument-return and factor matrix. Model the relationship between market conditions (factors) and each instrument s returns to derive the weightage vector. Hitherto everything is being setup using normal scala collection in a single thread to ensure the integrity of the data specially applicable for the linear algebra operations underneath the OLS Regression algorithm. Apply Apache Spark s distributed framework to split up the trials in threads and execute the threads in parallel: (partitioning-by-trial). In each thread - Use the parameters of the weightage vector (covariance and means) to generate simulated return of vectors for each instrument. Additional parallelism can be achieved by executing the trials for individual stocks in parallel.

PROCESSING PARALLEL WORKLOADS METHOD 1 Executing n trials with 3 threads Portfolio Thread 1: running n/3 trials Factors Thread 2: running n/3 trials Thread 1: running n/3 trials Simulated Trials Input Data

PROCESSING PARALLEL WORKLOADS METHOD 2 Executing n trials in 3M threads Portfolio of M instruments Stock 1 Thread 1: running n/3 trials for stock 1 Thread 2: running n/3 trials for stock 1 Thread 3: running n/3 trials for stock 1 Factors Stock 2 Stock M Thread 1: running n/3 trials for stock 2 Thread 2: running n/3 trials for stock 2 Thread 3: running n/3 trials for stock 2...... Thread 1: running n/3 trials for stock 2 Thread 2: running n/3 trials for stock 2 Thread 3: running n/3 trials for stock 2 Simulated Trials Input Data

WHERE TO GO FROM HERE Parameterizing the OLS Regression with further regularization parameters Option to choose a different regression model like Decision Tree. Enable SQL on Big Data Make Spark SQL Framework function via HiveContext and process data from HDFS via Hive Metastore Extend the algorithm so that it can be leveraged for online scoring as well. Read/Write the data in HDFS in binary(efficient) file formats, and use AVRO serialization/deserialization techniques to read/write the data Store data in ORC format to query in HIVE Store data in PARQUET format to query from HBASE Data Visualizations Intuitive Dashboards on streaming data