Você está na página 1de 252

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.

253

R/Rmetrics Workshop Singapore 2010


Diethelm Wrtz Mahendra Mehta David Scott Juri Hinz

Rmetrics Association & Finance Online

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

R/Rmetrics eBook Series

R/Rmetrics eBooks is a series of electronic books and user guides aimed at students and practitioner who use R/Rmetrics to analyze nancial markets.

A Discussion of Time Series Objects for R in Finance (2009) Diethelm Wrtz, Yohan Chalabi, Andrew Ellis Portfolio Optimization with R/Rmetrics (2010), Diethelm Wrtz, William Chen, Yohan Chalabi, Andrew Ellis Basic R for Finance (2010), Diethelm Wrtz, Yohan Chalabi, Longhow Lam, Andrew Ellis Early Bird Edition Financial Market Data for R/Rmetrics (2010) Diethelm Wrtz, Andrew Ellis, Yohan Chalabi Early Bird Edition Indian Financial Market Data for R/Rmetrics (2010) Diethelm Wrtz, Mahendra Mehta, Andrew Ellis, Yohan Chalabi Presentations from the R/Rmetrics Singapore Workshop (2010) Diethelm Wrtz, Mahendra Mehta, Juri Hinz, David Scott

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

PRESENTATIONS FROM THE R/RMETRICS SINGAPORE WORKSHOP 2010

EDITORS: DIETHELM WRTZ MAHENDRA MEHTA JURI HINZ DAVID SCOTT

RMETRICS ASSOCIATION & FINANCE ONLINE

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Series Editors: PD Dr. Diethelm Wrtz Institute of Theoretical Physics and Curriculum for Computational Science Swiss Federal Institute of Technology Hnggerberg, HIT K 32.2 8093 Zurich Contact Address: Rmetrics Association Weinbergstrasse 41 8006 Zurich info@rmetrics.org

Dr. Martin Hanf Finance Online GmbH Weinbergstrasse 41 8006 Zurich

Publisher: Finance Online GmbH Swiss Information Technologies Weinbergstrasse 41 8006 Zurich

Authors: Diethelm Wrtz, Swiss Federal Institute of Technology Zurich Mahendra Mehta, NeuralSoft Technologies Mumbai Juri Hinz, National University of Singapore, Singapore David Scott, University of Auckland, Auckland

ISBN: eISBN: DOI:

2009, Finance Online GmbH, Zurich Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modied versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modied versions, except that this permission notice may be stated in a translation approved by the Rmetrics Association, Zurich.

Limit of Liability/Disclaimer of Warranty: While the publisher and authors have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specically disclaim any implied warranties of merchantability or tness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor authors shall be liable for any loss of prot or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.

Trademark notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identication and explanation, without intent to infringe.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Revision History May 2010: 1st edition

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

WELCOME
Welcome to the rst R/Rmetrics Singapore Conference on Computational Topics in Finance. We are very glad that you found the time to come to the Singapore, and for the many of you traveling from the U.S., Europe and various places in Asia, we hope that your journey was not too arduous. With the R/Rmetrics Singapore Conference, we want to create a new forum where fund and/or risk managers from banks and insurance rms, decision makers, researchers from industry and academia, and students can exchange ideas and engage in stimulating discussions. The environment for this workshop should be a place a little bit aside from the mainstream conference of venues, and we are happy to have found this at the Risk Management Institute of the National University of Singapore. About 40 participants are attending the conference, and the mixture, as planned, is quite heterogeneous. About half are from academia, and the other half from the software and nancial industries, including banks. Last but not least, we want to thank the organizing committee and our sponsors. We wish you an interesting conference with many inspiring and stimulating discussions.

Diethelm Wrtz Singapore, February 2010

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CONTENTS

WELCOME CONTENTS

V VII

I
1 2 3 4

Friday Morning
STEFANO IACUS JURI HINZ DAVID SCOTT MARC PAOLELLA

1
2 40 56 82

II Friday Afternoon
5 6 7 8 9 VIKRAM KURIYAN BERNARD LEE KAM FONG CHAN ANDREW ELLIS ANMOL SETHY

85
86 120 122 134 148 164

10 KARIM CHINE

III Saturday Morning


11 DEFENG SUN 12 YOHAN CHALABI vii

167
168 190

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CONTENTS 13 JOEL YU 14 LEONG CHEE KIA 15 DIETHELM WRTZ 16 PRATAP SONDHI 192 202 204 214

VIII

IV Appendix
SPONSORS RMETRICS ASSOCIATION

233
234 236

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

PART I

FRIDAY MORNING

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 1

STEFANO IACUS

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The "yuima" package: An R framework for simulation and inference of stochastic differential equations
Stefano M. Iacus on behalf of Yuima Project Team

Department of Economics, Business and Statistics Universit degli Studi di Milano, Italy

Most of the theoretical results in modern finance rely on the assumption that the underlying dynamics of asset prices, currencies exchange rates, interest rates, etc are continuous time stochastic proces-ses driven by stochastic differential equations. Continuous time models are also at the basis of option pricing and option pricing often requires Monte Carlo methods. In turn, the Monte Carlo method re-quires a preliminary good model to simulate whose parameters has to be estimated from historical data. Most ready-to-use tools in computational finance relies on pure discrete time models, like arch, garch, etc. and very few examples of software handling continuous time processes in a general fashion are available also in the R community. There still exists a gap between what is going on in mathematical finance and applied finance. The "yuima" package is intended to help in filling this gap. The Yuima Project is an open source and collaborative effort of several mathematicians and statisticians aimed at developing the R package named "yuima" for simulation and inference of stochastic differential equations. The "yuima" package is an environment that follows the paradigm of methods and classes of the S4 system for the R language. In the "yuima" package stochastic differential equations can be of very abstract type, e.g. uni or multi-dimensional, driven by Wiener process of fractional Brownian motion with general Hurst parameter, with or without jumps specified as Lvy noise. Lvy processes can be specified via compound Poisson description, by the specification of the Lvy measure or via increments and stable laws. The "yuima" package is intended to offer the basic infrastructure on which complex models and inference procedures can be built on. In particular, the basic set of functions includes the following: 1) Simulation schemes for all types of stochastic differential equations (Wiener, fBm, Lvy). 2) Different subsampling schemes including random sampling with user specified random times distribution, space discretization, tick times, etc. 3) Automatic asymptotic expansion for the approximation and estimation of functionals of diffusion processes with small noise via Malliavin calculus, useful in option pricing. 4) Efficient quasi-likelihood inference for diffusion processes and diffusion processes with jumps. All simulation schemes, subsampling and inference are designed to work on both regular or irregular grid times (i.e. regular or irregular time series). In special cases also asynchronous data and sampling schemes can be handled. As proof-of-concept (but fully operational) examples of statistical procedures have been implemented like change point analysis in volatility of stochastic differential equations, asynchronous covariance estimation, divergence test statistics.

The Yuima Project was partly supported by Japan Science and Technology Agency, Basic Research Programs PRESTO, Grants-in-Aid for Scientific Research No. 19340021.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The Yuima Project

Stefano M. Iacus (University of Milan & R Core Team)


on behalf of Yuima Core Team Computational Topics in Finance, 1st R/Rmetrics Workshop, February 19/20, 2010, Singapore

1 / 56

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Overview of the Yuima Project

2 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The Yuima Project Team


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

A. Brouste (Univ. Le Mans, FR) M. Fukasawa (Osaka Univ. JP) H. Hino (Waseda Univ., Tokyo, JP) S.M. Iacus (Milan Univ., IT) K. Kengo (Tokyo Univ., JP) H. Masuda (Kyushu Univ., JP) Y. Shimitzu (Osaka Univ., JP) M. Uchida (Osaka Univ., JP) N. Yoshida (Tokyo Univ., JP) . . . more to come The yuima package1 is written by people working in mathematical statistics and nance, who actively publish results in the eld, have some knowledge of R, and have the feeling on whats next in the eld. Aims at lling the gap between theory and practice!
1 The Yuima Project is funded by the Japan Science Technology (JST) Basic Research Programs PRESTO, Grants-in-Aid for Scientic Research No. 19340021.

3 / 56

The yuima package goal: ll the gap between theory and practice
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

The Yuima Project aims at implementing, via the yuima package, a very abstract framework to describe probabilistic and statistical properties of stochastic processes in a way which is the closest as possible to their mathematical counterparts but also computationally efcient. it is an R package, using S4 classes and methods, where the basic class extends to SDEs with jumps (simple Poisson, Levy), SDEs driven by fBM, Markov switching regime processes, HMM, etc. separates the data description from the inference tools and simulation schemes the design allows for multidimensional, multi-noise processes specication it includes a variety of tools useful in nance, like asymptotic expansion of functionals of stochastic processes via Malliavin calculus
4 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Overview of the yuima package

5 / 56

The yuima object


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

The main object is the yuima object which allows to describe the model in a mathematically sound way. Then the data and the sampling structure can be included as well or, just the sampling scheme from which data can be generated according to the model. The package exposes very few generic functions like simulate, qmle, plot, etc. and some other specic functions for special tasks. Before looking at the details, let us see an overview of the main object.

6 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

What contains a yuima object ?

7 / 56

univariate multivariate

Data

ts, xts, ...

multigrid asynch. regular irregular

diffusion Levy

fractional BM

Sampling
tick times space disc. ... random deterministic

Yuima

Model

Markov Switching

HMM

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

univariate multivariate

Data

ts, xts, ...

multigrid asynch. regular irregular

diffusion Levy

fractional BM

Sampling
tick times space disc. ... random deterministic

Yuima

Model

Markov Switching

HMM

univariate multivariate

Data

ts, xts, ...

multigrid asynch. regular irregular

diffusion Levy

fractional BM

Sampling
tick times space disc. ... random deterministic

Yuima

Model

Markov Switching

HMM

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

univariate multivariate

Data

ts, xts, ...

multigrid asynch. regular irregular

diffusion Levy

fractional BM

Sampling
tick times space disc. ... random deterministic

Yuima

Model

Markov Switching

HMM

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

What is possible to do with a yuima object in hands?

12 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Covariation EulerMaruyama

Nonparametrics

p-variation

Space discr. Exact

High freq. Low freq.

Quasi MLE Diff, Jumps, fBM

Simulation

Yuima
Asymptotic expansion

Parametric Inference

Option pricing
Akaikes Monte Carlo

Adaptive Bayes MCMC

Change point

LASSO-type

Model selection

Hypotheses Testing

Covariation EulerMaruyama

Nonparametrics

p-variation

Space discr. Exact

High freq. Low freq.

Quasi MLE Diff, Jumps, fBM

Simulation

Yuima
Asymptotic expansion

Parametric Inference

Option pricing
Akaikes Monte Carlo

Adaptive Bayes MCMC

Change point

LASSO-type

Model selection

Hypotheses Testing

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Covariation EulerMaruyama

Nonparametrics

p-variation

Space discr. Exact

High freq. Low freq.

Quasi MLE Diff, Jumps, fBM

Simulation

Yuima
Asymptotic expansion

Parametric Inference

Option pricing
Akaikes Monte Carlo

Adaptive Bayes MCMC

Change point

LASSO-type

Model selection

Hypotheses Testing

Covariation EulerMaruyama

Nonparametrics

p-variation

Space discr. Exact

High freq. Low freq.

Quasi MLE Diff, Jumps, fBM

Simulation

Yuima
Asymptotic expansion

Parametric Inference

Option pricing
Akaikes Monte Carlo

Adaptive Bayes MCMC

Change point

LASSO-type

Model selection

Hypotheses Testing

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Covariation EulerMaruyama

Nonparametrics

p-variation

Space discr. Exact

High freq. Low freq.

Quasi MLE Diff, Jumps, fBM

Simulation

Yuima
Asymptotic expansion

Parametric Inference

Option pricing
Akaikes Monte Carlo

Adaptive Bayes MCMC

Change point

LASSO-type

Model selection

Hypotheses Testing

Covariation EulerMaruyama

Nonparametrics

p-variation

Space discr. Exact

High freq. Low freq.

Quasi MLE Diff, Jumps, fBM

Simulation

Yuima
Asymptotic expansion

Parametric Inference

Option pricing
Akaikes Monte Carlo

Adaptive Bayes MCMC

Change point

LASSO-type

Model selection

Hypotheses Testing

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

How it is supposed to work?

19 / 56

The model specication


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

We consider here the three main classes of SDEs which can be easily specied. All multidimensional and eventually parametric models.

20 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The model specication


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

We consider here the three main classes of SDEs which can be easily specied. All multidimensional and eventually parametric models. Diffusions dXt = a(t, Xt )dt + b(t, Xt )dWt

20 / 56

The model specication


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

We consider here the three main classes of SDEs which can be easily specied. All multidimensional and eventually parametric models. Diffusions dXt = a(t, Xt )dt + b(t, Xt )dWt Fractional Gaussian Noise, with H the Hurst parameter

dXt = a(t, Xt )dt + b(t, Xt )dWtH

20 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The model specication


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

We consider here the three main classes of SDEs which can be easily specied. All multidimensional and eventually parametric models. Diffusions dXt = a(t, Xt )dt + b(t, Xt )dWt Fractional Gaussian Noise, with H the Hurst parameter

dXt = a(t, Xt )dt + b(t, Xt )dWtH

Diffusions with jumps, Levy

dXt = a(Xt )dt + b(Xt )dWt + +

c(Xt , z)(dt, dz)

|z|>1

c(Xt , z){(dt, dz) (dz)dt}


20 / 56

0<|z|1

dXt = 3Xt dt +
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

1 2 dWt 1+Xt

> mod1 <- setModel(drift = "-3*x", diffusion = "1/(1+x^2)")

21 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

dXt = 3Xt dt +
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

1 2 dWt 1+Xt

> mod1 <- setModel(drift = "-3*x", diffusion = "1/(1+x^2)")

> str(mod1) Formal class yuima.model [package "yuima"] with 16 slots ..@ drift : expression((-3 * x)) ..@ diffusion :List of 1 .. ..$ : expression(1/(1 + x^2)) ..@ hurst : num 0.5 ..@ jump.coeff : expression() ..@ measure : list() ..@ measure.type : chr(0) ..@ parameter :Formal class model.parameter [package "yuima"] with 6 slots .. .. ..@ all : chr(0) .. .. ..@ common : chr(0) .. .. ..@ diffusion: chr(0) .. .. ..@ drift : chr(0) .. .. ..@ jump : chr(0) .. .. ..@ measure : chr(0) ..@ state.variable : chr "x" ..@ jump.variable : chr(0) ..@ time.variable : chr "t" ..@ noise.number : num 1 ..@ equation.number: int 1 ..@ dimension : int [1:6] 0 0 0 0 0 0 ..@ solve.variable : chr "x" ..@ xinit : num 0 ..@ J.flag : logi FALSE

21 / 56

dXt = 3Xt dt +
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

1 2 dWt 1+Xt

And we can easily simulate and plot the model like


> set.seed(123) > X <- simulate(mod1) > plot(X)

0.8 0.0

0.6

0.4

0.2

0.0

0.2

0.2

0.4 t

0.6

0.8

1.0

22 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

dXt = 3Xt dt +
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

1 2 dWt 1+Xt

The simulate function lls the slots data and sampling


> str(X)
Formal class yuima [package "yuima"] with 5 slots ..@ data :Formal class yuima.data [package "yuima"] with 2 slots .. .. ..@ original.data: ts [1:101, 1] 0 -0.217 -0.186 -0.308 -0.27 ... .. .. .. ..- attr(*, "dimnames")=List of 2 .. .. .. .. ..$ : NULL .. .. .. .. ..$ : chr "Series 1" .. .. .. ..- attr(*, "tsp")= num [1:3] 0 1 100 .. .. ..@ zoo.data :List of 1 .. .. .. ..$ Series 1:zooreg series from 0 to 1 ..@ model :Formal class yuima.model [package "yuima"] with 16 slots (...) output dropped ..@ .. .. .. .. .. .. .. .. .. .. .. sampling :Formal .. ..@ Initial : .. ..@ Terminal : .. ..@ n : .. ..@ delta : .. ..@ grid : .. ..@ random : .. ..@ regular : .. ..@ sdelta : .. ..@ sgrid : .. ..@ oindex : .. ..@ interpolation: class yuima.sampling [package "yuima"] with 11 slots num 0 num 1 num 100 num 0.1 num(0) logi FALSE logi TRUE num(0) num(0) num(0) chr "none"

23 / 56

1 Parametric model: dXt = Xt dt + 1+X dWt t


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

> mod2 <- setModel(drift = "-theta*x", diffusion = "1/(1+x^gamma)")

24 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

1 Parametric model: dXt = Xt dt + 1+X dWt t


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

> mod2 <- setModel(drift = "-theta*x", diffusion = "1/(1+x^gamma)")

Automatic extraction of the parameters for further inference


> str(mod2) Formal class yuima.model [package "yuima"] with 16 slots ..@ drift : expression((-theta * x)) ..@ diffusion :List of 1 .. ..$ : expression(1/(1 + x^gamma)) ..@ hurst : num 0.5 ..@ jump.coeff : expression() ..@ measure : list() ..@ measure.type : chr(0) ..@ parameter :Formal class model.parameter [package "yuima"] with 6 slots .. .. ..@ all : chr [1:2] "theta" "gamma" .. .. ..@ common : chr(0) .. .. ..@ diffusion: chr "gamma" .. .. ..@ drift : chr "theta" .. .. ..@ jump : chr(0) .. .. ..@ measure : chr(0) ..@ state.variable : chr "x" ..@ jump.variable : chr(0) ..@ time.variable : chr "t" ..@ noise.number : num 1 ..@ equation.number: int 1 ..@ dimension : int [1:6] 2 0 1 1 0 0 ..@ solve.variable : chr "x" ..@ xinit : num 0 ..@ J.flag : logi FALSE

24 / 56

1 Parametric model: dXt = Xt dt + 1+X dWt t


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

And this can be simulated specifying the parameters


> simulate(mod2,true.param=list(theta=1,gamma=3))

25 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

2-dimensional diffusions with 3 noises


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

2 1 2 1 dXt = (Xt + 2Xt )dt + Xt dWt1 + 3dWt2

1 1 2 dXt = 3Xt dt + dWt1 + Xt dWt3

has to be organized into matrix form


1 dXt 2 dXt 1 3Xt 1 2 Xt 2Xt 2 1 0 Xt 1 Xt 3 0

dt +

dWt1 dWt2 dWt3

> > > >

sol <- c("x1","x2") # variable for numerical solution a <- c("-3*x1","-x1-2*x2") # drift vector b <- matrix(c("1","x1","0","3","x2","0"),2,3) # diffusion matrix mod3 <- setModel(drift = a, diffusion = b, solve.variable = sol)

26 / 56

2-dimensional diffusions with 3 noises


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

2 1 2 1 dXt = (Xt + 2Xt )dt + Xt dWt1 + 3dWt2


> str(mod3) Formal class yuima.model [package "yuima"] with 16 slots ..@ drift : expression((-3 * x1), (-x1 - 2 * x2)) ..@ diffusion :List of 2 .. ..$ : expression(1, 0, x2) .. ..$ : expression(x1, 3, 0) ..@ hurst : num 0.5 ..@ jump.coeff : expression() ..@ measure : list() ..@ measure.type : chr(0) ..@ parameter :Formal class model.parameter [package "yuima"] with 6 slots .. .. ..@ all : chr(0) .. .. ..@ common : chr(0) .. .. ..@ diffusion: chr(0) .. .. ..@ drift : chr(0) .. .. ..@ jump : chr(0) .. .. ..@ measure : chr(0) ..@ state.variable : chr "x" ..@ jump.variable : chr(0) ..@ time.variable : chr "t" ..@ noise.number : int 3 ..@ equation.number: int 2 ..@ dimension : int [1:6] 0 0 0 0 0 0 ..@ solve.variable : chr [1:2] "x1" "x2" ..@ xinit : num [1:2] 0 0 ..@ J.flag : logi FALSE

1 1 2 dXt = 3Xt dt + dWt1 + Xt dWt3

27 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Plot methods inherited by zoo


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference

> set.seed(123) > X <- simulate(mod3) > plot(X,plot.type="single",col=c("red","blue"))

LASSO estimation Asymptotic Expansion Roadmap

x1

Change-point Analysis

3 0.0

0.2

0.4 t

0.6

0.8

1.0

28 / 56

Multidimensional SDE
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Also models likes this can be specied

where g(t) = 0.4 + (0.1 + 0.2t)e2t

1 2 1 2/3 dW 1 , dXt = Xt Xt t 2 3 dXt = g(t)dXt , 3 3 dXt = Xt (dt + (dWt1 +

, 1 2 dWt2 ))

The above is an example of parametric SDE with more equations than noises.

29 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Fractional Gaussian Noise dYt = 3Yt dt + dWtH


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

> mod4 <- setModel(drift="3*y", diffusion=1, hurst=0.3, solve.var="y")

30 / 56

Fractional Gaussian Noise dYt = 3Yt dt + dWtH


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

> mod4 <- setModel(drift="3*y", diffusion=1, hurst=0.3, solve.var="y")

The hurst slot is lled


> str(mod4) Formal class yuima.model [package "yuima"] with 16 slots ..@ drift : expression((3 * y)) ..@ diffusion :List of 1 .. ..$ : expression(1) ..@ hurst : num 0.3 ..@ jump.coeff : expression() ..@ measure : list() ..@ measure.type : chr(0) ..@ parameter :Formal class model.parameter [package "yuima"] with 6 slots .. .. ..@ all : chr(0) .. .. ..@ common : chr(0) .. .. ..@ diffusion: chr(0) .. .. ..@ drift : chr(0) .. .. ..@ jump : chr(0) .. .. ..@ measure : chr(0) ..@ state.variable : chr "x" ..@ jump.variable : chr(0) ..@ time.variable : chr "t" ..@ noise.number : num 1 ..@ equation.number: int 1 ..@ dimension : int [1:6] 0 0 0 0 0 0 ..@ solve.variable : chr "y" ..@ xinit : num 0 ..@ J.flag : logi FALSE

30 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Fractional Gaussian Noise dYt = 3Yt dt + dWtH


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

> set.seed(123) > X <- simulate(mod4, n=1000) > plot(X, main="Im fractional!")

Im fractional!
4 y 0 0.0 1 2 3

0.2

0.4 t

0.6

0.8

1.0

31 / 56

Jump processes
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Jump processes can be specied in different ways in mathematics (and hence in yuima package). Let Zt be a Compound Poisson Process (i.e. jumps follow some distribution, e.g. Gaussian) Then is is possible to consider the following SDE which involves jumps

dXt = a(Xt )dt + b(Xt )dWt + dZt


Next is an example of Poisson process with intensity = 10 and Gaussian jumps. In this case we specify measure.type as CP (Compound Poisson)

32 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Jump process: dXt = Xt dt + dWt + Zt


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

> mod5 <- setModel(drift=c("-theta*x"), diffusion="sigma", jump.coeff="1", measure=list(intensity="10", df=list("dnorm(z, 0, 1)")), measure.type="CP", solve.variable="x") > set.seed(123) > X <- simulate(mod5, true.p=list(theta=1,sigma=3),n=1000) > plot(X, main="Im jumping!")

Im jumping!
0 x 8 0.0 6 4 2

0.2

0.4 t

0.6

0.8

1.0

33 / 56

Jump processes
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Another way is to specify the Levy measure. Without going into too much details, here is an example of a simple OU process with IG Levy measure

dXt = xdt + dZt


> mod6 <- setModel(drift="-x", xinit=1, jump.coeff="1", measure.type="code", measure=list(df="rIG(z, 1, 0.1)")) > set.seed(123) > plot( simulate(mod6, Terminal=10, n=10000), main="Im also jumping!")
Im also jumping!

x 0 5 10

15

20

4 t

10

34 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The setModel method


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Models are specied via


setModel(drift = NULL, diffusion = NULL, hurst = 0.5, jump.coeff = character(), measure = list(), measure.type = character(), state.variable = "x", jump.variable = "z", time.variable = "t", solve.variable, xinit)

in

dXt = a(Xt )dt + b(Xt )dWt + c(Xt)dZt


The package implements many multivariate RNG to simulate Levy paths including rIG, rNIG, rbgamma, rngamma, rstable. Other user-dened or packages-dened RNG can be used freely.

35 / 56

The setSampling method


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

A sampling or subsampling structure can be created via the setSampling constructor. This allow to specify regular or irregular multidimensional grids (i.e. each equation has its own grid), possibly a random distribution of times.

36 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The setSampling method


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

A sampling or subsampling structure can be created via the setSampling constructor. This allow to specify regular or irregular multidimensional grids (i.e. each equation has its own grid), possibly a random distribution of times. The sampling slot in Yuima is also used during the inference. For example, one can specify the model, the data and then explicit the sampling which will contain informations about how these data have been collected. In this case, the tools for inference in Yuima will act differently upon this information.

36 / 56

The setSampling method


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

A sampling or subsampling structure can be created via the setSampling constructor. This allow to specify regular or irregular multidimensional grids (i.e. each equation has its own grid), possibly a random distribution of times. The sampling slot in Yuima is also used during the inference. For example, one can specify the model, the data and then explicit the sampling which will contain informations about how these data have been collected. In this case, the tools for inference in Yuima will act differently upon this information. In simulation studies, one can decide to simulate the processes at high frequency and then resample the simulated data according to different subsampling schemes: random, irregular, space grids, etc and verifty the effect of different subsampling on the estimation or the calibration of nancial product.

36 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Inference

37 / 56

Which tools have been developed


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

the covariance estimator of Yoshida-Hayashi (2005) for multidimensional Ito processes with asynchronous data quasi-likelihood estimation for multidimensional diffusions (Yoshida, 1992, 2005) change point estimation for the volatility in a multidimensional Ito process (Iacus & Yoshida, 2009) Bayes type estimators (Yoshida, 2005) LASSO-type and hypotheses testing based on -divergences (De Gregorio & Iacus, 2008 & 2010)

Just not to be too vague, let us consider the exact fomulations of some of the problems which can be handled by the yuima package.
38 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Change-point Analysis

39 / 56

Volatility Change-Point Estimation


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

The theory works for SDEs of the form

dYt = bt dt + (Xt , )dWt , t [0, T ],


where Wt a r -dimensional Wiener process and bt and Xt are multidimensional processes and is the diffusion coefcient (volatility) matrix. When Y = X the problem is a diffusion model. The process bt may have jumps but should note explode and it is treated as a nuisance in this model.

40 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Change-point analysis
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

The change-point problem for the volatility is formalized as follows

Yt =

Y0 + 0 bs ds + 0 (Xs , 1 )dWs t t Y + bs ds + (Xs , 2 )dWs

for t [0, )

for t [ , T ].

The change point instant is unknown and is to be estimated, along with 1 and 2 , from the observations sampled from the path of (X, Y ).

An application to the recent nancial crisis showed that...

41 / 56

- Lehman Brothers

- DJ Stoxx Global - S&P/MIB 1800 Banks - Nikkei 225

- Lehman - DJ Stoxx - Goldman - Deutsche Bank - HSBC Brothers 600 Banks Sachs

- Nasdaq - DJ Stoxx Asia Pacific 600 Banks - JP Morgan Chase

- DJ Stoxx Americas 600 Banks - DJ Stoxx 600 Banks - Deutsche Bank - HSBC - Barclays - Deutsche Bank (Ger) - CAC

- FTSE - DJ Stoxx 600

- Nyse - DJ Stoxx Global 1800 - Dow Jones - MSCI World - S&P 500 - Morgan Stanley - Bank of America - FTSE - DAX - Barclays - S&P MIB - RBS - CAC - Unicredit - Intesa Sanpaolo - IBEX - Deutsche Bank (Ger) - SMI - Nikkei 225 - Commerzbank - DJ Stoxx 600

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

LASSO estimation

43 / 56

LASSO estimation
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

LASSO is nothing but estimation under constraints on the parameters. Usually studied for the least squares estimation method, can be applied here using the QMLE approach for the following diffusion model

dXt = b(, Xt )dt + (, Xt )dWt


where Rp , Rq , p, q 1 The target function is the minimization of Hn (, ) = minus the log of the approximated likelihood,
p q

min Hn (, ) +
, j=1

n,j |j | +

k=1

n,k |k |

Lasso tries to set the maximal number of parameters to 0. In this sense operates model selection jointly with estimation.

44 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Interest rates LASSO estimation examples


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

LASSO estimation of the U.S. Interest Rates monthly data from 06/1964 to 12/1989. These data have been analyzed by many author including Nowman (1997), At-Sahalia (1996), Yu and Phillips (2001) and it is a nice application of LASSO.
Reference Merton (1973) Vasicek (1977) Cox, Ingersoll and Ross (1985) Dothan (1978) Geometric Brownian Motion Brennan and Schwartz (1980) Cox, Ingersoll and Ross (1980) Constant Elasticity Variance CKLS (1992) Model

0 0

dXt dXt dXt dXt dXt dXt dXt dXt dXt

= dt + dWt = ( + Xt )dt + dWt = ( + Xt )dt + Xt dWt = Xt dWt = Xt dt + Xt dWt = ( + Xt )dt + Xt dWt 3/2 = Xt dWt = Xt dt + Xt dWt = ( + Xt )dt + Xt dWt

1/2
0 0 0 0 0 1 1 1

3/2

45 / 56

Interest rates LASSO estimation examples


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Model Vasicek CKLS CKLS

Estimation Method MLE Nowman Exact Gaussian (Yu & Phillips) QMLE

4.1889 2.4272 2.0069 (0.5216) 2.0822 (0.9635) 1.5435 (0.6813) 0.5412 (0.2076)

-0.6072 -0.3277 -0.3330 (0.0677) -0.2756 (0.1895) -0.1687 (0.1340) 0.0001 (0.0054)

0.8096 0.1741 0.1741

1.3610 1.3610

CKLS

0.1322 (0.0253) 0.1306 (0.0179) 0.1178 (0.0179)

1.4392 (0.1018) 1.4452 (0.0720) 1.4944 (0.0720)

CKLS

QMLE + LASSO with mild penalization QMLE + LASSO with strong penalization

CKLS

LASSO selected: Cox, Ingersoll and Ross (1980) model

1 3/2 dXt = dt + 0.12 Xt dWt 2


46 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Asymptotic Expansion

47 / 56

Estimation of functionals
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

The yuima package can handle asymptotic expansion of functionals of d-dimensional diffusion process
dXt = a(Xt , )dt + b(Xt , )dWt ,

(0, 1]

with Wt and r -dimensional Wiener process, i.e. Wt = (Wt1 , . . . , Wtr ). The functional is expressed in the following abstract form
r F (Xt ) = =0 0 T f (Xt , d)dWt + F (Xt , ),

Wt0 = t

48 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Estimation of functionals. Example.


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Example: B&S asian call option


dXt = Xt dt + Xt dWt

and the B&S price is related to E functional of interest is


F (Xt ) =

max
T 0

1 T

T 0

Xt dt K, 0

. Thus the

1 T

Xt dt,

r=1

49 / 56

Estimation of functionals. Example.


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Example: B&S asian call option


dXt = Xt dt + Xt dWt

and the B&S price is related to E functional of interest is


F (Xt ) =

max
T 0

1 T

T 0

Xt dt K, 0

. Thus the

1 T

Xt dt,

r=1

with

f0 (x, ) =
in
F (Xt ) =

x , T
r

f1 (x, ) = 0,
T

F (x, ) = 0

=0 0

f (Xt , d)dWt + F (Xt , )

49 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Estimation of functionals. Example.


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

So, the call option price requires the composition of a smooth functional
F (Xt ) =

1 T

T 0

Xt dt,

r=1

with the irregular function

max(x K, 0)
Monte Carlo methods require a HUGE number of simulations to get the desired accuracy of the calculation of the price, while asymptotic expansion of F provides unexpectedly accurate approximations. The yuima package provides functions to construct the functional F , and automatic asymptotic expansion based on Malliavin calculus starting from a yuima object.

50 / 56

setFunctional method
Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

# > > > > > > > > >

dXt^e = Xt^e * dt + e * Xt^e * dWt diff.matrix <- matrix( c("x*e"), 1,1) model <- setModel(drift = c("x"), diffusion = diff.matrix) T <- 1 xinit <- 1 f <- list( expression(x/T), expression(0)) F <- 0 e <- .3 yuima <- setYuima(model = model, sampling = setSampling(Terminal=T, n=1000)) yuima <- setFunctional( yuima, f=f,F=F, xinit=xinit,e=e)

the denition of the functional is now included in the yuima object (some output dropped)
> str(yuima) Formal class yuima [package "yuima"] with 5 slots ..@ data :Formal class yuima.data [package "yuima"] with 2 slots ..@ model :Formal class yuima.model [package "yuima"] with 16 slots ..@ sampling :Formal class yuima.sampling [package "yuima"] with 11 slots ..@ functional :Formal class yuima.functional [package "yuima"] with 4 slots .. .. ..@ F : num 0 .. .. ..@ f :List of 2 .. .. .. ..$ : expression(x/T) .. .. .. ..$ : expression(0) .. .. ..@ xinit: num 1 .. .. ..@ e : num 0.3

51 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Data

Sampling

Yuima

Model

Functional

Estimation of functionals. Example.


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Then, it is as easy as
> F0 <- F0(yuima) > F0 [1] 1.716424 > max(F0-K,0) # asian call option price [1] 0.7164237

53 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Estimation of functionals. Example.


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Then, it is as easy as
> F0 <- F0(yuima) > F0 [1] 1.716424 > max(F0-K,0) # asian call option price [1] 0.7164237

and back to asymptotic expansion, the following script may work


> > + + + + > > > + + + + rho <- expression(0) get_ge <- function(x,epsilon,K,F0){ tmp <- (F0 - K) + (epsilon * x) tmp[(epsilon * x) < (K-F0)] <- 0 return( tmp ) } K <- 1 # strike epsilon <- e # noise level g <- function(x) { tmp <- (F0 - K) + (epsilon * x) tmp[(epsilon * x) < (K-F0)] <- 0 tmp }

53 / 56

Add more terms to the expansion


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

The expansion of previous functional gives


> asymp <- asymptotic_term(yuima, block=10, rho, g) calculating d0 ...done calculating d1 term ...done > asymp$d0 + e * asymp$d1 # asymp. exp. of asian call price [1] 0.7148786 > library(fExoticOptions) # From RMetrics suite > TurnbullWakemanAsianApproxOption("c", S = 1, SA = 1, X = 1, + Time = 1, time = 1, tau = 0.0, r = 0, b = 1, sigma = e) Option Price: [1] 0.7184944

> LevyAsianApproxOption("c", S = 1, SA = 1, X = 1, + Time = 1, time = 1, r = 0, b = 1, sigma = e) Option Price: [1] 0.7184944 > X <- sde.sim(drift=expression(x), sigma=expression(e*x), N=1000,M=1000) > mean(colMeans((X-K)*(X-K>0))) # MC asian call price based on M=1000 repl.
[1] 0.707046 54 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Roadmap

55 / 56

Where & When?


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Where: R-Forge.R-Project.org/projects/yuima

56 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Where & When?


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Where: R-Forge.R-Project.org/projects/yuima When: beta release, march 2010; stable release by summer 2010

56 / 56

Where & When?


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Where: R-Forge.R-Project.org/projects/yuima When: beta release, march 2010; stable release by summer 2010 Documentation: planned a R/Rmetric e-book for developers and users

56 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Where & When?


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work? Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Where: R-Forge.R-Project.org/projects/yuima When: beta release, march 2010; stable release by summer 2010 Documentation: planned a R/Rmetric e-book for developers and users Parallelization of simulators: the foreach approach in 2010

56 / 56

Where & When?


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work?

Where: R-Forge.R-Project.org/projects/yuima When: beta release, march 2010; stable release by summer 2010 Documentation: planned a R/Rmetric e-book for developers and users Parallelization of simulators: the foreach approach in 2010 User friendly (point&click) GUI: we have plans

Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

56 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Where & When?


Overview of the Yuima Project Overview of the yuima package What contains a yuima object ? What is possible to do with a yuima object in hands? How it is supposed to work?

Where: R-Forge.R-Project.org/projects/yuima When: beta release, march 2010; stable release by summer 2010 Documentation: planned a R/Rmetric e-book for developers and users Parallelization of simulators: the foreach approach in 2010 User friendly (point&click) GUI: we have plans

Inference Change-point Analysis LASSO estimation Asymptotic Expansion Roadmap

Thanks!

Q&A

56 / 56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 2

JURI HINZ

40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A Monte Carlo method for optimal stochastic control problems with convex value functions

Juri Hinz
National University of Singapore Department of Mathematics Faculty of Science

Abstract We present a method for calculation of optimal control policies for problems with convex value functions. Such situations appear frequently in many applications and encompass important examples arising in the area of the so-called partially observed Markov decision processes. We show that an increase of the calculation performance can be achieved by an adaptation of the classical least-square approach. The modifications are based on the convexity-preserving property of the conditional expectation, valid in our framework.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A Monte Carlo method for problems of optimal stochastic control with convex value functions.
Juri Hinz1
1 NUS

Rmetrics, 20/02/2010, Singapore

Storage management Commodity price process (Zk )k 1 with state space Z R Storage positions P (nite set: empty, full, half-full) Actions A (nite set: sell, buy one unit) Change of position by action (p, a) (p, a) = (p a)+ P Policy (p, a) (p, a) A yields actions and postions
a := (pk , Zk ), k pk +1 := (pk , a ), k

k 1

Reward R(p, z, a) = z(p (p, a))


from decision a given stock position p at the market price z

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Ingredients

Revenue, discounted by ]0, 1[ E(


k 0 k R(pk , Zk , a )) k

Value of the policy is V (p, z) given by solution to V (p, z) = R(p, z, (p, z))+ V ((p, (p, z)), z ) K (z, dz )
P(Z2 dz |Z1 =z)

Optimal control Optimal policy is better than each other policy V (p, z) V (p, z)

for all (p, z) P Z

Value function (value of an optimal policy) is obtained as the unique solution to


V (p, z) = max R(p, z, a) +
aA

V ((p, a), z )K (z, dz )

giving an optimal policy by (p, z) = argmaxaA R(p, z, a) + V ((p, a), z )K (z, dz )

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Solution method

By value-iteration, calculate recursively V (n+1) (p, z) = max R(p, z, a) +


aA

V (n) ((p, a), z )K (z, dz )

a sequence (V (n) )n1 of pointwise converging functions whose limit V V (p, z) = lim V (n) (p, z)
n

for all (p, z) P Z

is the value function.

One problem only

How to calculate the Markov transition (Tf )(z) :=


Z

f (z )K (z, dz )

if the state space is not countable high dimensional with complicated geometry

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Solution

Suggest an approximation to T suitable for numerical calculations. Approximate Tf in terms of basis functions M T f (z) Monte-Carlo transition (Tf )(z) j j (z) = T f (z) Approximative transition j=1 T f (z) Bounded appr. transition

Transition approximations Idea is simple. Using conditional expectation Tf (Z1 ) = E (f (Z2 ) | (Z1 )) one recognizes the projection Tf = LI (I f ) in the Hilbert space Z, P(Z1 ,Z2 ) ). Now approximate replace the measure by point measures from a sample L2 (Z P(Z1 ,Z2 ) 1 N
N

(zi ,zi )
i=1

replace the image space of the projection L I lin{j I : j = 1, . . . , M}

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Monte-Carlo transition

Tf =

M j=1

j j

with coefcients (j )M given by j=1


N i=1 |f (zi )

the minimizer of the sum of squared errors M j j (zi )|2 over (j )M RM . j=1 j=1

Problems with T depends on the basis and on the sample enlarging the basis gives oscillations in the projection to capture oscillations, the sample must be very large

Approximative transition

if Tf is non-negative and convex then chose non-negative and convex basis functions take only positive coefcients in the linear combinations basis can be arbitrary large, no oscillations occur due convexity. Thus, under the standing assumption that all basis functions (j )M are non-negative: j=1 0 j (z) for all z Z, j = 1, . . . , M. we dene the approximative transition T f

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

approximative transition T

is dened on non-negative functions only by Tf =


M j=1

j j ,

f 0

where (j )M solve the constrained quadratic minimization j=1 minimize N |f (zi ) M j j (zi )|2 i=1 j=1 subject to j 0 for j = 1, . . . , M.

Bounded approximative transition T

is dened on non-negative functions only by Tf =


M j=1

j j ,

f 0

where (j )M solve the constrained quadratic minimization j=1 minimize N |f (zi ) M j j (zi )|2 i=1 j=1 subject to j 0 for j = 1, . . . , M maxzZ
M j=1 j j (z)

maxzZ f (z)

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Boundary is crucial to ensure the existence of xed point V to V (p, z) = max R(p, z, a) + T V ((p, a), )(z)
aA

under slight additional assumptions. Proposition If all reward functions satisfy 0 R(a, , p) < and the the basis functions values on the sample {(j (zi ))N : j = 1, . . . , M} are linearly independent, i=1 then there exists a solution V .

How to use? If value functions V (p, ) of the original problem are non-negative and convex, then nd V (p, ) for arbitrarily large cone of convex basis functions (no oscillations due convexity!). Claim V V Still a problem: Computational problems with large basis. Observation: Basis dimension can be low, if basis is properly chosen. Ideally, basis elements mimic the targeted value functions. Idea: After calculations with preliminary basis, change the basis such that its elements are similar to the obtained by projections. Apply such a procedure repeatedly.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Basis-free least-square optimal control Suppose that for each a procedure determines a basis () = {1 , . . . , M }, whose approximative transition is denoted by T() . Given f and a 0 , proceed recursively k +1 = T(k ) f , k 1.

Hopefully, improved projections (k )k 1 reduce the error


N i=1 |k (zi )

f (zi )|2 is decreasing in k 1

(1)

and converges to , which is non-improvable = T() f .

Basis-free version

Given improvement operator () we suggest to study the following problem: Determine the solution V to the xed point equations as V (p, z) = maxaA R(p, z, a) + T(((p,a))) V ((p, a), )(z) where (p) is a non-improvable projection T((p)) V (p, ) = (p) for all p P

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Specic situation if Tf is non-negative and convex then approximate Tf TC f where C spans the cone of all non-negative, convex functions. To approach TC f , we construct improvement operators l () = {, l} It turns out that Tl () f = for each afne-linear l = TC f = positive and convex, l afne linear.

which gives a stylized basis improvement procedure

Stylized procedure

to approach T f by improvement of two dimensional cones 0) Given f 0, chose a convex > 0. 1) For an afne linear l and calculate Tl () f . () f = , then repeat 1) with the same but another l. 2) If T
l

3) If Tl () f = , then repeat 1) with the new := Tl () f and the same l. 4) Terminate if 1) 2) follows sufciently many times.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A more formal algorithm Step 0 (Initialization) For f 0, set := (f (zi ))N . i=1 Specify positive convex {1 , . . . , F } and afne linear (0) (0) {l1 , . . . , lL }. For positive and convex (0) , dene (0) = {1 , . . . , F , (0) , (0) l1 , . . . , (0) lL }. Step 1 (Minimization) Given (k ) = {1 , . . . , M }, Mij
(k ) (k ) (k )

:= j (zi ),
(k )

(k )

i = 1, . . . , N, j = 1, . . . , M.

Determine (k ) = (i )M [0, [M as the minimizer to j=1 [0, [M [0, [M , and calculate (k ) := M (k ) M (k ) 2 M (k ) .


(k ) M j=1 j j .

A more formal algorithm

Step 2 (Test for Termination) Determine the projection error 1 E (k ) =


N
2

|(k ) (zi ) f (zi )|2

i=1

if E (k ) E (k 1) < then nish and return (k ) , 0therwise proceed Step 3 (Basis change) Dene (k +1) = {1 , . . . , F , (k ) , (k ) l1 , . . . , (k ) lL } and go to the Step 1.
(k ) (k )

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Example: Z2 = Z1 + X where Z1 , X N(0, 1) then f : z z2 Tf : z z 2 + 1.

10

15

0 sample realizations

is obtained with (zi , f (zi ))200 i=1

Approximation is better than theoretical result

1 2

1 2

|(zi ) f (zi )|2


i=1

30.644,
i=1

|Tf (zi ) f (zi )|2

31.913.

10

15

0 sample realizations

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Example: optimal stopping

Suppose that (Zk )k 1 follows an auto-regression Zk +1 = 0.9Zk +Xk +1 , k 1 (Xk )k 1 iid, N(0, 0.09)-distributed.

Positions P = {stopped, goes} Actions A = {stop, go} Position change (stopped, stop) (goes, stop) (stopped, go) (goes, go) = stopped stopped stopped goes .

Example: optimal stopping

Reward is paid only when the system stops R(stopped, z, stop) R(goes, z, stop) R(stopped, z, go) R(goes, z, go) = 0 ez 0 0

Given path realization (zk )400 and = 0.95 one obtains V by k =1 value iteration basis improvement in each step

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Example: optimal stopping The value function V ( goes , )


6 value function 0 1 2 3 4 5

1 state variable

Stop if the state variable is above z (line intersection). Otherwise, wait.

Outlook How about non-convex value functions? Represent non-convex functions by a difference of convex functions and adapt basis improvement accordingly. (T cos)(z) = Example of 2 2 cos(z + x)N(0, X )(dx) = cos(z)eX /2

1.0

0.5

0.0

0.5

1.0

10

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Conclusion

Knowing particular properties of conditional expectation helps to improve the calculation of least square projection Convexity is the key property here Adaptive basis improvement seems to work Using this, Markov decision algorithm can be adapted to complicated and high dimensional spaces, no basis is construction is required

Thank you!

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 3

DAVID SCOTT

56

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Modeling Financial Return Distributions Using the Generalized Lambda Distribution


Yohan Chalabi1 , David Scott2, , Diethelm W rtz1 u
1. ETH Zrich u 2. University of Auckland * Contact author: d.scott@auckland.ac.nz

Keywords: distributions; nancial returns; generalized lambda distribution We investigate the generalized lambda distribution with innite support for modeling nancial return series with power law tails. We derive expressions for the distribution, for random number generation, and for nancial risk measures including value at risk, expected shortfall and tail indices. We introduce a new method of obtaining parameter estimates in which the data is standardized to have zero median and unit interquartile range and then a generalized lambda distribution with zero median and unit interquartile range is tted to the data. This reduces the number of parameters to two allowing for more ecient parameter estimation. Using this idea we demonstrate a simple robust method of moments estimation approach using moments based on Bowleys skewness and Moors kurtosis. We compare the performance of several further estimation approaches including maximum log likelihood, maximum product spacing, goodness of t testing, and histogram binning using Monte Carlo simulation with data derived from the NASDAQ-100 returns.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Modeling Financial Return Distributions Using the Generalized Lambda Distribution


Yohan Chalabi1 David Scott2 Diethelm Wrtz1 u

1 Institut

fr Theoretische Physik u ETH Zrich u

2 Department of Statistics The University of Auckland

February 19, 2010

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Outline
1

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Outline
1

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Outline
1

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Outline
1

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Outline
1

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Outline
1

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Generalized Lambda Distribution


[Ramberg and Schmeiser, 1974] introduced the four-parameter generalized lambda distribution (GLD) dened by the quantile function F 1 (p|) = F 1 (p|1 , 2 , 3 , 4 ) = 1 + where p are the probabilities, p [0, 1] 1 and 2 are the location and scale parameters 3 and 4 are shape parameters jointly related to the strengths of the lower and upper tails, respectively. In the limiting case 1 = 0 and 2 = 3 = 4 = we obtain Tukeys lambda distribution which appeared in [Hastings et al., 1947] p 3 (1 p)4 2 (1)

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Space
1 can take any real value, 2 must be positive Only particular values of 3 and 4 produce proper statistical distributions The support of the distribution changes with dierent values of the parameters 3 and 4 [Karian et al., 1996] identied six regions in which the shape parameters can lie in which the shapes of the GLDs are similar

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Space
4
Region 5 Region 1
2

Region 3

3
2 1 1 2

Region 6 Region 4
1

Region 2

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Support in Parameter Regions

Region 1 and 5 2 and 6 3

1 all all all all all all all all

2 <0 <0 >0 >0 >0 <0 <0 <0

3 < 1 >1 >0 =0 >0 <0 =0 <0

4 >1 < 1 >0 >0 =0 <0 <0 =0

Minimum 1 (1/2 ) 1 (1/2 ) 1 1 (1/2 ) 1

Maximum 1 + (1/2 ) 1 + (1/2 ) 1 + (1/2 ) 1 1

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Space for Financial Returns


For modeling nancial returns the support should be innite to both left and right For the GLD this corresponds to all the shape parameters (2 , 3 and 4 ) being negative This is region 4 in the parameter space, and in this region the GLD is unimodal: We will consider this case from now on If the tail-weight parameters (3 and 4 ) are equal, the distribution is symmetric The tail-weight parameters determine what moments exist The k-th moment exists provide min(3 , 4 ) > 1/k

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Examples
1.0 1.5 Probability 4 2 0 x 2 4 Density 1.0 0.5 0.0 0.0 0.2 0.4 0.6 0.8

0 x

Density and probability function for the GLD in parameter region 4. The right tail is xed at 4 = 1/4 and the left tail varies in powers of 2 in the range {1/8, 1/4, 1/2, 1, 2}.

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Tail Behaviour
The lower (upper) tail of the distribution function of the GLD is regularly varying at (+) with index 1/3 (1/4 ) For the density function f (x) we have f (x) and f (x) 1 (2 x)1/3 1 3 1 (2 x)1/4 1 4 as x (2)

as x

(3)

Moment existence and tail order change continuously with the values of the tail-weight parameters For the stable distribution the moment existence changes in a discontinuous fashion with the index (mean exists for index > 1, all moments for index 2)
Yohan Chalabi, David Scott, Diethelm Wrtz u Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Value at Risk and Expected Shortfall


Value at Risk, VaR, and expected shortfall risk, ES , are related to the quantiles of the distribution and are easily calculated VaR = F 1 (|) 3 (1 )4 = 1 + 2
VaR

(4)

ES =

xf (x|)dx =
0

F 1 (p|)dp

(5)

= 1 +

1 1 3 +1 + (1 )4 +1 1 2 (3 + 1) 2 (4 + 1)

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Fitting Methods
Many methods have been proposed including
the method of moments, [Ramberg et al., 1979] u least squares, [Oztrk and Dale, 1985] tting using percentiles, [Karian and Dudewicz, 1999] search routines, [King and MacGillivray, 1999] tting using L-moments, [Asquith, 2007] histogram tting, [Su, 2005] maximum likelihood, [Su, 2007]

Combinations of methods have been suggested to deal with the problem of nding starting solutions for optimization, for example [Su, 2007] Combination approaches seem the most sensible

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Fitting Methods
Many investigators nonetheless seem to suggest using method of moments Nonsensical in our case when moments of order 4 or even less can be innite Percentile methods and L-moments are usable We have implemented a variation to these approaches using robust moments as investigated by [Kim and White, 2004]

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Robust Moments
The rst two robust moments are the median, r and interquartile range, r The next two moments are the robust skewness and kurtosis, sr and r r = 1/2 r = 3/4 1/4 sr = r = 3/4 + 1/4 22/4 3/4 1/4 7/8 5/8 + 3/8 1/8 6/8 2/8 (6)

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Robust Moments
There are the obvious estimators where pq indicates the sample qth quantile and the hat that the statistic is a sample quantity: r = p1/2 r = p3/4 p1/4 r = s r = p3/4 + p1/4 2p2/4 p3/4 p1/4 p7/8 p5/8 + p3/8 p1/8 p6/8 p2/8 (7)

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Fitting Using Robust Moments


Dening S3 ,4 (p) as S3 ,4 (p) = S(p|3 , 4 ) = p 3 (1 p)4 sr and r are independent of 1 and 2 : r = 1 + r = sr = r = S3 ,4 (1/2) 2 (8)

S3 ,4 (3/4) S3 ,4 (1/4) 2 (9)

S3 ,4 (3/4) + S3 ,4 (1/4) 2S3 ,4 (1/2) S3 ,4 (3/4) S3 ,4 (1/4) S3 ,4 (7/8) S3 ,4 (5/8) + S3 ,4 (3/8) S3 ,4 (1/8) S3 ,4 (6/8) S3 ,4 (2/8)
Generalized Lambda

Yohan Chalabi, David Scott, Diethelm Wrtz u

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Fitting Using Robust Moments


We rst estimate 3 and 4 by inverting the nonlinear equations: r = sr (3 , 4 ) s r = r (3 , 4 ). Then 2 = and 1 = r S3 ,4 (1/2) r (10)

(11)

S3 ,4 (3/4) S3 ,4 (1/4) 2

(12)

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Fitting Using Robust Moments


This approach is very similar to the method of moments approach originally suggested by [Karian et al., 1996], but allows for the case of innite moments Also similar to the percentile and L-moments methods but more stable and intuitive than the percentile approach (where the use of 0.1 and 0.9 percentile estimates is often suggested), and simpler and more intuitive than the use of L-moments

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

The Data Set


The NASDAQ-100 Index includes 100 of the largest US domestic and international non-nancial securities listed on the Nasdaq Stock Market based on market capitalization We expect the distributions of returns to be heavy tailed Since the index composition has changed over time, the lengths of the time series varyrecord lengths are shown below:
Number of Daily Records 6000 Length 0 0 2000

20

40

60
Generalized Lambda

80

100

Yohan Chalabi, David Scott, Diethelm Wrtz u

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Stock Symbols for the NASDAQ-100


AAPL AMAT BIDU CHKP CTSH ERTS FLEX GOOG ILMN JBHT LINTA MRVL NWSA PPDI SHLD SYMC WYNN ADBE AMGN BIIB CHRW CTXS ESRX FLIR GRMN INFY JNPR LLTC MSFT ORCL QCOM SIAL TEVA XLNX ADP0 AMZN BRCM CMCSA DELL EXPD FSLR HANS INTC JOYG LOGI MXIM ORLY RIMM SPLS URBN XRAY ADSK APOL CA00 COST DISH EXPE FWLT HOLX INTU KLAC LRCX NIHD PAYX ROST SRCL VRSN YHOO AKAM ATVI CELG CSCO DTV0 FAST GENZ HSIC ISRG LBTYA MCHP NTAP PCAR RYAAY STLD VRTX ALTR BBBY CEPH CTAS EBAY FISV GILD IACI JAVA LIFE MICC NVDA PDCO SBUX STX0 WCRX

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Skewness and Kurtosis vs. Shape Parameters


The package akima was used to t akima splines to numerically invert the map from 3 and 4 to sr and r Estimates of 3 and 4 for the NASDAQ-100 equities were derived from the robust quantile estimates Results are displayed on the next slide The upper two graphs show scatterplots for the robust sample skewness and kurtosis on top of an image and contour plot for the parameter estimates 3 and 4 . The correlation ellipse contains 90% of the data. The lower two graphs show the inverted map plotting the parameter estimates 3 versus 4 . Here the contours show constant levels of the skewness and kurtosis. The dots represent the NASDAQ equities and the closed line the correlation transformed ellipse. The diagonal line represents the case of symmetric GLDs.
Yohan Chalabi, David Scott, Diethelm Wrtz u Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Skewness and Kurtosis vs. Shape Parameters


lambda 3
1.4 1.6 1.8 2.0 2.2 2.4 2.6 1.4 1.6 1.8 2.0 2.2 2.4 2.6

lambda 4

1.25

1.25

Kurtosis

Kurtosis

0.75
0.5 0.25

0.75
0.5 0.25

0.6

0.4

0.2

0.0 Skewness

0.2

0.4

0.6

0.6

0.4

0.2

0.0 Skewness

0.2

0.4

0.6

Skewness
0.2 0.2
0 .5
0.4
0.3
.1 0 0

Kurtosis
0.2
1.4 1.6

0.6

lambda 4

lambda 4

0.6

2.8

1.8

1.0

1.0

2.2

1.4

1.4

2.4

0.1

0.2

0.3

0.4

0.5

2.8

2.6

28

1.4

1.0

0.6 lambda 3

0.2

1.4

1.0

0.6 lambda 3

0.2

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Results
Fourth moments exist only for equities for which both 3 and 4 are greater than 0.25 The variance exists only for equities for which both 3 and 4 are greater than 0.5 We observe
for a reasonable number of equities, the fourth moment exists for the bulk of the equities, at least the variance exists for some of the equities, the variance does not exist

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Optimization
The robust method of moments approach only constitutes the rst stage of tting the GDL to a data set We considered a number of approaches to optimizing the t, using the robust method of moments estimates as a starting point
histogram methods goodness of t criteria maximum likelihood maximum product spacing

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Optimization
Histogram methods vary according to the way breaks are chosen. We used the choice of breaks due to Freedman and Diaconis There are many goodness of t measures which have been used for tting distributions. We used the Anderson-Darling statistic Maximum product spacing does not appear to have been used previously with the GLD

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Optimization Example: Google


GOOG Parameter Estimation

log f(x)

10

0 x

10

15

Results from the MLE (blue), MPS (red), AD (orange), and FD (green) approaches. The full lines are drawn from the tted distribution function and the points are taken from a kernel density estimate of the simulated series.
Yohan Chalabi, David Scott, Diethelm Wrtz u Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Results
We observe that there is very little dierence discernable between the goodness of t (AD) and MPS approaches The MLE t diers from AD and MPS in the tails by a small amount The tail t for the histogram (FD) approach is substantially dierent in the upper tail.

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Simulating Financial Returns


To simulate a set of typical nancial returns we used the GLD distribution with sampled parameters First note that the inter-quartile range and the tail related shape parameters are highly correlated We introduced a modied set of parameters {1 , 2 , , } where = 3 4 , and = 3 + 4 Then the only substantial correlations are 1 with and 2 with

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Correlation
Tail Index Parameterization

lambda1

lambda2

lambda3

lambda4

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Correlation
Skewness/Kurtosis Parameterization

lambda1

lambda2

delta

beta

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Parameter Simulation
Estimate the median, the inter-quartile range, and the robust skewness and kurtosis parameters from the 100 NASDAQ equities, and obtain the sample 1 , 2 , and s. Compute from the parameters 1 , 2 , , and density estimates using the smoothing spline ANOVA approach of [Gu, 2002] and [Gu and Wang, 2003] Estimate the dependency structures of 1 vs. and 2 vs from two bivariate Gaussian copulas Generate random variates for the probabilities from the copulas and compute from the marginal distributions the parameters 1 , 2 , , and . 3 and 4 are recalculated from and

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Marginal Parameters
lambda 1
4

delta

Density

Density 0.6 0.2 0.0 s 0.2 0.4 0.6

0 0.08

10

15

20

25

0.04 s

0.00

0.04

lambda 2
5 4

beta

Density

Density 1.0 0.8 0.6 s 0.4 0.2 0.0

0 0.7

0.5

0.3 s

0.1

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Copula Simulation
Correlation: lambda 1 | delta
0.04

Copula: lambda 1 | delta


1.0 0.8

0.00

0.02

p | delta

r | delta

0.04

0.08

0.4

0.2

0.0 r | lambda 1

0.2

0.4

0.0

0.2

0.4

0.6

0.0

0.2

0.4

0.6

0.8

1.0

p | lambda 1

Correlation: lambda 2 | beta


Copula: lambda 2 | beta


1.0 0.8

0.2

0.1

0.3

p | beta

r | beta

0.5

0.4

0.6

0.8

0.6

0.4 r | lambda 2

0.2

0.0

0.0

0.2

0.4

0.6

0.0

0.2

0.4

0.6

0.8

1.0

p | lambda 1

Correlation: lambda 1 | lambda 2


0.0

Correlation: lambda 3 | lambda 4


0.2

r | lambda 2

r | lambda 2

0.4

0.6

0.8

0.4

0.2

0.0 r | lambda 1

0.2

0.4

0.6

0.5

0.4

0.3

0.2

0.1

0.6

0.5

0.4

0.3

0.2

0.1

r | lambda 1

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Introduction Fitting the Generalized Lambda Distribution The NASDAQ-100 Parameter Optimization Simulating Financial Returns Conclusions

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Conclusions
The generalized lambda distribution is useful in tting the distribution of returns for equities It is easier to use and the results are more informative compared to the use of the stable distribution It is possible to realistically simulate nancial returns using the generalized lambda distribution

Yohan Chalabi, David Scott, Diethelm Wrtz u

Generalized Lambda

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outline Introduction Fitting The NASDAQ-100 Optimization Simulating Financial Returns Conclusions

Bibliography
Asquith, W. H. (2007). L-moments and TL-moments of the generalized lambda distribution. Computational Statistics & Data Analysis, 51(9):44844496. Gu, C. (2002). Smoothing Spline ANOVA Models. Springer Series in Statistics. Springer-Verlag, New York. Gu, C. and Wang, J. (2003). Penalized likelihood density estimation: Direct cross-validation and scalable approximation. Statistica Sinica, pages 811826. Hastings, C., Mosteller, F., Tukey, J. W., and Winsor, C. P. (1947). Low moments for small samples: A comparative study of order statistics. David Scott, Diethelm Wrtz Yohan Chalabi, u Generalized Lambda Th A l fM h i l S i i 18(3) 413 426

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 4

MARC PAOLELLA

82

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

An Asymmetric Multivariate Student's t Distribution Endowed with Different Degrees of Freedom

Marc S. Paolella

Swiss Banking Institute University of Zurich Zurich, Switzerland

An open and active question concerns the construction of a multivariate distribution whose marginals are Student's t but with potentially different degrees of freedom. This is of particular value in empirical finance, where it is well known that the tail indices, or maximally existing moments of the returns, differ markedly across assets. While several constructions can be found in the literature, all have weaknesses. In this paper, we propose a new construction, which is also easily endowed with a different asymmetry parameter for each marginal. While the computation of the density via the definition is possible but time-consuming, thus prohibiting direct calculation and optimization of the likelihood, we discuss how the method of indirect inference can be used. An example using series comprising the DJIA is illustrated.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

PART II

FRIDAY AFTERNOON

85

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 5

VIKRAM KURIYAN

86

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Global Financial Crises of 2008-2009

Vikram Kuriyan K3 Advisors, New York

We will present an analytical approach that takes an investment management point of view to look at the financial landscape. This talk will focus on the path of the crisis, trace the mechanisms through which the crisis was transmitted globally and offer some ideas for the future. We will aim to understand the drivers of bank balance sheet exposures that are the drivers of this crises. We will also look at bank balance sheets from the eye of a derivative trader to demonstrate that the banking system has implicit but often not well-understood asymmetric payoff structures and how a deep understanding of derivatives can make the banking system less fragile. We will also examine the role of regulators and rating agencies as inadvertent catalysts for this particular collapse. Lastly, we will offer some suggestions for the future.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Reflections on the current financial crisis: Banking, Credit and Panic


Singapore 2010 sponsored by ETH Zurich Risk Management Institute, National University of Singapore

Current Environment
A Quick Review: We are coming off of the greatest global economic contraction since the Great Depression Massive governmental intervention was necessary to prevent large parts of the global financial system from collapsing
United States United Kingdom Iceland Dubai Greece

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

In Other Words
Unprecedented Collapse PLUS Unprecedented Government Support EQUALS Unprecedented Changes in Asset Valuations

Will the future be a repeat of the 70s.or a repeat of the lost decades in Japan?

Outline of talk
Theory Multiple Models
Bank Stocks in an asset allocation Credit as a Put Option Demand deposit as a de stabilizer

Practice This present crisis


Robust Systems

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Multiple Models
Youve got to have models in your head. And youve got to array your experience, both vicarious and direct, on this latticework of models. Charles Munger.

As a practitioner, Asset Allocation is the starting point


Real money individuals through institutions typically allocate and re balance capital within the framework of a long term asset allocation strategy. The Endowment model (Harvard and Yale) is a good prototype

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Tradeoff Return vs Risk


The core asset classes
Stocks Bonds Real Assets (including real estate, commodities,) Hedge Funds Private Equity

Think about Risk of each segment: Volatility, correlations, macro environments, leverage, fat tails. Think about Risk in a portfolio context.

Bank stocks as an investment management allocation


Undiversified Fat tail risk Highly levered Fund themselves with hot money Own a lot of illiquid assets Accrual Accounting Similar exposures to peers Herd behaviour extrapolating the past into the future (historical VaR, historical default rates,)
Source: Bridgewater Daily Observations 12/3/2008

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Typical Bank Capital Structures

Source: Bridgewater Daily Observations 12/3/2008

Macro exposures of typical bank

Source: Bridgewater Daily Observations 12/3/2008

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Simulation from Monthly Rebalancing

Source: Bridgewater Daily Observations 12/3/2008

Source: Bridgewater Daily Observations 12/3/2008

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Asset Sales to keep leverage constant

Source: Bridgewater Daily Observations 12/3/2008

Simulation from Annual Rebalancing

Source: Bridgewater Daily Observations 12/3/2008

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Source: Bridgewater Daily Observations 12/3/2008

Now throw in implicit derivative exposures: Merton Model for Risky Debt
Credit = Risk Free Debt Guarantee Credit = Risk Free Debt Put(Asset, strike price) All credit = Risk Free Debt + Short Put Option Applies to all credit: corporate debt, cards, Mortgages, and, in particular, accrual books

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Now throw in implicit derivative exposures: Merton Model for Risky Debt

Now throw in implicit derivative exposures: Merton Model for Risky Debt
Applies to all credit: corporate debt, CDS, Mortgages, As derivative modellers, you know that the put delta goes up as the asset price collapses and so risk goes up too. Already have 4 decades of experience with derivative models to explain what went on and what can happen !! Do not need new models or technologies to analyze risk Derivative models explain how bank equity will behave in times of stress.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Bank Runs and Nash Equilibria


The structure of the demand deposit contract can induce a bank run as a stable equilibrium! Prisoners Dilemma:

D/D R/D

D/R R/R

Bank Runs and Nash Equilibria


Powerful model of how runs can just happen no reasons required. Just need changes in mass psychology.

D/D R/D

D/R R/R

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Flawed Portfolio Structures


Rely on government backing for deposits Rely on Accrual Accounting No explicit of modelling of credit risk as being short a put option

. Given this structure, stress has to be expected The only question is the timing and the severity. (Not a Black Swan).

Flawed Portfolio Structures


How much capital would a hedge fund of fund allocator put out to risk in such portfolio structures? How much credit should CEOs of such structures take as their own? . How do we make the system more robust?

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Robust Systems
it is the exposure (or payoff) that creates the complexity and the opportunities and dangers not so much the knowledge ( i.e., statistical distribution, model representation, etc.) Nassim Taleb in
http://www.edge.org/3rd_culture/taleb08/taleb08_index.htm

Finance Companies with simple structures


Asset Management companies Money Market funds with variable NAVs Highly Regulated retail banks (utilities) Islamic Banks

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Animal Spirits
2007 RBS paid $100 billion mainly in cash to buy ABN Amro A year later, you could buy
Citibank (20b), Morgan Stanley (11b), Goldman Sachs (20b), Deutsche Bank (13b), Barclays (13b),

And still have change left over

This particular crisis

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

This particular crisis


Virtually everybody in the country had this model in their heads, formal or otherwise, that house prices could not fall significantly. Warren Buffett

This particular crisis


Collapse of a housing bubble New types of mortgage products added fuel to propel the housing bubble
http://www.youtube.com/watch?v=mzJmTCYmo9g

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

This particular crisis


Excessive reliance by investors and regulators on rating agencies Credit Rating trumped due diligence

This particular crisis


Excessive leverage permeated the system
Hedge funds Private Equity Banks (especially acquisitive banks) Non bank finance sector particularly mortgage related Pensions and Endowments by committing to future purchases of private equity

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

This particular crisis


Run on capital markets Money Market funds withdrew from CP market after Lehman collapse Bond funds pulled back from direct lending to corporations Repo margin requirements changed dramatically Shadow banking came to a virtual halt

Crisis Pictures
Negative Swap Spreads/Limits of Arbitrage

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Crisis Pictures
Volkswagen

VoW

This Particular Crisis: Regulators


FNM and FRE had one regulator, OFHEO, to themselves SEC Failed to find Madoff even when presented to them by Harry Markopoulos
http://www.deepcapture.com/

FINRA Madoff and his brother were on the board of directors

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

This particular Crisis: There is nothing new under the sun


A Minsky moment is the point in a credit cycle or business cycle when investors have cash flow problems due to spiraling debt they have incurred in order to finance speculative investments. At this point, a major selloff begins due to the fact that no counterparty can be found to bid at the high asking prices previously quoted, leading to a sudden and precipitous collapse in market clearing
http://en.wikipedia.org/wiki/Minsky_moment

Bank Runs, Nash Equilibria and Self Fulfilling Prophecy John Nash, Robert K Merton

Derailed by De regulation Robust Systems: As a policy maker


Highly regulated banks? Small banks ? No systemic effect when the neighborhood restaurant goes out of business Global banks? Global regulators ? Basel 3 ? What about unregulated entities hedge funds, insurance companies ?

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Robust Systems: Talebs rules for a black swan free world


More regulation? No Small banks? Yes. No socialization of losses and privatization of gains Do not let someone with an incentive bonus manage a nuclear plant or a bank Minimize complexity. Minimize leverage. Embrace simplicity.

Robust Systems: Simplicity


Get rid of stable NAV products. Introduce variable NAV money market funds. This will stabilize the shadow banking system. Any entity that receives an implicit or explicit government guarantee (eg: Retail bank) must face restrictions on size, activity and geography. Separate risk taking (eg: investment banks) from commercial banks. Glass Steagall was a good idea. Encourage hedge funds as the vehicle for risk taking. Monitor and limit their leverage and size. Put derivative experts on the boards of banks.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Robust Systems: As an investor


As an investor, you have the ability to avoid this issue completely ! Avoid Fat Tailed Risk Diversify When a management with a reputation for brilliance tackles a business with a reputation for bad economics, it is usually the reputation of the business that remains intact. You should invest in a business that even a fool can run, because someday a fool will. Warren Buffett

End: On a positive note


A Global Migration Toward A Capitalistic Economy: Russia, Eastern Europe, China, Brazil, India, etc. Improvement in Decisions by Policymakers
We are all Keynesians now. Central Bank Response to 2007/2008 Credit Crises

Increased Coordination Across Regulatory Entities: Bank Regulatory Standards with new Basel requirements Scenario Analysis and Stress Testing Caveat: Be cautious about all fat tailed stress tests

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

References
Bank Runs, Deposit Insurance, and Liquidity by Douglas Diamond, Philip Dybvig The Journal of Political Economy Vol. 91, No. 3. 1983 . Bridgewater Daily Notes 12/03/2008 JPM 2008 Annual Report Niall Ferguson, The Ascent of Money Robert Merton, MIT OpenWorld lecture
http://mitworld.mit.edu/video/659

Vikram Kuriyan, Essays on Destabilizing Events in Financial Markets, 1991.

The Role of Risk Management


Crisis has demonstrated the need for stress testing and scenario analysis at every level of the economy. Wisdom is when you start looking beyond the numbers to causal relationships and to understand when structural breaks can occur.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Risk Taxonomy
We categorize risks by the nature of their origin and the frequency of occurrence. The fundamental categories are Transactional Risk Operating Risk Episodic Risk

Risk Taxonomy in more detail


Transactional Risk
Market Risk Credit Risk

Operational Risk Episodic Risk


Liquidity Risk Strategic Risk Macroeconomic Risk

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

GARP Functional Taxonomy of Risk Factors Transactional Risks


Market Risk Credit Risk

+
Operating Risks
Operational Risk

+
Episodic Risks
Liquidity Risk Strategic Risk Macro economic Risk Black Swan Risk

Historical Data Analysis Objective


To obtain a yardstick against which market risk situations can be compared To analyze historical data in order to obtain plausible stress situations To obtain the stress levels after historical financially catastrophic events

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Sample Data
20 year daily data of 14 major stock indices & 4 commodities 30 major currencies 26 interest rates in 16 major currencies 36 swap rates in 20 major currencies

Data Analysis
Calculation of daily, weekly, monthly, quarterly, semi annual and annual returns on a rolling basis Statistical analysis of data Classification of fluctuations into business as usual, mild stress, moderate stress, extreme stress, and historical worst case

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Stress Scenario Classification


Median = business as usual 1 = mild stress 2 = moderate stress 3 = extreme stress Historical low= worst case scenario

Stress Events Analysis


Data analyzed for 3 major stress events Black Monday 9/11 & subsequent recession Lehman Bankruptcy Maximum drawdown in 1 week, 1 month, 1 quarter, 6 months and 1 year from trigger event measured to analyze impact of event

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Weekly Swap rate movement


Instrument Business as Usual Mild AUD IR SWAP 10 YEAR AUD IR SWAP 2 YEAR CAD IR SWAP 1 YEAR CAD IR SWAP 10 YEAR CHF IR SWAP 10 YEAR DEM IR SWAP 1 YEAR DEM IR SWAP 10 YEAR DKK INTERBANK 3 MONTH DKK IR SWAP 10 YEAR

Positive Fluctuation
Historical maximum

Negative Fluctuation
Historical maximum

Moderate

Extreme

Mild

Moderate

Extreme

0 0 0 0 0 0 0 0 0

10 10 7 8 6 4 6 5 7

19 19 13 17 11 9 12 10 14

29 29 20 25 17 13 18 15 21

71 88 56 48 42 23 37 55 42

10 10 7 8 6 4 6 5 7

19 19 13 17 11 9 12 10 14

29 29 20 25 17 13 18 15 21

67 79 72 47 37 23 35 56 55

Swap rates during stress events


Black Monday
October 1987 March 1988 Instrument

9/11 & subsequent recession


September 2001 February 2002

Lehman Bankruptcy
September 2008 February 2009

Highest 1 week Highest Highest 1 week Highest Highest 1 week Highest deviation for time drawdown in 1 deviation for time drawdown in 1 deviation for time drawdown in 1 period week from event period week from event period week from event

DEM IR SWAP 10 YEAR GBP IR SWAP 10 YEAR HKD INTERBANK 3 MONTH NOK INTERBANK 3 MONTH SGD INTERBANK 3 MONTH EURO INTERBANK 3 MONTH USD IR SWAP 10 YEAR

25 44 232 112 50 131

40 46 63 26 50 126

27 26 33 47 25 36 45

7 7 38 27 19 46 22

36 35 100 71 19 11 47

21 12 86 53 13 7 29

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

In times of trouble
In a crisis, uncorrelated assets can become correlated, as we saw in the volatile summer of 2007
Correlation to S&P 500 Index* High Yield Bonds 99% -8% EM Stocks 100% 53% Financial Mtl & Mining Stocks Stocks 99% 95% 36% 26% USD vs. JPY 80% -2%

July Hist Average

AVG 95% 21%

* Rolling 3m Correlations to the S&P 500 since 1970

Risk Management versus Uncertainty Management


Frank Knight 1921
Uncertainty must be taken in a sense radically different from the familiar notion of Risk A measurable uncertainty, or Risk . Is so far different from an unmeasurable one

Finance Profession needs to move more toward embracing the possibility of black swans and coming up with responses to extreme events and less enamoured with the precision of risk reports

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Risk Management
Real money individuals through institutions typically allocate and re balance capital within the framework of a long term asset allocation strategy. Rapid changes in the entire asset allocation pie is a potential cause of stress.

Risk Management
The core asset classes
Stocks Bonds Real Assets (including real estate, commodities,) Hedge Funds Private Equity

All of the above must be monitored. Bubbles/depressions in any one asset class can point to the next source of stress Concentration and over crowding in any one asset class is also a point of stress
Source of risk in of themselves Multiplier effects through credit extended on collateral

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Risk Management
The dangerous bubble asset classes
Equities Debt Real Assets (including real estate, commodities,)

Debt bubbles (credit traps) tend to be the most dangerous because it is the least observable

Other sources of risk


Macro Environment
Inflation, deflation Growth, recession Normal credit cycle, credit deflationary bust

Long cycle times Stress points are few and far between Not enough data to model robustly

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Other sources of risk


Catastrophe Risk
Weather (Hurricanes) Earthquakes Wars Terrorism

Will affect real economy through liquidity demands, asset prices, systemic collusion Poisson processes, hard to model, but real and inevitable

Collapse by Jared Diamond


Diamonds celebrated book which added to the reputation he earned through Guns, Germs and Steel, a Pulitzer prize winner about why some societies triumph over others sought to discover what makes civilisations, many at their apparent zenith, crumble overnight. The Maya of Central America, the stone carving civilisation of Easter Island, and the Soviet Union all suddenly shattered.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Societal Risk: Overfishing


If I was Japans worst enemy trying to figure out a strategy to drive it into a crisis in 10 years time, my strategy would be to get the Japanese to do exactly what they are doing, which is to over harvest their main source of protein. Humans ability to destroy the basis of their own livelihood is a recurring Diamond theme.

Societal Risk: Over consumption


There is a parallel based on the same fundamental mechanisms of the economic collapse that were seeing now and the collapse of past civilisations such as the Maya, he continues. The message is that when you have a large society that consumes lots of resources, that society is likely to collapse once it hits its peak.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Societal Risk: Over consumption


The average per person consumption rate in the first world of metal and oil and natural resources is 32 times that of the developing world, says Diamond. That means that one American is consuming like 32 Kenyans. The problem is not the number of Kenyans, the problem is when Kenyans or, more pressingly, big developing countries such as China, gain the ability to consume like Americans.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 6

BERNARD LEE

120

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

An Analysis of Extreme Price Shocks and Illiquidity Among Systematic Trend Followers
Bernard Lee Singapore Management University - School of Economics

Shih-Fen Cheng Singapore Management University - School of Information Systems Annie Koh Singapore Management University - School of Business

Abstract

We construct an agent-based model to study the interplay between extreme price shocks and illiquidity in the presence of systematic traders known as trend followers. The agent-based approach is particularly attractive in modeling commodity markets because the approach allows for the explicit modeling of production, capacities, and storage constraints. Our study begins by using the price stream from a market simulation involving human participants and studies the behavior of various trend-following strategies, assuming initially that their participation will not impact the market. We notice an incremental deterioration in strategy performance as and when strategies deviate further and further from the theoretical strategy of lookback straddles (Fung and Hsieh 2001), due to the negative impacts of transaction cost and imperfect execution. Next, the trend followers are allowed to participate in the market, trading against uninformed computer traders making randomized bids and offers. We notice that market prices begin to break down as the percentage of trend followers in the market reaches 80%. In addition, in a market dominated by smart traders, it becomes increasingly difficult for any of them to generate profits using what is supposed to be a long gamma strategy. After all, trading is a zero-sum game: It is not feasible for any long gamma trader to generate a consistent profit unless someone else is willing to be on the other side of his/her trades. In any such market dominated by smart traders with low liquidity and extreme price instability, one proposed solution (as proposed earlier by the U.S. Commodity Futures Trading Commission) is to control position size limits, by either decreasing them (in the original proposal) or increasing them (for completeness in our analysis). Based on our simulation results, we have found no evidence supporting that such a solution will be effective; in fact, doing so will only lead to erratic price behavior as well as a variety of practical issues when imposing such changes to position size limits. An alternative proposal is to intervene in the market direct/indirectly, such as by using a market maker to inject/reduce liquidity. Our simulation results show evidence that injecting and reducing liquidity by the market maker can both be effective. However, a market maker can accumulate a large negative P&L by buying in a one-sided, falling market in which it is the only bidder, or vice versa. Therefore, in practice, no market maker may volunteer to participate in any such market rescue efforts unless governments are willing to underwrite some of its large potential losses. In short, direct/indirect intervention by controlling liquidity is not a panacea, and there are practical limits to its effectiveness.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 7

KAM FONG CHAN

122

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Spillover effect between the Credit Default Swaps (CDS) and the stock market using a general stochastic volatility with jumps model

Kam Fong Chan

Risk Analytics Division Risk Management Department United Overseas Bank (UOB) Ltd

This paper investigates the time-series dynamics governing the credit default swap indices (CDX), and volatility and jump spillover between the stock and CDX markets. We use daily returns data on the S&P500 and Dow Jones CDX North American Investment Grade 5-year (CDX.NA.IG.5Y) indices over the period between June 1, 2004 and June 30, 2009. Our empirical evidence suggests the presence of two components - (i) diffusive stochastic volatility; and (ii) jumps in returns and volatility - in both the stock and CDX markets. Further, our results show that the contemporaneous correlation between the stochastic volatilities of both markets decreased during financial crisis, suggesting greater diversification benefits between the stock and CDX markets in periods of financial downturn. In addition we find evidence of strong bidirectional Granger-causality between the stochastic volatility in the stock and CDX markets during the crisis period. We find no evidence, however, to suggest lagged jumps in the CDX market predict jumps in the stock marketand vice versa.

Common work with Alastair Marsden from University of Auckland, New Zealand.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

United Overseas Bank

Volatility and Jump Spillover Between Stock and CDX Markets: Evidence during Global Financial Crisis

Kam Fong Chan* (United Overseas Bank, Singapore) & Alastair Marsden (University of Auckland, New Zealand)
19 February 2010 * The views here are those of the authors and do not necessarily reflect the views of UOB Singapore.

K. F. Chan

Stock and CDX

Introduction
Outline of the presentation:
CDS and CDX Graphical analysis Objectives of the study The model Econometric method Empirical results

K. F. Chan

Stock and CDX

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Credit Default Swaps


What are credit default swaps (CDS)?
A bilateral contract acting as an insurance against credit risk

CDS spread/premium Reference entity

Protection buyer

Protection seller

K. F. Chan

Stock and CDX

Credit Default Swaps


What are credit default swaps (CDS)?

Credit event 1 recovery rate (%) Reference entity

Protection buyer

Protection seller

K. F. Chan

Stock and CDX

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Credit Default Swaps


The CDS market between 2002 and 2009:
70,000.00 60,000.00
Notional amount (in USD$ billion)

50,000.00 40,000.00

30,000.00 Credit event 20,000.00 10,000.00 1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st half half half half half half half half half half half half half half half 2002 2002 2003 2003 2004 2004 2005 2005 2006 2006 2007 2007 2008 2008 2009

K. F. Chan

Stock and CDX

Credit Default Swap Indices


What are Credit Default Swap Indices (CDX)?
It tracks the default risk on a basket of credit entities Represent changes in market perceptions of default risk Provide important information to traders

K. F. Chan

Stock and CDX

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Graphical Analysis
300 CDX 250 200 150 1000 100 50 0 800 600 S&P500 1400 1200 1600

06 2004

09 2004

01 2005

05 2005

09 2005

12 2005

04 2006

08 2006

12 2006

04 2007

08 2007

11 2007

03 2008

07 2008

11 2008

Figure : Daily prices of S&P500 and CDX.NA.IG.5Y (CDX) between June 1, 2004 and June 30, 2009 Note: CDX.NA.IG.5Y refers to the Dow Jones CDX North American Investment Grade 5-Year index

K. F. Chan

Stock and CDX

Graphical Analysis
Figure : Daily returns of S&P500 and CDX.NA.IG.5Y (CDX) between June 1, 2004 and June 30, 2009
25 20 15 10 5

(a) S&P500
01 06 04 01 10 04 01 02 05 01 06 05 01 10 05 01 02 06 01 06 06 01 10 06 01 02 07 01 06 07 01 10 07 01 02 08 01 06 08 01 10 08 01 02 09 01 06 09

0 -5 -10 -15 -20 -25

25 20 15 10 5

(b) CDX
01 06 04 01 10 04 01 02 05 01 06 05 01 10 05 01 02 06 01 06 06 01 10 06 01 02 07 01 06 07 01 10 07 01 02 08 01 06 08 01 10 08 01 02 09 01 06 09

0 -5 -10 -15 -20 -25

K. F. Chan

Stock and CDX

03 2009

S&P500

CDX

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Objectives
Objectives of the study:
Investigate the time-series properties of the CDX returns. Examine volatility and jump spillover between the CDX and stock markets.

K. F. Chan

Stock and CDX

The Model
The SVCJ model:
Stochastic Volatility with Correlated Jumps (SVCJ). Belong to the affine jump-diffusion model class of Duffie et al. (2000). Has been examined in the stock market by Eraker et al. (2003), Eraker (2004), Broadie et al. (2006) and Li et al. (2006).

K. F. Chan

Stock and CDX

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The Model
The SVCJ model:

U measures the correlation between returns and volatility. NY and NV are Poisson jumps in returns and volatility, respectively. [Y and [V are the jump sizes in returns and volatility, respectively.

K. F. Chan

Stock and CDX

The Model
The SVCJ model:
Assume NY = NV = N [V ~ exp(PV) [Y ~ N(PY + UJ [V, Q2) Assume UJ = 0

K. F. Chan

Stock and CDX

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Econometric Method
The SVCJ model is discretized as:

We have the followings to estimate:


Latent volatility variables Latent jump sizes Latent jump times Model parameters

K. F. Chan

Stock and CDX

Econometric Method
We estimate the model using Markov Chain Monte Carlo (MCMC) method. The idea is to estimate the latent variables and model parameters from their joint posterior density:

K. F. Chan

Stock and CDX

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Empirical Results

K. F. Chan

Stock and CDX

Empirical Results

40 35 30 25 20 15 10 5 0 CDX S&P500

02 06 04

02 12 04

Figure : Stochastic volatilities of the S&P500 and CDX indices

02 06 05

02 12 05

K. F. Chan

02 06 06

02 12 06

Stock and CDX

02 06 07

02 12 07

02 06 08

02 12 08

02 06 09

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Empirical Results
Figure : Jump probabilities of the S&P500 and CDX indices
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0

(a) S&P500

02 06 04
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0

02 12 04

02 06 05

02 12 05

02 06 06

02 12 06

02 06 07

02 12 07

02 06 08

02 12 08

02 06 09

(b) CDX

Contemporaneous Volatility Spillover


We test for contemporaneous volatility spillover between S&P500 and CDX markets. We split the sample period into two: (i) pre-crisis (June 2, 2004 Feb 6, 2007); and (ii) crisis (Feb 7, 2007 June 30, 2009). Pearson and Spearman correlation estimates of SVt are lower during crisis period, suggesting for benefits of diversification.

02 06 04

02 12 04

02 06 05

02 12 05

02 06 06

K. F. Chan

K. F. Chan

02 12 06

02 06 07

Stock and CDX

Stock and CDX

02 12 07

02 06 08

02 12 08

02 06 09

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Inter-Temporal Volatility Spillover


We test for inter-temporal volatility spillover between S&P500 and CDX markets. We find evidence of Granger-causality relationship only during the crisis period. Implication: The CDX market contains some information beyond what is offered by the stock market during economic downturns.

K. F. Chan

Stock and CDX

Contemporaneous & Inter-Temporal Jump Spillover


We test for contemporaneous and inter-temporal jump spillover between S&P500 and CDX markets. There was contemporaneous jump spillover between both markets; but there was no inter-temporal jump spillover effect.

K. F. Chan

Stock and CDX

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 8

ANDREW ELLIS

134

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The R/Rmetrics Open Source Project

Rmetrics Association Zurich Rmetrics Core Team Presented by Andrew Ellis

Rmetrics is a collection of R packages originally created for teaching computational finance and financial engineering by the Econophysics Group at ETH Zurich. The Rmetrics packages cover a wide range of topics such as time series analysis, hypothesis testing, volatility forecasting, extreme value theory, pricing of derivatives, portfolio analysis, risk management, trading analysis and many more. Rmetrics offers an open source teaching solution with state-of-the-art algorithms to help the integration of academic research to industry. All packages are released under the GNU GPL license. Many of the functions contained in this collection are not only used by students in education at the ETH in Zurich, but also in many other academic institutes and business schools worldwide. Furthermore, the Rmetrics packages are increasingly being used as a code archive for rapid model prototyping in business environments such as banks, fund management firms, and insurance companies. Beside the software development the Rmetrics Association supports further fields: A high quality documentation project with the publication of ebooks and user guides for R/Rmetrics packages, supporting the R-in-Finance special interest group, the organization of user and developer workshops, summer schools and conferences, and the organization of student internships at ETH Zurich. The Rmetrics Association is a non-profit foundation under Swiss law.

www.rmetrics.org

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

What is Rmetrics?
Andrew Ellis Rmetrics Association & ETH Zurich www.rmetrics.org/

1
Friday, 19 February 2010 1

R
the S language was developed by John
Chambers at Bell labs

R is the open source version of S, and has R has hundreds of contributed packages,
available on CRAN www.r-project.org

become the standard software in statistics

You can nd out more about R here:


2
Friday, 19 February 2010 2

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Rmetrics packages
A collection R packages originally created
for teaching computational nance and nancial engineering by the Econophysics Group at ETH Zurich

Rmetrics packages cover a wide range of

topics such as time series analysis, portfolio optimization, extreme value theory, risk management
3

Friday, 19 February 2010

Rmetrics packages
All packages are released under the GNU
Public license (GPL)

Rmetrics packages contain open source

implementations of the latest research, thus making the resulting methods and techniques available to everybody

4
Friday, 19 February 2010 4

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Rmetrics packages
Rmetrics packages are available on CRAN
(stable versions) Rforge

Development version are available on nd out more here: www.rmetrics.org/


5
Friday, 19 February 2010 5

Rforge
R-Forge offers a central platform for the
development of R packages

offers easy access to SVN repository packages are built and checked daily
(binaries for Windows and OS X)

mailing lists, bug tracking http://r-forge.r-project.org/


6
Friday, 19 February 2010 6

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Rforge
http://r-forge.r-project.org/projects/
rmetrics/

Rmetrics has 47 packages on Rforge currently 20 developers packages include: fPortfolio, fGarch,
7
Friday, 19 February 2010

fOptions, randtoolbox, Generalized Hyperbolic, fCopulae, and many more

A brief history of Rmetrics


1997: Diethelm Wuertz started to use the S
language for the assignments of his Econophysics lectures at ETH Zurich

1999: the software was ported to the open


source R environment, creating the rst R packages for basic nancial functions and for nancial time series analysis.

2001: Rmetrics project is born


8
Friday, 19 February 2010 8

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A brief history of Rmetrics


2004: the Rmetrics packages were
of the Debian Linux distribution contributed to the CRAN Server, the ofcial home for R packages

Rmetrics packages are also included as part R-sig-Finance mailing list is introduced 2008 packages are hosted on the new Rforge server in Vienna
9
Friday, 19 February 2010 9

Organization of Rmetrics
Rmetrics Association was founded as an The Rmetrics Association provides
interest group, and is now organized as a non-prot association under Swiss law software packages, writes documentation, organizes and funds student projects and workshops
10
Friday, 19 February 2010 10

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Who uses Rmetrics packages?


Created for teaching computational nance
and nancial engineering at ETH, now used at many universities worldwide look at every piece of code

because everything is open source, you can


11
Friday, 19 February 2010 11

Who uses Rmetrics packages?


Rmetrics packages are increasingly being
used as a code archive for rapid model prototyping in business environments such as banks, fund management rms, and insurance companies (Chicago), Bank Santander & Credit Suisse (Madrid), European Central Bank, (Frankfurt), Government Investment Corp, (Singapore), Merrill Lynch (Houston)
12
Friday, 19 February 2010 12

Bank Clariden (Zurich), Bank of America

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Where can I get help on R/Rmetrics?


There is a mailing
for R in Finance

https://stat.ethz.ch/
mailman/listinfo/rsig-nance

13
Friday, 19 February 2010 13

Rmetrics documentation
Rmetrics aims to provide rst class
documentation of packages to-date

Published electronically; books can kept up www.rmetrics.org/ebooks


14
Friday, 19 February 2010 14

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Available ebooks
Basic R for Finance (published as draft) A Discussion of Time Series Objects for R
in Finance (free)

Portfolio Optimization with R/Rmetrics books can be purchased (or downloaded)


from our website two years

you get updates to the ebooks for one or


15
Friday, 19 February 2010 15

Planned ebooks
Advanced Portfolio Optimization with R/
Rmetrics

Chronological Objects with Rmetrics Books by authors of other packages


16
Friday, 19 February 2010 16

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Publish a book with Rmetrics


Due to the nature of electronic publishing,
Rmetrics is able to offer more interesting conditions for authors than most other publishing companies Rmetrics Association, give book away for free

3 models: get paid, donate proceeds to the

17
Friday, 19 February 2010 17

Rmetrics Events
Meielisalp workshop: takes place every year
in June/July in the Swiss mountains (limited to 50 participants, so register early) conference in Singapore

Computational Topics in Finance Training courses: Basic R, Using R for https://www.rmetrics.org/events


18
Friday, 19 February 2010 18

Finance, Portfolio Optimization with R/ RMetrics

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Student internships
Rmetrics provides student internships at
the Econophysics Group, Institute of Theoretical Physics, ETH Zurich documentation

Students work on package development or Rmetrics is continuously looking for


sponsors for these internships
19
Friday, 19 February 2010 19

Sponsorship
Sponsor for sudent internships and events
so far include: Finance Online (Zurich), Insightful (Tibco), Reechem (Hedge Fund), Invesco, Theta Fund, Revolution, Mango Solutions, ETH, RMI

20
Friday, 19 February 2010 20

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Join Rmetrics
add your packages to the Rmetrics project support student interships buy the books sponsorship for workshops, conferences www.rmetrics.org
21
Friday, 19 February 2010 21

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 9

ANMOL SETHY

148

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

fxregime: A tool for exchange rate analytics


Achim Zeileis1, Ajay Shah2, Anmol Sethy3, Ila Patnaik2, Vimal Balasubramaniam2

Measurement of de facto exchange rate regimes has been an area of interest to the economics community as well financial market traders, albeit for different purposes. A continuous measurement of exchange rate flexi1bility at low frequency is useful to economists in obtaining results that provide a glimpse into the open-macro-economy framework. Traders on the other hand are more interested in looking for high frequency changes in the exchange rate regime to assimilate new information in expectations for currency movements. In the economics literature, the existing measures of de facto currency regimes do not provide a fine structure of classifying exchange rate regimes, and often redefine classifications making comparison over time difficult. The situation is further complicated by the fact that information from the central banks is often limited and sometimes misleading as well. The de facto exchange rate regime can be easily estimated by a least-squares regression for exchange rate returns and changes in the exchange rate regime correspond to changes in the regression parameters. However, unlike in classical least-squares methods (such as the Bai & Perron framework for structural change analysis), the error variance is not a nuisance parameter but of prime interest as well as it corresponds to the flexibility of the exchange rate regime. Hence, we extend the standard structural change framework to maximum likelihood models where we can easily incorporate the error variance as a full model parameter in an (approximately) Gaussian model. In this model we can perform testing (in historical data), monitoring (in incoming data to evaluate its divergence from historical data), and dating of structural changes in exchange rate regimes. All three techniques (testing, monitoring, dating) are provided in the R package "fxregime". A particular challenge, however, is the dating of structural changes as the algorithm's complexity is of order O(n^2). A simple way to speed this process up is to parallelize the search for the breakpoints. This has been implemented through the use of foreach package in R. This is done in a manner that the code becomes impervious to whether the underlying system is a multicore (in which case the library deployed by the user is multicore) or a cluster (in which case the library snow is employed). Parallel computing, however, leads to computational and process time gain only when the time series under study is long.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime

Package fxregime
Continuous measure of de facto currency regimes Achim Zeileis1 Ajay Shah2 Ila Patnaik2 Balasubramaniam Vimal2 Anmol Sethy3
1 WU 2 National

Wirtschaftsuniversitt Wien (Austria)

Institite of Public Finance and Policy(India)


3 Citigroup

(Singapore)

February 19, 2010

Package fxregime Outline

1 Outline 2 De facto exchange rate regimes 3 Purpose of measuring currency regimes 4 Estimation Technique 5 Some results 6 Recap

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime De facto exchange rate regimes

What is an exchange rate regime?

An exchange rate regime is the way a country manages its currency with respect to other currencies Management of currency and its benets are not entirely clear in academic literature The exchange rate regime has an impact on
1 2 3 4

Financial ows and market eciency Value of trade (imports and exports) On ination in the economy On interest rates in the economy

Package fxregime De facto exchange rate regimes

Importance of measuring de facto currency regimes

Important to understand the operating environment for business in order to ascertain:1 2

Currency exposure Risk of macroeconomic crisis Long-term understanding where an economy stands, vis-a-vis the impossible trinity Risk of macroeconomic crisis and build up in pressure Financial Development Assessment of central bank policy on exchange rate management

Policy implications:1 2 3 4

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime De facto exchange rate regimes

Dierent classication of exchange rate regimes

Stated intention of central bank do not reect reality Measurement of de facto currency regimes becomes signicant given such dierences Academic literature has used various measures to classify exchange rate regimes into various categories that depend on central bank sources and multiple variables. Often, these classication miss the ne structure of the exchange rate regime. that are limited and misleading in measuring de facto currency regimes.

Package fxregime Purpose of measuring currency regimes

For economists

Helps in answering questions on:1 2

The nature of exchange rate regime and its consequences for trade and nance The position of economies vis-a-vis the impossible trinity

Aids in further analytical research on open macroeconomics in areas of nance, trade, monetary policy and so on.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Purpose of measuring currency regimes

For traders

Traders can use the monitoring system which can warn them of possible break away from recent behaviour.

Package fxregime Estimation Technique

Frankel-Wei regression methodology

A valuable tool for understanding the de facto exchange rate regime in operation is a linear regression model based on cross-currency exchange rates (with respect to a suitable numeraire, e.g., CHF). If estimation involving the Singapore dollar (SGD) is desired, the model estimated is:
d log SGD CHF = 1 +2 d log USD CHF +3 d log JPY CHF +4 d log DEM CHF +5 d log GBP CHF +

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Estimation Technique

Testing for structural breaks

Testing for parameter stability has:H0 : (i) = (0) H1 : (i) = (0) where is the k dimensional parameter we are interested in

Package fxregime Estimation Technique

Testing Process

Fit a regression model once on the whole sample Capture the cumulative sum of model deviations The model deviations are the empirical estimating functions for testing parameter stability

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Estimation Technique

Testing Process

200 2004

400

600

800

1000

1200

2006

2008
t

2010

2012

Package fxregime Estimation Technique

Testing Process

4000 2004

2000

2000

4000

2006

2008
t

2010

2012

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Estimation Technique

Dating structural change

On evidence of parameter instability, the attempt is to know the dates and the extent of change. Either use an exhaustive search over all conceivable partitions of order O(nm ) or Employ dynamic programming approach which can reduce this to O(n2 ) as discussed in Perron and Bai (Econometrica, 2002). The technique relies of a triangular matrix of (i, j) for all 1 i < jn , (i, j) = min,2 j (yk , xk , , 2 ) k=i

Package fxregime Estimation Technique

Uniqueness of package fxregime


Assessing structural breaks is basically assesssing the stability of an exchange regression Unlike usual methods where the error term is a nuisance parameter, RSS ()=
n i=1 (yi

For fx rates the variance of the error term has to be considered as a full parameter. NLL (, )=
yi xiT n 1 ))) i=1 (log ( (

xiT )

For a given number of breaks m, the optimal breaks can thus be found. To decide upon the number of breaks, information critera can be used.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Estimation Technique

Monitoring currency regimes

Monitoring currency regimes is a continuation of the empirical process as new data ticks in. Compute the empirical estimating function for each incoming observation and update the cumulative and recursive process However an assumption has to be made about the model initially used to set up the efp

Package fxregime Estimation Technique

Implementation issues

The dating of structural changes is a particular challenge as the algorithms complexity is of order O(n2 ) The attempt has been to speed this process up by parallelising the search for the breakpoints.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Estimation Technique

Parallel estimation

Packages foreach, multicore and snow have been employed to tackle this issue. This is useful only if the time series is long Communication losses override computational gain when the time series involved is not long. Useful only when time series is long. Computational time drops to an extent of 25-30%

Package fxregime Some results

KRW Results of FW regression


1 Start 1991-01-11 End 2009-12-25 r2 0.56 USD 0.67 DUR 0.23 GBP 0.13 JPY 0.11 2 1.30

USD

800

1000

1200

1400

1600

1800

2000

1995

2000 Time

2005

2010

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Some results

The Korean Won


M-fluctuation test
3 3 DURCHF GBPCHF (Variance) 1995 2000 2005 2010 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2

(Intercept) USDCHF JPYCHF

-3

-2

-1

3 -3

-2

-1

3 -3

-2

-1

1995

2000

2005

2010

Time

Time

Package fxregime Some results

The Korean Won


2000 USD 800 1000 1200 1400 1600 1800

1995

2000 Time

2005

2010

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Some results

The Korean Won

1 2 3 4 5

Start 1991-01-11 1995-01-27 1997-11-21 1998-09-18 2008-03-07

End 1995-01-20 1997-11-14 1998-09-11 2008-02-29 2009-12-25

r2 0.98 0.83 0.15 0.69 0.27

USD 1.01 0.87 -1.03 0.65 0.44

DUR -0.00 -0.06 1.27 0.24 0.52

GBP -0.01 0.07 1.17 0.09 0.12

JPY -0.02 0.16 -0.09 0.27 -0.27

2 0.07 0.42 7.58 0.74 3.13

Package fxregime Some results

Monitoring results: Korean Won


Monitoring of FX model

300

Empirical fluctuation process

200

100

2007

2008 TIME

2009

2010

900

1000

1100

1200

1300

1400

1500

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Recap

In summary...

fxregime can aid in both historical analysis as well as mointoring of exchange rates Employs generalized uctuation tests for detecting strucural breaks Extends usual methods for analysis by incorporating variance as a full parameter Parallelization for speedier computations

Package fxregime Recap

References

Achim Zeileis, Ajay Shah, Ila Patnaik (2010).Testing, Monitoring, and Dating Structural Changes in Exchange Rate Regimes. Computational Statistics & Data Analysis, Forthcoming. Preprint at http://statmath.wu.ac.at/ ~zeileis/papers/Zeileis+Shah+Patnaik-2010.pdf Achim Zeileis, Ajay Shah, Ila Patnaik, Anmol Sethy (2010). fxregime: Exchange Rate Regime Analysis. R package version 1.0-0. URL: http://CRAN.R-project.org/package=fxregime

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Package fxregime Recap

Thank You

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 10

KARIM CHINE

164

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Elastic-R a google docs-like portal for data analysis in the cloud

Karim Chine
Cloud Era Ltd, Cambridge UK

Abstract

Elastic-R is a new portal built using the Biocep-R platform. It enables statisticians, computational scientists, financial analysts, educators and students to use cloud resources seamlessly; to work with R engines and use their full capabilities from within simple browsers; to collaborate, share and reuse functions, algorithms, user interfaces, R sessions, servers; and to perform elastic distributed computing with any number of virtual machines to solve computationally intensive problems.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

PART III

SATURDAY MORNING

167

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 11

DEFENG SUN

168

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A Majorized Penalty Approach for Calibrating Rank Constrained Correlation Matrix Problems

Sun Defeng
Risk Management Institute National University of Singapore

Abstract:

In this paper, we aim at finding a nearest correlation matrix to a given symmetric matrix, measured by the componentwise weighted Frobenius norm, with a prescribed rank and bound constraints on its correlations. This is in general a non-convex and difficult problem due to the presence of the rank constraint. To deal with this difficulty, we first consider a penalized version of this problem and then apply the essential ideas of the majorization method to the penalized problem by solving iteratively a sequence of least squares correlation matrix problems without the rank constraint. The latter problems can be solved by a recently developed quadratically convergent smoothing Newton-BiCGStab method. Numerical examples demonstrate that our approach is very efficient for obtaining a nearest correlation matrix with both rank and bound constraints.

This is a joint work with Yan GAO

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A Majorized Penalty Approach for Calibrating Rank Constrained Correlation Matrix Problems
Defeng Sun
Department of Mathematics and Risk Management Institute National University of Singapore
This is a joint work with Yan Gao at NUS

February 20, 2010

On January 15, 2010, I received the following email: From: XXX@grupobbva.com Sent: Friday, January 15, 2010 5:14 PM To: Sun Defeng Cc: XXX XXX Subject: Nearest Correlation Matrix: Faster code request Dear Mr. Sun, Please let me introduce myself. My name is XXX and I work in one of Spains major banks, BBVA. The position that I hold is Quantitative Analyst. We have been looking for quite a while for nearest correlation matrix problem algorithms until we found your paper An augmented Lagrangian dual approach for the H-weighted nearest correlation matrix problem ...,
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 2 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

which shows not only a feasible approach, but also robust and fast results. I was also happy to check and test the MATLAB code that you provide in your web page ..., with outstanding results. We are planning to apply your algorithm to large scale problems (around 2000x2000 correlation matrixes) through a C++ implementation using LAPACK library routines; this is why we are particularly interested in performance. Could you please provide us with any faster code (MATLAB or other) for this matter? Thank you in advance and sorry for any inconvenience this may cause you. Regards, XXX

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 3 / 40

On November 18, 2009, I received the following email: From: XXXXX@fortis.com Sent: Wednesday, November 18, 2009 5:11 PM To: Sun Defeng Subject: nearest correlation matrix Dear Professor Sun, For R&D purpose, I am currently using your algorithms CorNewton and CorNewton3 Wnorm, which I downloaded from your webpage. The results look very satisfactory. I was wondering whether you would have another version of the algorithm available in C or C++. Best Regards, Dr. XXX XXX BNP Paribas Equity Derivatives Quantitative Research
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 4 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

On October 27, 2009, I received this from Universiteit van Tilburg: My thesis is about correlations in a pension fund pooling. It is important for economic capital calculations. For some risks such as operational risk, I dont have data and hence I need to consult for an expert opinion. Then I might end up with not PSD matrices. Therefore, I need to calculate nearest correlation matrix. In my given correlation matrix, I want to x the correlations, which are data driven and I want the rest of the correlations not smaller than 0.1 from original matrix. Your code is very convenient for my study. However, ...

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 5 / 40

On November 3, 2009: Thank you for your valuable time, comments and helping me about solving my problem. I gave no chance that my xed constraints could be non-PSD before. Your advice solves the problem. I will modify my study in the light of it.

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 6 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The model
In this talk, we are interested in the following rank constrained covariance matrix problem min s.t. H (X G)
F

Xii = 1, i = 1, . . . , n Xij = eij , (i, j) Be , Xij uij , (i, j) Bu , rank(X) r , Xij lij , (i, j) Bl , (1)

n X S+ ,

where Be , Bl , and Bu are three index subsets of {(i, j) | 1 i < j n} satisfying Be Bl = , Be Bu = , and lij < uij for any (i, j) Bl Bu .
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 7 / 40

continued
n Here S n and S+ are, respectively, the space of n n symmetric matrices and the cone of positive semidenite matrices in S n .

is the Frobenius norm dened in S n .

H 0 is a weight matrix. Hij is larger if Gij is better estimated. Hij = 0 if Gij is missing.
n A matrix X S+ is called a correlation matrix if X and Xii = 1, i = 1, . . . , n. n 0 (i.e., X S+ )

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 8 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A simple correlation matrix model


min s.t. H (X G) X 0,
F

Xii = 1 , i = 1, . . . , n

(2)

rank(X) r .

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 9 / 40

The simplest corr. matrix model


min s.t. (X G) X 0,
F

Xii = 1 , i = 1, . . . , n

(3)

rank(X) r .

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 10 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

In nance and statistics, correlation matrices are in many situations found to be inconsistent, i.e., X 0. These include, but are not limited to,

Structured statistical estimations; data come from dierent time frequencies Stress testing regulated by Basel II; Expert opinions in reinsurance, and etc.

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 11 / 40

One correlation matrix


Partial market data1

1.0000 0.9872 0.9485 0.9216 0.9872 1.0000 0.9551 0.9272 0.9485 0.9551 1.0000 0.9583 G= 0.9216 0.9272 0.9583 1.0000 0.0485 0.0754 0.0688 0.1354 0.0424 0.0612 0.0536 0.1229

0.0485 0.0754 0.0688 0.1354 1.0000 0.9869

0.0424 0.0612 0.0536 0.1229 0.9869 1.0000

The eigenvalues of G are: 0.0087, 0.0162, 0.0347, 0.1000, 1.9669, and 3.8736.
1

RiskMetrics (www.riskmetrics.com/stddownload edu.html)


NUS/SUN 12 / 40

R/Rmetrics Computational Topics in Finance Conference

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Stress tested
Lets change G to [change G(1, 6) = G(6, 1) from 0.0424 to 0.1000]
1.0000 0.9872 0.9485 0.9216 0.9872 1.0000 0.9551 0.9272 0.9485 0.9551 1.0000 0.9583 0.9216 0.9272 0.9583 1.0000 0.0485 0.0754 0.0688 0.1354 0.1000 0.0612 0.0536 0.1229 0.0485 0.1000 0.0754 0.0612 0.0688 0.0536 0.1354 0.1229 1.0000 0.9869 0.9869 1.0000

The eigenvalues of G are: 0.0216, 0.0305, 0.0441, 0.1078, 1.9609, and 3.8783.
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 13 / 40

Missing data
On the other hand, some correlations may not be reliable or even missing:

G=

1.0000 0.9872 0.9485 0.9216 0.9872 1.0000 0.9551 0.9272 0.9485 0.9551 1.0000 0.9583 0.9216 0.9272 0.9583 1.0000 0.0485 0.0754 0.0688 0.1354 0.0612 0.0536 0.1229

0.0485 0.0754 0.0612 0.0688 0.0536 0.1354 0.1229 1.0000 0.9869 0.9869 1.0000

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 14 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Drop the rank constraint


Let us rst consider the problem without the rank constraint: min s.t. 1 H (X G) 2 F 2 Xii = 1 , i = 1, . . . , n X 0.

(4)

When H = E, the matrix of ones, we get min s.t. 1 X G 2 F 2 Xii = 1 , i = 1, . . . , n X 0.

(5)

which is known as the nearest correlation matrix (NCM) problem, a terminology coined by Nick Higham (2002).
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 15 / 40

The story starts


The NCM problem is a special case of the best approximation problem min s.t. 1 xc 2 2 Ax b + Q , xK,

where X is a real Hilbert space equipped with a scalar product , and its induced norm , A : X m is a bounded linear operator, Q = {0}p q is a polyhedral convex cone, 1 p m, q = m p, + and K is a closed convex cone in X .

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 16 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The KKT conditions


The Karush-Kuhn-Tucker conditions are (x + z) c A y = 0 Q y Ax b Q , K z xK,

where means the orthogonality. Q is the dual cone of Q and K is the dual cone of K.

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 17 / 40

Equivalently,

where K (x) is the unique optimal solution to min s.t. 1 ux 2 uK.


2

(x + z) c A y = 0 Q y Ax b Q , x K (x + z) = 0

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 18 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Consequently, by rst eliminating (x + z) and then x, we get Q which is equivalent to F (y) := y Q [y (AK (c + A y) b)] = 0, y
m

y AK (c + A y) b Q ,

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 19 / 40

The dual formulation


The above is nothing but the rst order optimality condition to the convex dual problem max (y) := s.t. y Q . 1 K (c + A y) 2
2

b, y

1 c 2

Then F can be written as F (y) = y Q (y (y)) .

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 20 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Now, we only need to solve F (y) = 0, However, the diculties are:

F is not dierentiable at y; F involves two metric projection operators; Even if F is dierentiable at y, it is too costly to compute F (y).

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 21 / 40

The NCM problem


For the nearest correlation matrix problem, A(X) = diag(X), a vector consisting of all diagonal entries of X. A (y) = diag(y), the diagonal matrix. b = e, the vector of all ones in Consequently, F can be written as
n F (y) = AS+ (G + A y) b.

n and K = S+ .

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 22 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The projector
For n = 1, we have
1 x+ := S+ (x) = max(0, x).

Note that x+ is only piecewise linear, but not smooth. (x+ )2 is continuously dierentiable with 1 (x+ )2 = x+ , 2

but is not twice continuously dierentiable.

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 23 / 40

The one dimensional case

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 24 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The multi-dimensional case


n The projector for K = S+ :
x1

Convex Cone

()

x2

x3

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 25 / 40

Let X S n have the following spectral decomposition X = P P T , where is the diagonal matrix of eigenvalues of X and P is a corresponding orthogonal matrix of orthonormal eigenvectors. Then
n X+ := PS+ (X) = P + P T .

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 26 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

We have X+
2

is continuously dierentiable with 1 X+ 2


2

= X+ ,

but is not twice continuously dierentiable. X+ is not piecewise smooth, but strongly semismooth2 .

2 D.F. Sun and J. Sun. Semismooth matrix valued functions. Mathematics of Operations Research 27 (2002) 150169.
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 27 / 40

A quadratically convergent Newtons method is then designed by Qi and Sun3 The written code is called CorNewton.m.

"This piece of research work is simply great and practical. I enjoyed reading your paper." March 20, 2007, a home loan nancial institution based in McLean, VA. "Its very impressive work and Ive also run the Matlab code found in Defengs home page. It works very well." August 31, 2007, a major investment bank based in New York city.
3 H.D. Qi and D.F. Sun. A quadratically convergent Newton method for computing the nearest correlation matrix. SIAM Journal on Matrix Analysis and Applications 28 (2006) 360385.
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 28 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Inequality constraints
If we have lower and upper bounds on X, F takes the form
n F (y) = y Q [y (AS+ (G + A y) b)] ,

which involves double layered projections over convex cones. A quadratically convergent smoothing Newton method is designed by Gao and Sun4 . Again, highly ecient.

4 Y. Gao and D.F. Sun. Calibrating least squares covariance matrix problems with equality and inequality constraints, SIAM Journal on Matrix Analysis and Applications 31 (2009), 14321457.
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 29 / 40

Back to the rank constraint


min s.t. 1 H (X G) 2 A(X) b + Q ,
n X S+ , 2 F

equivalently, min s.t.

rank(X) k, 1 H (X G) 2 A(X) b + Q ,
n X S+ , 2 F

i (X) = 0, i = k + 1, . . . , n.
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 30 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The penalty approach


Given c > 0, we consider a penalized version 1 H (X G) 2 A(X) b + Q ,
n X S+ , n 2 F

min s.t.

+c
i=k+1

i (X)

or equivalently min fc (X) := s.t. 1 H (X G) 2 A(X) b + Q ,


n X S+ . k 2 F

+ c I, X c

i (X)
i=1

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 31 / 40

Majorization functions
Let h(X) :=
i=1 k

i (X) I, X .

Since h is a convex function, for given X k , we have h(X) hk (X) := h(X k ) + V k , X X k , where V k h(X k ). Let d n be a positive vector such that H H ddT .
0.5 0.5 For example, d = max(Hij )e. Let D1/2 = diag(d1 , . . . , dn ).

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 32 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Let g(X) := Then g is majorized by

1 H (X G) 2

2 F.

g k (X) := g(X k ) + H H(X k G), X X k + Thus, at X k , fc is majorized by

1 1/2 D (X X k )D1/2 2

2 F.

fc (X) f k (X) := g k (X) hk (X) and fc (X k ) = f k (X k ).

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 33 / 40

The idea of majorization


Instead of solving the penalized problem, the idea of the majorization is to solve, for given X k , the following problem min f k (X) = g k (X) hk (X) s.t. A(X) b + Q ,
n X S+ ,

which is a diagonal weighted least squares correlation matrix problem min s.t. 1 1/2 k D (X X )D1/2 2 A(X) b + Q ,
n X S+ .
R/Rmetrics Computational Topics in Finance Conference

2 F

NUS/SUN 34 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Now, we can use the two Newton methods introduced earlier for the majorized subproblems! fc (X k+1 ) < fc (X k ) < < fc (X 1 ).

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 35 / 40

Where is the rank condition?


Looks good? But how can one guarantee that we can get a nal X such that its rank is less or equal to k? The answer is: increase c. That is, to have a sequence of {ck } with ck+1 ck . Will it work? Numerical stability? Does not need a large ck in numerical computations. There are no known methods that can solve the general rank constrained problem. For the H-normed correlation matrix problems (without constraints on the o diagonal entries), the major.m of R. Pietersz and J.F. Groenen (2004) is the most ecient one so far [write X = Y Y T for Y nk and apply component-by-component majorization.].
R/Rmetrics Computational Topics in Finance Conference NUS/SUN 36 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

One typical example


Example 5.1: n=500, H=E PenCorr Major SemiNewton DualBFGS

1200 1000 800 600 400 200 0

time (secs)

20

40

60 rank Eample 5.1: n=500, H=E

80

100

120

0.07 0.06 0.05

PenCorr

Major

SemiNewton

DualBFGS

relative gap

0.04 0.03 0.02 0.01 0 20 40 60 rank 80 100 120

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 37 / 40

A general example: n=1,000

Example 5.6 rank 20 50 100 250 500

PenCorr time 11640.0 1570.0 899.0 318.3 326.3 residue 1.872e2 1.011e2 8.068e1 7.574e1 7.574e1

Table 1: Numerical results for Example 5.6

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 38 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Final remarks
A code named PenCorr.m can eciently solve all sorts of rank constrained correlation matrix problems. Faster when rank is larger. The techniques may be used to solve other problems, e.g., low rank matrix problems with sparsity. The limitation is that it cannot solve problems for matrices exceeding the dimension 4, 000 by 4, 000 on a PC due to memory constraints.

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 39 / 40

End of talk

Thank you! :)

R/Rmetrics Computational Topics in Finance Conference

NUS/SUN 40 / 40

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 12

YOHAN CHALABI

190

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Outlier Resistant GARCH Modeling


Yohan Chalabi1, , Diethelm W rtz1 u
1. Institute for Theoretical Physics - Econophysics Group, ETH Zrich u

Generalized autoregressive heteroskedastic (GARCH) models are nowadays widely used to reproduce stylized facts of nancial time series and play an essential role in risk management and volatility forecasting. Although these models are well studied, numerical problems may arise in the estimation of the parameters when outliers are present in the data set. Indeed, maximum likelihood estimation can be sensitive to outliers. To overcome this limitation, the weighted trimmed likelihood estimation (WTLE) has been recently introduced. In this talk, we extend the GARCH family models to the weighted trimmed likelihood procedure to obtain robust estimates. Other robust GARCH estimators will be presented and an extensive Monte-Carlo study will be applied to compare the dierent approaches.

Keywords: GARCH models; Robust estimation; Trimmed Weighted Likelihood; M-estimates; Outliers

Contact author: chalabi@phys.ethz.ch

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 13

JOEL YU

192

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A Markov-switching Model of the Won-Dollar Rate


Joel C. Yu Associate Professor College of Business Administration University of the Philippines UP Campus, Diliman Quezon City Philippines

joel.yu@up.edu.ph

Foreign exchange rate modeling has gone through a host of developments in accounting for its nonlinear characteristics. Since the seminal work of Hamilton (1989), markov-switching models (MSM) have been increasingly used to quantify the nonlinear aspects of exchange rates. Initial research papers show that the MSM can very well describe the movements of exchange rates over time (e.g., Engel and Hamilton, 1990). Today, this approach is widely used to characterize exchange rate movements and to explore the possibility of improving exchange rate forecasting.

This paper employs MSM in characterizing the short-term movements in the wondollar rate. Its ability to account for non-linear aspects provides insights in identifying the relevance of explanatory variables in affecting the movements in the won-dollar pair under different states. Results provide a strong support for nonlinearity in the weekly changes in the won-dollar rate for the period March 2000 to May 2009. The model shows that during periods of high volatility, changes in interest rates are not relevant in affecting the movements in exchange rates while equity return takes on an increased importance. These results may serve as a guide in monetary policy in Korea in terms of intervention during periods of highly volatile markets.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

hGtTzGtGG G~TkGy
qGjUG jGGiGh |GGGw yTtGj uG|GGz X_TX`GmGYWXW

p
20 15 10 4.00 5 3.00 0 2.00 -5 -10 -15
08 05 01 02 00 03 06 04 07 09

6.00

5.00

1.00

0.00

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

p
v
{GGGTGGGGG GGGTG

t
tTGGOtztP tztGGGGGGGG GGGGGGGG GGGGGGG GUGpGtztSGGGG GGGGGGGG GGGUG

lGmGyGt
{GzGtG zGt
wGwGw iGGwGh tGh hGtGh

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

tGw
tGjaGhG zGG jGGGT

tTzGt
y t (s t ) = 1 [y t 1 (s t 1 )] + ... + 4 [y t 4 (s t 4 )] + u t
where yt: log rate of change in real GDP times 100 (st): conditional mean that changes between two states, st The non-observable state, st, is assumed to follow an ergodic first-order Markov chai n process described by transition probabilities, Pr(st=j|st=i)=pij, where jpij=1 These transition probabilities are generally summarized in a matrix P given by:

p P = 11 p 21

p12 p 22

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

~T|zkGyGt
+ 1 i t + 1 rt + u t if s t = 1 dkrw t = 1 2 + 2 i t + 2 rt + v t if s t = 2
where: dkrwt : log rate of change at time t in weekly won-dollar (krw) rate times 100 : weekly change in overnight call rate at time t it rt : log rate of change at time t in weekly KOSPI times 100 ut NID(0, s12P vt NID(0, s22)

zGj
Smoothed Probability: Regime 1
1.0

0.8

0.6

0.4

0.2

0.0

20 01

20 06

20 03

20 05

20 04

20 08

20 02

20 07

20 09

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

zGj
State 1 vs State 2 Periods (yyyy:mm:dd) State 1 From 2000:03:15 2001:01:03 2001:04:18 2003:03:19 2004:12:08 2008:05:21 To 2000:11:15 2001:03:14 2003:03:05 2004:11:10 2008:03:05 2008:08:06 From 2000:11:22 2001:03:21 2003:03:12 2004:11:17 2008:03:12 2008:08:13 State 2 To 2000:12:27 2001:04:11 2003:03:12 2004:12:01 2008:05:14 2009:05:13

zG
Sample DEXR Total State 1 State 2 DCRATE Total State 1 State 2 RETURN Total State 1 State 2 64 64 64 0.09 0.16 -0.35 15.99 13.37 33.23 4.00 3.66 5.76 479 415 415 -0.01 0.00 -0.05 0.01 0.01 0.05 0.12 0.09 0.22 479 415 64 0.02 -0.08 0.65 3.10 0.65 18.81 1.76 0.80 4.34 Mean Variance Std Dev

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

{GGs
Non Linear Log Likelihood AIC Criterion HQ Criterion SC Criterion LR Linearity Test Chi (4) Chi (6) Davies -677.4416 2.8703 2.9046 2.9574 431.0869 0.0000 0.0000 0.0000 Linear -892.985 3.7452 3.7589 3.7801

zGw
Transitions Matrix State 1 State 1 State 2 0.9819 0.0955 State 2 0.0181 0.9045

Obs State 1 State 2 409.8 69.2

Prob. 0.8409 0.1591

Duration 55.38 10.47

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

wGl
Linear Model Coef 0.0344 -0.8767 -0.2033 t-val 0.4805 -1.4481 -11.3217 Coef -0.0654 -0.9497 -0.0654 State 1 t-val -1.6176 -2.1174 -5.9432 Coef 0.4043 0.2361 -0.5423 State 2 t-val 1.0658 0.1424 -8.3157

j
mSGGGGGGGGG GGGGGGGGGGGUG zSGGGGGGGG GGGGGGGtztGGG GGGGGGGGG GGGGG UGkG GGGGGG GSGGGGGGGGG GGGTGUG sSGGGGGGGGG GGTGUGiGGGGGG GGGSGGGGGG GGGGGGGGG U

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 14

LEONG CHEE KIA

202

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

L EARNING BAYESIAN N ETWORK FOR C REDIT AND R ISK S CORING


Chee Kian Leong ckleong@unisim.edu.sg School of Business

Abstract Financial credit and risk scoring is a very important aspect of risk management. In this paper, we demonstrate the applications of learning Bayesian network for credit and risk scoring. A learning Bayesian network is a graphical model which encodes the joint probability distribution for a set of random variables. The advantages of Bayesian network classiers in credit and risk scoring is its capacity to provide a clear insight into the structural relationships between variables affecting risk and creditworthiness. The learning Bayesian network algorithm involves the construction of priors for network parameters and learning of parameters via conjugate updating. The network structure is developed using the network score via a heuristic search strategy. Illustrations using a credit scoring data set are demonstrated using R.

Corresponding

author. Email:ckleong@unisim.edu.sg.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 15

DIETHELM WRTZ

204

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Postmodern Approaches to Portfolio Design

Diethelm Wrtz*, Yohan Chalabi*, Andrew Ellis**, William Chen* and Stefan Theussl***
*Swiss Federal Institute of Technology, Zurich **Finance Online GmbH, Zurich ***University of Economics and Business Administration, Vienna

wuertz@phys.ethz.ch

The underlying assumption of Markowitz modern portfolio theory states that the measure of investment risk is described by the sample variance of asset returns and that all securities can be adequately represented by a multivariate ellipticallycontoured distribution. These facts do not always represent the realities of the investment markets, where we are confronted with non-stationary behavior and unusual market behavior due to structural breaks, bubbles, and even market crashes. Risk is becoming more and more related to bad outcomes and losses, which are considered to weigh more heavily than gains. This view has been put forward by researchers in finance, economics and psychology, which has in turn lead to the introduction of more sophisticated risk measures and methods to analyze portfolios. We give a summary of postmodern investment strategies and sophisticated methods which can make fund managers and their clients, show how to use them in practice, and how they are made available in the R/Rmetrics portfolio software package.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Postmodern Approaches to Portfolio Design: Portfolio Optimization with R/Rmetrics


An Open Source Platform for Teaching Computational Finance and Financial Engineering Diethelm Wrtz* Yohan Chalabi*, Andrew Ellis**, Stefan Theussl***
Swiss Federal Institute of Technology, ETH Zurich Finance Online GmbH, Zurich University Administration, *University of Economics and Business Administration Vienna
Singapore Workshop
Singapore, February 2010 g p , y

1 What is the Performance of Swiss Pension Funds?


Performance of Swiss Pension Funds
based on Global Custody Data of CS, as at December 31, 2009 This Index is not an artificially constructed performance index but an index that is based on actual pension fund data.

Example E l Swiss Pension Fund Portfolio

DJIA @14000

2Y Rolling Ri k R t R lli Risk-Return Nasdaq all time high


2000-03-10

9-11

Lehman failed
2008-09-15

5Y Rolling Risk-Return

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

0.318 Weight 0.8 1.0

0.249

0.302

0.432

0.6

0.781

0.969

1.17

1.39
SBI SPI SII LMI MPI ALT

0.0

0.000102

0.0266

0.053

0.0795

0.106

0.132

0.159

0.185

0.212 Target Return

Efficient Frontier
MV Portfolio | mean-Stdev View
W Weighted Return 0.15 0.20

Weighted Returns
0.318 0.249 0.302 0.432 0.6 0.781 0.969 1.17 1.39

ALT 0.2 20

SPI

Minimum Variance Locus

Efficient Frontier

SBI SPI SII LMI MPI ALT

0.15

Target Return[mean]

MPI

0.00

EWP Equal Weights Portfolio TGP Tangency Portfolio GMV Global Minim Risk

0.000102

0.0266

0.053

0.0795

0.106

0.132

0.159

0.185

0.212 Target Return

0.10

EWP
Cov Risk Budgets 0.6 0.8 1.0

Cov Risk Budgets


0.318 0.249 0.302 0.432 0.6 0.781 0.969 1.17 1.39

Target Risk
MV | solveRquadprog | minRisk = 0.249 m

0.0714

TGP
0.05 5 SII
MV | solveRquadprog

Sharpe Ratio GMV


LMI

0.053 6

SBI SPI SII LMI MPI ALT

0.00

0.0

SBI 0.0 0.5 1.0 Target Risk[Cov] 1.5 2.0

0.2

0.4

0.000102

0.0266

0.053

0.0795

0.106

0.132

0.159

0.185

0.212 Target Return

3 Are Other Approaches Used by Fund Managers ?

Source: Felix Goltz, Edhec, 2009

MV | solveRquadprog | minRisk = 0.248532

Target Risk

0.05

0.10

MV | solveRquadpro | minRisk = 0.248532 og

2 What is the most Widely used Approach in Portfolio Optimization ?

Weights

Target Risk

0.2

0.4

0.6

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

4 How Can We Handle Estimation Errors ?

Estimation of Means and Covariances Sample Estimator Robust Estimators MCD, MVE OGK MCD MVE, OGK, Shrinkage Methods Bayes Stein Estimator y Ledoit-Wolf Estimator Random Matrix Theory Denoising

5 How Can we Better Diversify Risk Budgets ?


Risk Budgeting takes a finite g g risk resource, and decides how best to allocate it. This defaults to Markowitz portfolio optimization, where results are not only in terms of weights and performance attributions but also in terms of risk attributions. To quantify risk attributions we address the questions how would the portfolio risk change if we increase or decrease holdings in a set g of assets. Compute from the derivative p

Normalized risk budgets

Constrain the portfolio optimization

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

6 How Can we Take Care of Extreme Tail Risk Dependencence ?

Use Copulae Lower Tail Risk Dependence Budgets

SBI CH Bonds SPI CH Stocks SII CH Immo LMI World Bonds MPI World Stocks ALT World AltInvest

Tail Dependence Coeff: Lower SBI SBI SBI SBI SBI SPI SPI SPI SPI SII SII LMI LMI MPI SPI SII LMI MPI ALT SII LMI MPI ALT LMI MPI MPI ALT ALT 0 0.055 0.064 0 0 0 0 0.352 0.273 0.075 0 0 0 0.124

6. 6 What can We Learn from Portfolio Backtesting Strategies ?


Series Weights Recommendation
Horizon = 12m | Smoothing: 3m | Startup: 1m | Shift 1m 2 20 40 60 80 0 2005-06-01 2006-12-20 2008-07-09 2005-06-01

Rolling Windows: Horizon 12m Shift 1m


W Weights Changes %

-1.0

Weights %

Series

MSCI GCC Portfolio Gulf Cooperation Council Countries Indices

BAHD - KUWD - OMAD - QATS - UAED - CASH


GCCS BAHD KUWD OMAD QATS UAED CASH

0.0

0.5

2006-12-20

2008-07-09

Weights Rebalance
Horizon = 12 | Smoothing: 3m | Startup: 1m | Shift 1m -10 0 10 20 30 40

Portfolio vs Benchmark
Horizon = 12m | Smoothing: 3m | Startup: 1m | Shift 1m 0.2 MV | shrinkEstimator 2006-12-20 2008-07-09
Strategy: myPortfolioStrategy Portfolio Benchmark Total Return -0.17 -0.38 Mean Return 0.00 -0.01 StandardDev Return 0.06 0.09 Maximum Loss -0.22 -0.25 Portfolio Specification: Type: Optimize: Estimator: MV minRisk shrinkEstimator Constraints: "maxW[1:(nAssets-1)] = 0.30"

Weights Smoothing: 3m Double EMA

-0.0 010 -0.006 -0.002

Portfolio Strategy: MV Tangency Portfolio Dynamic Horizon < 12M y Optimal Shrinkage Estimator best of O = 0 1 Partial Cash Position Max 30% Box Constraints

Start 2006-05-31 t:

Cumulated

2005-06-01

2006-12-20

2008-07-09

Drawdowns | Portfolio vs Benchmark


(Max) Portfolio DD = -0.01 | Benchmark DD = -0.01

Drawdowns

2006

2007

2008

2009

-0.6 6 2005-06-01

-0.2

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

7 How Can we Include Expert Views into Portfolio Design ?

Black-Litterman (1982) Fisher Black and Robert Littermans 1992 goal was to create a systematic method of specifying and then incorporating analyst/portfolio manager views into the estimation of market parameters for portfolio optimization.

8 How Can We handle Downside Risk ?


Stone 1973

Markowitz 1952
[ k = 2, A = Infinity, Y0 = mean (R) ]
Solution: QP 1982, SOCP Programming 1994

Rockafeller & Uryasev CVaR 1992


k = 1, A = VaR, Y0 = 0

Pederson and Satchell 1998

for f some b bounded f d d function W ( ) i

Artzner, D lb At Delbaen, Eb H th 1999 Eber, Heath

Solution: Linear Programming Other Examples: CDaR, MAD, Minimum Regret

Note if the assets are elliptically distributed we will get distributed, the same set of weights as for the Mean-Variance Markowitz Portfolio! this makes a coherent risk measure

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

7 How Can we Include Expert Views into Non Normal Portfolio Design ? Non-Normal

Copula Opinion Pooling

an alternative approach to Black-Litterman when asset returns are not normally distributed The Copula Opinion Pooling (COP) approach of Meucci (2006a, 2006b) makes the modelling of dependencies by using copulas possible. By simulating market scenarios, the approach is free from distributional assumptions concerning the variables used used.

9 How Can we Analyse the Non Stationary Behaviour of a Return Series ? Non-Stationary
Example Series

Financial Time Series are Non-Stationary e.g. the running variance contains no information on the frequency of a periodic signal, only on its p g , y amplitude Wavelet Analysis decomposes a time series into time/frequency space simultaneously. simultaneously One gets information on both the amplitude of any "periodic" signals within the series, and h i hi h i d how this hi amplitude varies with time.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

10 How Can We Generate Stress Scenarios ?


Phase Space Embedding and Process Separation
Log Index Series
Example Series

Log Return Series Black Regime: Returns generated by a predictive heteroskedastic process Grey Regime: Returns generated by an unpredictable jump process

Grey Bars: Probability to which regime the record belongs Colored Line Bundle: Crossing indicator to quantify size and strength of the regimes

Robust Covariance Estimation:


Filzmoser, Maronna, Werner 2007

10 When Should we Rebalance a Portfolio ?


Every Month, every Quarter? No, Rebalance when it becomes necessary !
Log Stock Market Index Signal ?

Sep 7: Federal takeover of Fannie Mae and Freddie Mac Sep 14: Merrill Lynch sold to Bank of America and Lehmann Brothers collapse Sep 15: Lehmann Brothers files for bankruptcy protection Sep 16 Moodys d S 16: M d and S&P downgrade ratings on AIG d d ti Sep 17: The US FED lends $85 billion to AIG to avoid bankruptcy. Sep 18: Paulson and Bernanke propose a $700 billion emergency bailout

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Constraints and Solvers


11 What Can Rmetrics also do for you ?

Financial R t Fi i l Return M d li Modeling Many Fat and Semi Fat Tailed Distributions Extreme Value Theory, Quantile and OBRE-CVaR Estimation Assets Modeling Correlation and Dependence Structure Analysis, Copulae Asset Selection by Partitioning, Clustering, and Self Organization Volatility Modeling and Forecasting Univariate and Multivariate GARCH Models Robust Volatility Modeling y g Portfolio Optimization Performance and Risk Measurement and Attribution Complex C C l Constraints, t i t LP, QP, SOCP, NLP, Mixed Integer Programming BARRAS Multifactor Models Stability Analysis and Stress Testing ( y y g (under current implementation) p )

Use Rmetrics

Thank you

Seite 16

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

CHAPTER 16

PRATAP SONDHI

214

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The Evaluation of Bank and Sector Resilience to Systemic Shocks

Pratap Sondhi GF Management, Hongkong

The economic fallout of the present crisis underscores the need for banks to maintain sufficient capacity to absorb systemic shocks. This capacity must be actively managed because the economic and business environment changes from time to time as well as the financial conditions of banks, individually and collectively. Thus, because of interbank linkages, each bank must be able to evaluate and monitor not only its own resilience to systemic shocks but also that of other banks and of the sector as a whole.

Some measures of bank and sector resilience are discussed and numerically illustrated that can be implemented and monitored to assist active management.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The Evaluation of Bank and Sector Resilience to Systemic Shocks

Pratap Sondhi

Concepts

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Can we define proper and easy to interpret measures of bank and sector resilience to systemic shocks?

Macro shock scenario

Proposition
Changes in

bank default risk sector expected loss


can measure resilience to shocks
Initial state Scenario state

Sector expected loss (SAR bn) 2.00 1.50 1.00 0.50 Benchmark Scenario

Key Concepts

Systemic shock
> Correlated defaults: Adverse economic shock that might cause joint defaults of banks with similar credit or market exposure; > Domino/Contagion defaults: Complicated network of interbank liabilities linking individual banks that might directly cause failure of one bank through default of another one.

Default risk A measure of bank risk, expressed in basis points, based on ranking bank financials on an ordinal, relative, risk scale (e.g. bank ratings). Default risk may or may not measure absolute probabilities of default. Potential loss A measure of bank sector risk, expressed in monetary units, derived from Default risk and obtained by regarding the sector as a portfolio of banks; Resilience A measure of the capacity to absorb shocks, obtained by evaluating the change in default risk/potential loss for a specified shock

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Context: The IMF has proposed a macro-prudential surveillance program to assess systemic risk

Identify potential macroeconomic shocks using micro and financial data policy and analysis Analyze financial soundness indicators (FSIs) to measure the financial systems vulnerabilities and capacity to absorb losses Apply stress tests by combining identified macro risks with the systems vulnerabilities

FSIs are macro-prudential indicators aggregating micro-prudential, bank level supervisory data
Core FSIsbank sector Regulatory capital ratios Asset quality 13/VWRWDO ORDQV 13/V-provisions)/capital 6HFWRU H[SRVXUH FRQFHQWUDWLRQV Earnings and profitability 52( 52$ LQWHUHVW PDUJLQ ([SHQVH UDWLR Liquidity /LTXLG DVVHW UDWLR /LTXLG DVVHWV67 OLDELOLWLHV Market risk ); QHW RSHQ SRVLWLRQFDSLWDO 'XUDWLRQ PDWXULW\ PLVPDWFK Encouraged FSIs Other banking sector FSIs &DSLWDOWRWDO DVVHWV *URVV GHULYDWLYHV SRVLWLRQV 7UDGLQJ LQFRPHLQFRPH liquidity in securities market %LG-ask spread $YHUDJH GDLO\ WXUQRYHU Non-bank financial institutions (leverage ratio) Non-financial sectors &RUSRUDWH OHYHUDJH UDWLR &RUSRUDWH 52( &RUSRUDWH ); H[SRVXUH 5HDO HVWDWH SULFHV

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

We can develop a bank resilience measure, Default Risk, from bank specific financial factors
Risk factors
Macro Risk factors

Analytical Models
Country Risk model

Risk measures
Country risk rating

Bank specific financial factors

Default risk model

Bank risk rating

Ratings PD table

Map ratings to PDs

Default Risk (bp)

The default risk model rates bank financials according to relative risk

Default risk is a complex, non-linear function of a banks financial characteristics


Note that the default risk may or may not measure the actual default probability

Model is calibrated to agency bank ratings for banks across the rating spectrum and across many countries Model ratings are mapped to a default probability scale to provide a cardinal risk measure

Examples of key factors determining default risk include, amongst others:


C ountry risk rating Interest margin Return on average assets 5HWXUQ RQ DYHUDJH HTXLW\ 1RQ LQWHUHVW H[SHQVHDYHUDJH DVVHWV Cost/Income

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Ratings versus Default Risk

Default Risk(bp) 1 2.3 4 6.9 11.4 18.6 29.8 46.6 71.4 107.1 157.6 227.3 321.3 445.3 605.3 807 1055.5 1525.9 2341.1 3707

Model rating
AAA AA A+/A A/ABBB+ BBB BBB/BBBBBBBB+ BB BB BB B+ B+ B B BCCC+ CCC D

The sector can be modeled as a portfolio of banks to gauge sector loss - a measure of sector resilience
Risk factors
Macro Risk factors

Analytical Models
Country Risk model

Risk measures
Country risk rating

Bank specific financial factors Recovery rates, Default risk relative volatility, Inter-bank borrowing & lending

Default risk model

Default risk (bp) for all banks

Portfolio & Network models

Sector expected loss, unexpected loss, 99.9 % potential loss

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Illustrative example Central bank perspective

A simplified stress test is applied to the Saudi banking sector to illustrate the analysis

A benchmark risk rating profile is estimated based on 2008 year-end financial statements for each of the 11 banks in the sector from the default risk model; Country risk is initially assumed to be AA- rated; &RQQHFWHG V\VWHPLF VKRFNV DUH WKHQ VLPXODWHG VHTXHQWLDOO\

i ncrease country risk - to simulate a macroeconomic shock DV D FRQVHTXHQFH RI ZKLFK

Specify global percentage reductions/increases in income/expense line items - WR VLPXODWH D FRQVHTXHQW ILQDQFLDO sector shock

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Approximations/assumptions are made which would be refined or modified in a proper implementation


Bank recovery rates are provisionally assumed to be deterministic; 7KH VHTXHQFH RI VKRFN VFHQDULRV DUH LOOXVWUDWLYH RQO\ DQG QRW HFRQRPLFDOO\ linked; 2QO\ D XQLIRUP LQFRPH VKRFN LV DSSOLHG bank balance sheets are held FRQVWDQW VR QR FDSLWDO RU OLTXLGLW\ VKRFNV The ratings model calibration is approximate; 2QO\ D FRUUHODWHG GHIDXOWV VKRFN LV FRQVLGHUHG IRU ZKLFK DQ DSSUR[LPDWH portfolio model is employed.

Initial macro-factor shock: Country risk rating is lowered from AA- to A

Macro factors Country risk

initial AA-

scenario A

Financial factors

y/e 2008

Country risk is a backg round macro risk factor affecting all banks

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Sector systemic shock: The country shock is assumed to trigger an income shock uniformly across all banks

Macro factors Country risk default rate vol recovery rate

initial AA1 0.7

scenario A1 0.7

Net interest income Other Income Impairment - credit % of assets Impairment - investment % of assets

-10% -10% 1.5% 1.0%

1RWH: Financial scenario shocks are illustrative only and not econometrically linked here to the macro shock

The income shock causes large, differential but correlated changes in bank default risk
Default Risk (bp) 300.00 250.00 200.00 150.00 100.00 50.00 0.00
Bank 10 Bank 11

1RWH scale change

Changes in default risk can differ even for banks with the same initial state

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The change in sector loss in response to a shock measures the sector resilience to the shock
Sector expected loss (SAR bn) 2.00 1.50 1.00 0.50 Benchmark Scenario

% Risk Contributions
25.00 20.00 15.00 10.00 5.00 0.00 Bank Bank Bank Bank Bank Bank Bank Bank Bank Bank Bank 1 2 3 4 5 6 7 8 9 10 11

A portfolio analysis reveals a high level of diversifiable, or concentration, risk in the sector
(SAR bn) Expected loss Risk analysis > Systematic risk > Diversifiable risk Total risk Benchmark 0.56 Scenario 1.61

0.07 4.66 4.73

0.34 7.33 7.67

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Saudi sector strengths & weaknesses Commentary based on the stress test*

Saudi banking sector risk is intensified by bank concentration small number of banks in the sector, with similar and concentrated sources of revenue/ expense

which can amplify the exposure to systemic shocks


but the sector is robust to relatively modest shock scenarios due to the stability of the largest banks;

scenarios considered ;

Risks to the banking system are concentrated in three banks for the stress

Two other banks individually have high default risk but do not contribute proportionally to sector risk due to their small size

* Approximate model calibration and with no accounting adjustments for Islamic banks

Illustrative example - Individual bank perspective

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

In practice, the impact of a macro shock should be simulated by its effect on bank specific exposures
Macro Shock scenario
Credit portfolio impairment Mark to market losses Decline in interest income Decline in other income Defined by appropriate Stress test scenarios - already performed by banks

)XQGLQJ OLTXLGLW\ shock

Deposit withdrawals Sell investments Reduce loan portfolio Modify long term borrowing Dynamic provisioning Reduce dividends
Balance sheet shock Income shock

Management actions s.t. constraints

Change in default risk (bp)

We select one bank from the sector bank 6

ASSETS Cash & balances with SAMA Due from banks Investments, net Loans & advances Other assets Total assets Total assets ($bn) LIABILITIES & EQUITY Liabilities Due to banks Customer deposits Other liabilities Term loans Total liabilities Total equity Total liabilities and equity

initial state % initial assets 5% 3% 25% 63% 3% 100% 34

Indicative default risk factors


initial state Equity/Total assets Net Interest margin Return on avg assets Return on avg equity Cost/income Net loans/Total assets 11.82% 3.24% 3.11% 24.25% 19.81% 63.46%

7% 73% 4% 4% 88% 12% 100%

Country risk

AA-

Default risk (bp)

15

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

A credit shock is simulated that induces a liquidity shock, requiring management action
writeoffs provisions
withdrawals
- demand deposits - time deposits
Liquidate cash and short term deposits s.t. SAMA constraints Sell and repurchase govt. bonds - market impact is 3% loss Reduce loan book s.t. SAMA constraints

Credit shock

3.00% 3.00%
54%
100% 50%

)XQGLQJ OLTXLGLW\ shock

Management actions to fund withdrawals

The credit shock raises the default risk to 24 bp

initial state Equity/Total assets Net Interest margin Return on avg assets Return on avg equity Cost/income Net loans/Total assets 11.82% 3.24% 3.11% 24.25% 19.81% 63.46%

scenario state

Credit & Liquidity shocks

10.18% 3.15% 1.40% 11.61% 20.35% 63.00%

Country risk

AA-

AA-

Default risk (bp)

15

24.2

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The combined credit and liquidity shocks reduce the balance sheet from $34 bn to $20 bn
ASSETS Cash & balances with SAMA Due from banks Investments, net Loans & advances Other assets Total assets initial state % initial assets 5% 3% 25% 63% 3% 100%

Total assets ($bn)


LIABILITIES & EQUITY Liabilities Due to banks Customer deposits Other liabilities Term loans Total liabilities Total equity Total liabilities and equity

34

Credit & Liquidity shocks

scenario state %final assets 3% 1% 41% 50% 6% 100%

20

7% 73% 4% 4% 88% 12% 100%

12% 59% 8% 7% 85% 15% 100%

and raise the default risk to 71 bp

initial state Equity/Total assets Net Interest margin Return on avg assets Return on avg equity Cost/income Net loans/Total assets 11.82% 3.24% 3.11% 24.25% 19.81% 63.46%

scenario state

Credit & Liquidity shocks

15.11% 2.83% 0.02% 0.17% 30.14% 49.86%

Country risk

AA-

AA-

Default risk (bp)

15

71.4

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The banks resilience can be improved by modifying the initial state

,QFUHDVH OLTXLGLW\ E\ WUDQVIHUULQJ  with SAMA (Saudi Central Bank);

RI LQYHVWPHQWV WR PRQH\ PDUNHW GHSRVLWV

7UDQVIHU  RI WKH  DQWLFLSDWHG VKRFN RI WKH SURYLVLRQ IRU ORDQ ORVVHV from the scenario (forecast) state to the current period (initial state). However, WKH SRVVLELOLW\ RI VXFK G\QDPLF SURYLVLRQLQJ RU LQFRPH VPRRWKLQJ GHSHQGV on the regulatory/accounting regime. Such risk mitigation decisions depend on managements forecast of the SUREDELOLW\ RI WKH VKRFN VFHQDULR DQG UHTXLUH D WUDGH-off between risk and expected return

reducing the scenario default risk to 30 bp

initial state Equity/Total assets Net Interest margin Return on avg assets Return on avg equity Cost/income Net loans/Total assets 11.82% 3.24% 3.11% 24.25% 19.81% 63.46%

modified initial state 11.47% 3.21% 2.77% 21.87% 19.96% 63.39%

scenario state

Credit & Liquidity shocks

16.01% 2.92% 0.56% 3.86% 29.06% 51.12%

Country risk

AA-

AA-

AA-

Default risk (bp)

15

15

29.8

The decision to increase liquidity and loan loss provisions in the current period (initial state) requires a risk/expected return trade-off

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Observations

The change in default risk provides a simple, scalar measure of a banks resilience to shocks; ,W FDQ EH HPSOR\HG DV DQ RYHUOD\ RQ WKH FUHGLW SULFH DQG OLTXLGLW\ VWUHVV testing that banks perform, from time to time, to summarize their joint effects. For a prescribed shock it can assist decisions on how to modify resilience and what level to maintain by allowing an evaluation of risk versus return.

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

PART IV

APPENDIX

233

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

List of Sponsors

www.ethz.ch

www.rmi.nus.edu.sg

www.finance.ch

www.revolution-computing.com

www.crcpress.com

www.neuraltechsoft.com

Organization
Diethelm Wrtz Juri Hinz David Scott Mahendra Mehta Conference Office Yohan Chalabi Andrew Ellis ETH Zurich Switzerland National University of Singapore University of Auckland NeuralTechSoft Mumbai

ETH Zurich Switzerland Rmetrics Association Zurich

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

The Rmetrics Association

The Rmetrics Association was founded as an interest group in finance, and is organized as a non-profit foundation under Swiss law. The Rmetrics Association develops and provides software, offers a teaching environment with textbooks and user documentation, organizes and funds student projects and workshops, and is a partner for the banking and insurance industry. Rmetrics Software Development Rmetrics offers a collection of Open Source software packages for the R Environment created for teaching computational finance and financial engineering by the Econophysics Group at ETH Zurich. The software packages cover a wide range of topics, such as time series analysis, hypothesis testing, volatility forecasting, extreme value theory, pricing of derivatives, portfolio analysis, risk management, trading analysis and many more. Rmetrics offers an open source teaching solution with state-of-the-art algorithms to help the integration of academic research and industry. All packages are released under the GNU Public license (GPL). Many of the functions contained in this collection are not only used by students in education at the ETH in Zurich, but also in many other academic institutes and business schools worldwide. The Rmetrics packages are increasingly being used as a code archive for rapid model prototyping in business environments such as banks, fund management firms, and insurance companies. Rmetrics Teaching Environment Rmetrics offers the most complete teaching environment in financial analysis, covering a wide variety of state-of-the-art techniques, some of which are not even available in commercial software projects. Students not only become acquainted with open source software, but also learn the inner workings and algorithms of financial engineering concepts by studying the source code, which is not possible with commercial software. Rmetrics has been used for teaching in numerous universities and recognized business schools all over the world, and also to train practitioners in the industry. Rmetrics Knowledge Transfer The assimilation of new techniques and innovations in the banking and insurance industry is very challenging. Often, practitioners in the industry still rely on methods that have been shown to be unreliable or inadequate. Academic research has demonstrated how to overcome some critical limitations, but industrial practitioners often lag behind the pace of new academic research. The Rmetrics Association is trying to fill this gap by providing open source implementations of the latest research, thus making the resulting methods and techniques available to everybody. We are convinced that it is a fundamental role of academic institutions to share their scientific work with as large a community as possible.

Rmetrics Association, Zurich www.rmetrics.org

Owner: Jean-Luc Duval (jlduval@ensai.fr) @ 195.220.86.253

Você também pode gostar