## Pages

### The Heston Model

For the analysis of many exotic financial derivatives, the Heston model, a stochastic volatility model, is widely used. Its specific parameters have to be identified from sets of options market data with different strike prices and maturities, leading to a minimization problem for the least square error between the model prices and the market prices. It is intrinsic to the Heston  model that this error functional typically exhibits a large number of local minima, therefore techniques from global optimization have to be applied or combined with local optimisation techniques to deliver a trustworthy optimum.

In our discussion of models the Heston model will get a prominent place and we will examine its features in detail. We start with the model equations will discuss the properties and will also show some examples how reliable model parameters can be obtained.

The Heston stochastic volatility model [1] relaxes the constant volatility assumption in the classical Black Scholes model by incorporating an instantaneous short term variance process (CIR)

where r denotes the domestic yield curve, v(t) denotes the stock price variance and dW's are standard Brownian motions with correlation ρ, κ is the reversion speed (represents the degree of volatility clustering), Θ is the long term level of the variance process and σ is called the volatility of volatility (although technically a volatility of variance).
The variance process is always positive if

(Feller condition).

[1] S. Heston: A closed-form solution for options with stochastic volatility with applications to bond and currency options, Review of Financial Studies 1993,6, 327-343.

### No VaR of the Jungle? Dangerous Creatures May Enter the Village

For the last weeks Andreas has been quite actively writing the posts below on the city swap. An example of a financial deal, that accumulated all possible misunderstandings between a seller (the Bank) and a buyer (the City). The deal is now disputed at the court.

### The City Swap Conclusions

For the last weeks, I have been quite actively writing on the city swap (see VaR and expected shortfall of the city swap and the posts quoted there). This post is about drawing my conclusions.

A Short History
The swap between the city and the bank was entered in 2007; the structured leg had a strong coupon dependence on the CHF/EUR exchange rate. With the CHF getting stronger and stronger (especially in 2011), the city refused to continue payments in Oct. 2011, claims and counterclaims were filed, and it is still open how the trial at the commercial court will end.

The Legal Dispute
The city argues that the bank should have known that the city had not been allowed to enter the swap. I am not an attorney and will not publish my personal opinion here.

The Mathematics of Valuation
I have shown in several posts on Garman-Kohlhagen that already the most simple model (Garman-Kohlhagen) is capable of delivering indicatively reasonable valuation (of course, depending heavily on the volatility) and to reveal the strong asymmetry in the payoff, meaning that the city can gain only a small portion but can have severe losses if markets are unfavorable (which is what happened since 2011).

Higher Sophistication Necessary?
Of course, one could use much more complicated models (local volatiliy or stochastic volatility for the FX process, randomness of interest rates). The valuation results will then differ quantitatively from the Garman Kohlhagen values, but in any case the main price driver will be the FX rate at the respective valuation date. Due to the extreme leverage of the termsheet, any pricing model will deliver magnificent losses at the current exchange rate of (more or less) 1.2 CHF per EUR.

Risk Analysis
From my point of view, a simple VaR based Risk analysis (again based on the Garman Kohlhagen model) could have pointed out that in 5 percent of the cases, losses in the order of 9 digit sums can and will occur. The counterclaim of the bank claims for more than 400 million EUR. You can buy 1000 decent 1000 square foot apartments in Linz for that price.

To Summarize
There is no need to have rocket science modelling for analysing the riskiness of the specific swap. When it was entered, the CHF was very cheap compared to the EUR, and volatilities were very low. The strengthening of the CHF and the increase in volatilities, both induced by the EUR crises, led to the negative explosion of the valuation results.

### "We wrote this book to give quants a sound overview of relevant numerical methods" … But This Was 2013

The book - Michael Aichinger and Andreas Binder, Authors.

Some of the methods printed in this book are widely used, while others should. Particular attention is thus given to working out the strengths and weaknesses of the different methods and to reveal the risky horror in their application. They used examples from the bank practice assisted by a hands-on approach utilizing a complementary web page for explorative learning.

### The Web Became 25 - Will It Become 50?

Cover story of the Wired UK, March-14 Edition: Web@25.

25 years ago, Tim Berners-Lee published a proposal for what became the WWW.

It took off because it is universal, decentralized, open, free, built on collaboration, ….

But what of the next 25 years?

### VaR and Expected Shortfall - the City Swap Continued

For the exposure analysis of THE swap, I recommend to re-read
We valuate THE swap on February 5 (describes the payoff of the swap),
The future development of exchange rates (describes the Garman Kohlhagen model),
Garman Kohlhagen analyzed and FX option values underGarman Kohlhagen (distribution properties and option values), and
VaR and expected shortfall for managing the FX swap risk (that covers the risk measures for a single swaplet, i.e. the coupon payment at one coupon date).

For the exposure analysis of the swap in total, the risk numbers (VaR or expected shortfall) can not just be added: The termsheet of the swap states that each coupon to be paid by the City depends on the EUR/CHF exchange rate. Thus, there is significant path dependence (in some Asian style) contained. For the calculation of the VaR or the expected shortfall, we therefore use Monte Carlo simulation.

 Mathematica code for the Monte Carlo simulation. An initial rate of 1.65 and a constant (low) annual volatility of 2.5% is used. Note that the "0.5" in In[4] reflects the fact that coupons are paid semi-annually.
We calculated 100 000 paths of FX rates. The 95% VaR is that the City has to pay 104% of the notional amount of 195 mio CHF (over the lifetime, not discounted, no basis fee included) and the 95% expected shortfall is 127%.

This VaR and expected shortfall is extremely sensitive to volatility changes. The 2.5% in the above example are rather low. For the last 14 years (Feb. 2000 thru Feb.2014), the average historical volatility (in the sense of realized variance) was 6.32%. If we use this value, we obtain a 95% VaR of 276% (over the lifetime) and 95% ES of 347%.

The possible gain (Bank pays CHF Libor to City) in this simple Garman-Kohlhagen model was always 30%.

### Explaining Complex Concepts to Your Grandmother

This post is inspired by this post  in Noahpinon's blog.

Paul Krugman:
Don’t get me wrong: I like mathematical modeling. Mathematical modeling is a friend of mine. Math can be a powerful clarifying tool...
But it’s really important to step away from the math and drop the jargon every once in a while, and not just as a public service. Trying to explain what you’re doing intuitively isn’t just for the proles; it’s an important way to check on yourself, to be sure that your story is at least halfway plausible...
True for macroeconomics and the DSGE models, but also true for quant finance?

### VaR and Expected Shortfall for Managing the FX Swap Risk

In my recent post on Garman Kohlhagen option values, I presented the probability density (in the risk neutral measure) for the Garman Kohlhagen model.

The above plot shows the probability density of the FX value in 5 years after the start date, when we start at F0=1.65, when the interest rate differenct between CHF and EUR is 1.5% per year and the annual volatility is 2.5%. The y-axes is drawn at the the magic 1.54, meaning that left of the axes the City has to pay additional coupons.

The vertical line (at 1.39194) is chosen in such a way that the filled area measures exactly 0.05. Being a probability density, the complete area (from zero to infinity) has to be 1.
Therefore, the value F=1.39194 (at T=5, with vol=2.5%) is that value for which 5% of the FX random walk results are worse (from the point of view of the city) and 95% are better. This is the definition of the 95% Value at Risk.

In that case, the interest rate (at T=5) the City has to pay is
VaR=(1.54-1.39194)/1.39194 = 10.637%
(plus the basis fee of 0.065%).

The filled area describes those cases that are worse than the 95%VaR, and the 95% expected shortfall is defined as the expectation of losses given that the outcomes are worse than the 95% VaR. Expected shortfall is used to study the tail influence in risk management.

Here we obtain for the expected shortfall (at T=5, vol=2.5%):
ES=13.28% (plus basis fee).

In both cases (VaR and ES) we did not discount the future payments.

Obviously, these extreme outcomes (95% are better) depend heavily on the volatility and on the initial value of F. Remember that in 2011 extreme (historical) volatilities of 16% were observed.

Next: Value at Risk and Expected Shortfall for the combination of 20 coupon payments instead of one isolated coupon.

Last month Google acquired DeepMind Technologies with the interest in Deep Learning. It seems that in the view of Google deep learning deals with the use of neural networks to build powerful general purpose learning algorithms.

Some writers distinguish deep learning from machine learning, especial because its was less explicit and not supervised, but unsupervised.

### Cross Country Skiing and Quant Finance

I returned from the Antholz Valley yesterday. It was a fantastic week. The map above show the tracks of the Antholz Biathlon Centre. At the world cup event tracks 5 or 6 are used by the top female and male biathletes.

### FX Option Values Under Garman Kohlhagen

In my recent post, I presented the probability density (in the risk neutral measure) for the future distribution of FX rates under the Garman Kohlhagen model.

The value of a European option is then given by
(1) calculate the expected value of the option payoff under this risk neutral measure, and then
(2) discount it by the domestic rate.

As a formula, this reads as

with V(F,T) denoting the payoff and the factor before the integral used for discounting.

Assume that F0=1.62, the rate difference (domestic CHF - foreign EUR rate) is -1.5% and the time horizon T-t is 5 years. Then the probability density as a function of the volatility sigma behaves like this.

Starting (in the animation) with a volatility of 1.9%, the cumulative density of being below 1.54 first decreases (until 6.9%) and then increases again.

Next: VaR and Expected Shortfall

### Garman Kohlhagen Analyzed

Recently, I presented the Garman Kohlhagen stochastic differential equation (in The Future Development of Exchange Rates). When all parameters are constant, this SDE can be solved by applying methods from Ito calculus.

When the initial exchange rate is F0 at time t, then the probability density (in the risk-neutral measure) for the stochastic variable F (at time T) us given by

We can cisualize this (e.g.by the following Mathematica code

Here, we have set a (low) annual volatiliy of 2.5%, an interest rate difference of 1.5%, and an initial value for the exchange rate of 1.65. The plot shows the probability density for F after 5 years under these settings.

The NIntegrate command finally calculates the probability (again in the risk neutral measure) that F lies below 1.54.

Next: FX option values.

### The Future Development of Exchange Rates

As described in my post We valuate THE swap, the main driver for the coupons of the structured leg that the city would have to pay to the bank is the exchange rate between the Swiss Franc and the EUR. As soon as 1 EUR is traded below 1.54 CHF (on the fixing dates; let us name this rate x), the rate to be paid would increase from 0.065% to 0.065% + (1.54-x)/x. Thus an FX rate of 1.4 would give 0.065%+(1.54-1.4)/1.4= 10.065%.

To analyze the future distribution of exchange rates, a model is needed. The most simple one is the so-called Garman-Kohlhagen model (a generalization of Black-Scholes for FX rates). It states that the random walk for the rate F satisfies
The denomination currency of the swap is CHF, therefore the domestic rate has to be chosen as the Swiss Franc rate(s), the foreigen rate as the EUR rate(s), independent of the accounting currency of the city. As soon as a present value is obtained (in CHF), it can be converted to the EUR present value by applying the spot FX rate. As usual dW is the increment of the Wiener process and sigma the volatility of the FX rate (see also Getting Numbers for THE Swap.

As we have seen in A Short History of Floating Rates, historically the CHF rates were always lower (at least since the EUR exists) than the EUR rates, leading therefore to a negative drift rate (domestic minus foreign rate) and therefore to the expectation that the EUR will decrease compared to the CHF. (For the specialists in measure theory: in the risk neutral measure).

When we start a scenario generation at an FX rate of 1.65, we obtain with a volatility of 2% these possible outcomes after 10 years.

﻿
 Random paths as described above. 100 time steps of 0.1 years each

Next week: Distirbution properties for the Garman Kohlhagen model﻿

### Cool Business - My Relation to the Next Future

I could not resist and take a week off enjoying cross country skiing in the Antholz Valley with its Biathlon Center offering professional trails - the same as used at the Biathlon Wold Cup (again).

In seeking optimal risk it is important to select the right trails, length and duration, steepness and speed to have fun, but avoid hazardous actions.

### Getting Numbers for the Swap

Today in the late afternoon, I had the privilege to talk (as announced in earlier posts) at the Johannes Kepler symposium, and I really enjoyed it. A very heterogeneous audience of maybe 60 persons - academic staff, bank professionals, colleagues, consultanta, interested high school students, lawyers, personal friends, students (in alphabetical order) - gave me a good time and a few challenging discusiions.

When valuating the swap, I tried to use only publicly available data. I estimated volatilities from historical data, obtained Libor rates from the Federal Bank of St. Louis and exchange rates from the Austian National Bank.

The historical volatility (one year moving window, no fading memory) of the EUR CHF exchange rate had lowest values around 2 percent and highest values of 16%.
 FX volatility estimated from historical data.
Observe that the collapse of Lehman Brothers led to not so high volatilities as the EUR crisis did. From the beginning of the Swiss National Bank intervention to support a EUR=1.2 CHF rate, volatilites became very low again.

### Symbols or Numbers - Pure vs Applied Maths?

When in London, we enjoyed a meeting with Paul Wilmott. Among other things we talked about mathematical creativity and whether computer based learning can create the creativity. And about the creativity in applied mathematics, that is often questioned by pure mathematicians.

### Mathematical Quality Still Matters - Multiple Feedback in London

Is there a difference between quant finance 11 years ago and now? Some say, it became more boring, because the simplification of instruments moved emphasis away from modeling to data management. I always disagreed and the week in London confirmed: modeling, and correct model solving matters more than ever.