18.5 Applications

In the following paragraph we want to show how M D *ReX might be used in order to analyze the VaR using copulas as described in Chapter 2 of this book. Subsequently we will demonstrate the analysis of implied volatility shown in Chapter 6. All examples are taken out of this book and have been accordingly modified. The aim is to make the reader aware of the need of this modification and give an idea how this client may be used for other fields of statistical research as well.

Figure 18.3: MD*ReX Time Series Dialogue
\includegraphics[width=1.00\defpicwidth]{times_new.ps}

We have willingly omitted the demonstration of dialogues and menu bars as it is pretty straightforward to develop these kind of interfaces on your own. Some knowledge of the macro language Visual Basic for Applications (VBA) integrated into Excel and an understanding of the XploRe Quantlets is sufficient to create custom dialogues and menus for this client. Thus no further knowledge of the XploRe Quantlet syntax is required. An example is the aforementioned Time Series dialogue, Figure 18.3.


18.5.1 Value at Risk Calculations with Copulas

The quantification of the VaR of a portfolio of financial instruments has become a constituent part of risk management. Simplified the VaR is a quantile of the probability distribution of the value-loss of a portfolio (Chapter 2). Aggregating individual risk positions is one major concern for risk analysts. The $ \mu - \sigma$ approach of portfolio management measures risk in terms of the variance, implying a "Gaussian world" (Bouyé et al.; 2001). Traditional VaR methods are hence based on the normality assumption for the distribution of financial returns. Though empirical evidence suggests high probability of extreme returns ("Fat tails") and more mass around the center of the distribution (leptokurtosis), violating the principles of the Gaussian world (Rachev; 2001).

In conjunction with the methodology of VaR these problems seem to be tractable with copulas. In a multivariate model setup a copula function is used to couple joint distributions to their marginal distributions. The copula approach has two major issues, substituting the dependency structure, i.e. the correlations and substituting the marginal distribution assumption, i.e. relaxation of the Gaussian distribution assumption. With M D *ReX the user is now enabled to conduct copula based VaR calculation with Excel, making use of Excel's powerful graphical capabilities and its intuitive interface.

The steps necessary are as follows:

  1. Get the according Quantlets into Excel,
  2. run them from there,
  3. obtain the result,
  4. create a plot of the result.

The first step is rather trivial: copy and paste the example Quantlet
34574 XFGrexcopula1.xpl from any text editor or browser into an Excel worksheet.

Next mark the range containing the Quantlet and apply the Run command. Then switch to any empty cell of the worksheet and click Get to receive the numerical output rexcuv. Generating a tree-dimensional Excel graph from this output one obtains an illustration as displayed in Figure 18.4. The according Quantlets are 34577 XFGrexcopula1.xpl , 34580 XFGrexcopula2.xpl ,
34583 XFGrexcopula3.xpl and 34586 XFGrexcopula4.xpl . They literally work the same way as the 34589 XFGaccvar1.xpl Quantlet.

Figure 18.4: Copulas: $ C_4(u,v)$ for $ \theta =2$ and $ N=30$ (upper left), $ C_5(u,v)$ for $ \theta =3$ and $ N=21$ (upper right), $ C_6(u,v)$ for $ \theta =4$ and $ N=30$ (lower left), $ C_7(u,v)$ for $ \theta =5$ and $ N=30$ (lower right)
\includegraphics[width=1.3\defpicwidth]{copulas.ps}

Of course the steps 1-4 could easily be wrapped into a VBA macro with suitable dialogues. This is exactly what we refer to as the change from the raw mode of M D *ReX into the "Windows" like embedded mode. Embedded here means that XploRe commands (quantlets) are integrated into the macro language of Excel.

The Monte Carlo simulations are obtained correspondingly and are depicted in Figure 18.5. The according Quantlet is 34609 XFGrexmccopula.xpl . This Quantlet again is functioning analogous to 34612 XFGaccvar2.xpl . The graphical output then is constructed along same lines: paste the corresponding results z11 through z22 in cell areas and let Excel draw a scatter-plot.

Figure 18.5: Monte Carlo Simulations for $ N=10000$ and $ \sigma _1=1$, $ \sigma _2=1$, $ \theta =3$
\includegraphics[width=1.30\defpicwidth]{CopulaMCsim.ps}


18.5.2 Implied Volatility Measures

A basic risk measure in finance is volatility, which can be applied to a single asset or a bunch of financial assets (i.e. a portfolio). Whereas the historic volatility simply measures past price movements the implied volatility represents a market perception of uncertainty. Implied volatility is a contemporaneous risk measure which is obtained by reversely solving an option pricing model as the Black-Scholes model for the volatility. The implied volatility can only be quantified if there are options traded which have the asset or assets as an underlying (for example a stock index). The examples here are again taken out of Chapter 6. The underlying data are VolaSurf02011997.xls, VolaSurf03011997.xls and volsurfdata2 . The data has been kindly provided by M D *BASE . volsurfdata2 ships with any distribution of XploRe . In our case the reader has the choice of either importing the data into Excel via the data import utility or simply running the command
data=read("volsurfdata2.dat"). For the other two data sets utilizing the Put button is the easiest way to transfer the data to an XQS. Any of these alternatives have the same effect, whereas the former is a good example of how the M D *ReX client exploits the various data retrieval methods of Excel.

Figure 18.6: DAX30 Implied Volatility, 02.01.1997
\includegraphics[width=1.40\defpicwidth]{DAXVola020197.ps}

The Quantlet 34868 XFGReXiv.xpl returns the data matrix for the implied volatility surfaces shown in Figure 18.6 through  18.8. Evidently the Quantlet has to be modified for the appropriate data set. In contrast to the above examples where Quantlets could be adopted without any further modification, in this case we need some redesign of the XploRe code. This is achieved with suitable reshape operations of the output matrices. The graphical output is then obtained by arranging the two output vectors x2 and y2 and the output matrix z1.

Figure 18.7: DAX30 Implied Volatility, 03.01.1997
\includegraphics[width=1.40\defpicwidth]{DAXVola030197.ps}

Figure 18.8: DAX30 Implied Volatility
\includegraphics[width=1.40\defpicwidth]{DAXVola040199.ps}

The advantage of measuring implied volatilities is obviously an expressive visualization. Especially the well known volatility smile and the corresponding time structure can be excellently illustrated in a movable cubic space. Furthermore this approach will enable real-time calculation of implied volatilities in future applications. Excel can be used as a data retrieval front end for real-time market data providers as Datastream or Bloomberg. It is imaginable then to analyze tick-data which are fed online into such an spreadsheet system to evaluate contemporaneous volatility surfaces.