What Math and Physics Can Do for New Financial Thinking

Between the mathematics Wednesday and the physics Friday, I have an easy part today. This is a link worthy of your attention: Eric Weinstein: What Math and Physics Can Do for New Economic Thinking - In my title I have replaced economy by finance.

When Variance is Negative

Michael has been writing on correlation matrices in his recent posts. Is there also a relevance in option pricing?

Obviously, there are multi-asset options, e.g., equity basket options, on the market. If we assume that each of the underlyings follows an individual geometric Brownian motion (Black-Scholes world) with correlated Wiener processes, then the value of the option satisfies the multi-dimensional Black-Scholes equation

When the variance covariance matrix is positive definite, then this equation is a backwards heat equation. With appropriate end conditions (the payoff of the multi-asset option), it obtains a uniques solution which depends continuously on the data.

If the space dimension is not too large (not larger than 4 oder 5), it can be solved numerically by finite elements or by convolution of the payoff with the Green kernel of the PDE (a multi-dimensional lognormal density).

Alternatively, Monte Carlo techniques could be applied.

What happens if, for some reason, the variance-covariance matrix turns out to be not positive definite meaning that at least one of the eigenvalues is not positive. For the sake of simplicity of arguing, let this eigenvalue be negative.

Finite elements
In this case, the finite element method tries to solve an equation which is a backwards equation with end condition for the directions corresponding to the positive eigenvalues and a forwards equation with end condition for the directions corresponding to the negative eigenvalues. This is severely ill-posed as we pointed out in our Traunsee example.

Green's kernel
Naively applying the multidimensional normal distribution when one of the eigenvalues is negative leads to a density which is not a probability density as it does not integrate to one. (But I like the 3d plot.)
This is not exactly the bell shape one would expect.

Monte Carlo
Monte Carlo simulation typically takes uncorrelated random numbers and transforms them to the correlated ones by applying the (roughly speaking) Cholesky square root ot he variance covariance matrix. This is the good news: If an eigenvalue is negative, then the Cholesky decomposition will terminate with an error.

Practical relevance
But is this of practical relevance? We have learnt that a variance covariance matrix is at least positve semidefinite.

Coming next Wednesday: Negative eigenvalues in practical finance.

UnRisk FACTORY 5 Released

30-Oct-13 - UnRisk takes UnRisk FACTORY and UnRisk FACTORY Capital Manager version 5 to financial institutions for advanced, individualized investment and risk management processes.

Language Is Too Clumsy an Instrument?

said Luitzen Egbertus Jan Brouwer, Dutch mathematician and philosopher, founder of the mathematical philosophy of intuitionism. This weekend I reread Dietmar Dath's Höhenrausch, Mathematics of the 20th  Century in 20 brains - a collection of short stories and fictional portraits of Cantor, Hilbert, Poincaré, Brouwer, Noether, Ramanujan, Gödel, Dirac, Turing, Kolmogorow, von Neumann, Dieudonné, Grothendieck, Chaitin, Thom, Robinson, Mandelbrot, Witten, Wolfram  I am afraid, this book appears to be available in German only.

Portfolio Optimization and Correlation

As frequent readers of our blog may have noticed 'Physics Friday' has more or less become a 'Physics Weekend' post - hope despite this some of you still enjoy them.

In our last post we discussed some of the questions which may arise when working with random matrices. But I still owe you an explanation way random matrix theory may affect your life in quant finance. Today I try to answer parts of your question and we will make a short tour in portfolio optimization.

Suppose the task is to build a portfolio of N assets, then the daily variance of the portfolio return is given by

Here Cij is the correlation matrix and in order to measure and optimize risk in a portfolio it is essential to obtain a reliable estimate for the correlation matrix.In general this is difficult as the number of assets in the portfolio N may not be significantly larger than the number of days T in the time series (4 years of data give 1000 entries in the time series and the typical size of a portfolio is several hundred assets). The order of entries to estimate for the correlation matrix is N2/2. An accurate estimation of the correlation matrix would require q=N/T to be significantly smaller than 1.
An optimal (Markowitz) portfolio using this empirical correlation matrix would have

The gain of the portfolio is 

with gi the predicted gains of a single asset.
If r is the daily stock return at time t the empirical variance of each stock is

and the empirical correlation matrix is obtained as

as the corresponding risk (the risk of the portfolio over the period used to construct it). We call this the in sample risk. Now assume there is a "true" correlation matrix C which is perfectly known resulting in a risk

We now use this perfect correlation matrix to draw past and future x then we can construct a portfolio which risk is given by

The subscript out refers to the fact, that the risk is constructed using E but observed on the next period (Remember that we can draw future samples of x!).

So we have three possible estimates and it remains to understand their biases. One can use convexity arguments for the inverse of positive definite matrices to show that the out-of-sample risk of an optimized portfolio is larger (and in practice, this can be much larger) than the in-sample risk, which itself is an underestimate of the true minimal risk. This is a general situation: using past returns to optimize a strategy always leads to over-optimistic results because the optimization adapts to the particular realization of the noise, and is unstable in time [Potters et al, Financial Applications of Random Matrix Theory: Old Laces and New Pieces].
Only in the limit q going to 0 these quantities will coincide, since in this case the measurement noise disappears.

The question is how to "clean" the empirical correlation matrix to avoid (f possible) such biases in the estimation of future risk. And here RMT enters the game - how read again next "Physics Weekend" post.

Apple Rolled Out New Things You May Buy?

First up: we make UnRisk cross platform and platform agnostic. But we also recognize that there are events, where virtually incremental improvements are giving new directions.

Black vs. Bachelier revisited

Last week  we realized that one of the strengths of the Black76 model - interest rates must not  become negative - is one of its weaknesses at the same time - interest rates must not become negative and that the Bachelier model may be a possibility to handle interest rates that are close to zero.
Black:       dF= sigma F dW
Bachelier: dF= sigma W
Note that the Bachelier volatility is an absolute volatility not depending on the actual level of the underlying, whereas the Black volatility is mulitplied by the value of the underlying.

For the practitioner, the Black76 model is widely used to valuate vanilla interest rate options like caps, floors or swaption. The formula to be applied is
Black option formulae for call (C) and put (P) options
Here, F is the forward rate (e.g. of the floating rate to be capped), K is the strike level (the cap rate), sigma is the annualized Black volatility and T is the time, when the floating rate is set. If sigma tends to infinity, then the call value converges to exp(-rT) F, independent of the strike level.

Cap value for at the money caplet as a function of sigma.
(F = K = r = 0.5 % = 50 bp, T= 1) 
The same can be done for the Bachelier model.
Bachelier option formulae for call (C) and put (P) options.

Here, if sigma tends to infinity, then d1 becomes zero, and the call value (and also the put value) grows unboundedly.
Cap value using the Bachlier model. Instrument data as above.
Can the Black and the Bachelier volatilities be translated into one another?
For very small sigma (sigma = 0), the Black and the Bachelier option values coincide. For growing sigma, the Bachlier value grows unboundedly, whereas the Black value goes into saturation. This means that for every Black volatility, there is a corresponding Bachelier volatility delivering the same price for the specific vanilla instrument; this implied Bachelier volatility depends on the specific instrument. The following figure shows the mapping for various at the money caplets.

The other way round, i.e. obtaining the implied Black volatility from the Bachelier value, is more complicated, because the existence of a solution is not guaranteed.

Note that if the translation is possible at all, moderate Bachelier volatilities of 2 percent are translated into Black volatilities of 800 percent and more for small at the money rates.

Again, we have found a classical ill-posed problem. The solution need not exist and if it does exist, small perturbations in the data (Bachelier vola, termsheet data) may lead to arbitrarily large perturbations in the solution (the Black volatility). 

Why We Did Not Install A Service Desk

To answer this question I am lucky - I just need to link to An ABSERD incident - a service desk satire the latest post of "Eight to Late". It is pointed but describes the core problem. How to make services effective and efficient.

Agenda 2014 - Package and Disseminate Know How

2013 - we release(d) UnRisk 7 and UnRisk FACTORY 5 (in a few days) and we celebrated 11 years of UnRisk. Along our brand promise - quantsoucing - we bundled the UnRisk FACTORY/VaR Universe with UnRisk-Q.

Having packed 15 years of experiences into the transformation of mathematical schemes from complex technical systems into finance, Andreas and Michael have written A Workout in Computational Finance - recently published by Wiley.

All Random with this Matrix

On our way from billiards to quantitative finance we stopped at quantum chaos in last "Physics Friday" blog post. Without going to deep into details we mentioned the term random matrix - a term some of the  readers may not be too familiar with - so perhaps, as they have a direct application in quant finance, we will go a bit more into detail today.
As the name implies, a random matrix is a matrix with random entries. For such a matrix several question can be asked:
  • What is the limiting shape of the histogram of the distribution of eigenvalues when the size of the matrix becomes large?
  • How does the distribution of spacings between eigenvalues look like and what is the limiting shape if the size of the matrix becomes large?
  • Is there universality of these shapes with respect to small changes in the distribution of the matrix entries?
  • Are the eigenvectors localized or are there no dominant components?
Different approaches to answer these questions exist - a few of them are mentioned in the following:
  • Method of traces (combinatorial)
  • Stieltjes transform method
  • Orthogonal polynomials 
  • Stochastic differential equations

The figure shows a histogram of eigenvalues from a random real symmetric matrix (N=3000). Each matrix element is a random number and these numbers are Gaussian distributed with a mean of zero and a standard deviation of one (except the diagonal elements which have a standard deviation of square root of 2). The distribution thins out toward the edges as it should as the theoretical density of eigenvalues is known as Wigner's semicircle law (because the curve takes the shape of a semicircle centered at zero with radius Sqrt[2N],where N is the dimension of the random matrix (and hence the number of eigenvalues).

Next week we will see how random matrices are connected to quant finance.

Nobel Fever - The Economics Prize A Nod In Opposite Directions?

No Nobel fever has been broken out here at UnRisk. How should it, there are so many comments from economists .....

Concentrating on Eugene Fama and Robert Shiller, I recommend reading in MarginalRevolution

Tyler Cowen, Robert Shiller, Nobel Laureate - Eugene Fama, Nobel Prize Laureate
Alex Tabarrok, Robert Shiller Nobelist - Eugene Fama Nobelist

The Theory of Speculation

No, I am not going to write on this year’s Nobel laureates in economics, but this is the title of Louis Bachelier’s Ph.D. thesis, published in 1900 (in French), in which he developed the stochastic process of Brownian motion. He is considered to be the father of modern financial mathematics.

His approach for valuating stock options modelled the movement of the underlying equity as an arithmetic Brownian motion. Equivalently, the changes in stock price are normally distributed. For longer time horizons, this leads to some problems, the positive probability that the stock price may become negative is the most important one.

The Black-Scholes-Merton model, published in 1973, assumes that not the changes in stock price are normally distributed but the return rates on small time scales. For the model problem (no dividends, constant volatility), the Black-Scholes-Merton model  yields lognormally distributed stock prices.

For small volatilities (appropriately scaled), there is not too much difference between the realisation of a Bachelier path (red) and a Black Scholes path (black) as the following figure indicates. We have used the same random numbers for both models: Every up movement in one model is mirrored by an up movement in the other model.

However, with large volatilities, the Bachelier paths may become negative.

For interest rates, the Black (Black 76) model is widely used for quoting implied volatilites of caps or swaptions, and the Vasicek or the Hull-White model were often criticised for allowing negative interest rates. However, in reality it was observed that negative forward rates were quoted for some currencies (CHF and JPY are popular examples). On July 1, 2013, the German Basiszinssatz (forming the baseline of interest in many contracts when one party is late with their payment obligations) was quoted as -0.38% (minus 38 basis points).

If the underlying quantity (here: a forward interest rate) becomes negative, then you get in trouble when you try to apply the logarithm in the Black76 framework. A Bachelier model may help.

More on this topic on next mathematics Wednesday.

Independent Quants - Are You In Danger of Disruption?

You have long helped, say, risk management of your clients sidestep threats and find optimal risk.
Are the same forces that disrupted financial institutions reshape now the quant services segment?

You are offering a range of services from consulting to solutions but the boundaries between the professional services are blurring. Services are influenced by the "democratization" of knowledge, methodologies and technologies.

From classical to quantum chaos

You remember last "Physics Friday" post: We showed a phase space map of a billiard in a magnetic fields  as an example for a system showing classical chaos. As in classical Hamiltonian systems, the concept of integrability can also be applied to quantum systems. In the form of quantum numbers conserved quantities in quantum mechanics are related to symmetries. These quantum numbers are the eigenvalues of operators that "generate" the transformation under which the system is invariant (i.e., the operator counterparts of the classical conserved quantities).
The word quantum chaos might let us think of unpredictable behavior in quantum phenomena, but this is not the truth. In fact the solution of the linear Schrödinger equation cannot behave chaotically in the same way as that of quantized classically chaotic systems.

Quantum chaos means a quantum manifestation of chaos in deterministic classical mechanics.(Nakamura et.al. in Quantum Chaos and Quantum Dots)

This means the manifestation of chaos is the common characteristic phenomena of quantized classical chaotic systems. One way to see the effect of the classical dynamics is to study local statistics of the energy spectrum, such as the level spacing distribution P(s) which is the distribution function of nearest neighbour spacings as we run over all energy levels. A dramatic insight of quantum chaos is given by the universality conjectures for P(s):

  • If the classical dynamics is integrable, then P (s) coincides with the corresponding quantity for a sequence of uncorrelated levels (the Poisson ensemble) with the same mean spacing.

  • If the classical dynamics is chaotic, then P(s) coincides with the corresponding quantity for the eigenvalues of a suitable ensemble of random matrices.

Level spacing distribution for the energy spectrum of a quantum particle in a circular region vs. the level spacing distribution for Gaussian Unitary Ensemble, Gaussian Orthogonal Ensemble, and Poisson, respectively. Kriecherbauer T et al. PNAS 2001;98:10531-10532

Note that not a single instance of these conjectures is known, in fact there are counterexamples, but the conjectures are expected to hold “generically”, that is unless we have a good reason to think otherwise.

Streamlines, the Impossibility of Skateboarding and Model Calibration

We continue to calculate the amount of water (per second) during the 2013 flooding. To get an impression of the water level during the 2013 flood, we take a view on the location where there used to be a basketball court and a skate park.

Blue arrow: basketball basket.
Red arrow: top of a so-called wall, a skatebaoarding obstacle.
Photo by Günter Auzinger.

For modelling the water flow, we sketch a cross section of the river and make some simplifying assumptions.
Collecting flow data
Due to the reduced flow speed in the area subject to flooding, we neglect the increased width of the Danube but assume its regular width of 252m (source) and a rectangular shape. The highest water level on June 4, 2013 was 9.30m (source).   

The most difficult part in modelling is the flow speed. The flow speed of the Danube for regular water levels (which means around 4 metres in Linz) is between 1.8 and 2m/second. For high water levels, flow speeds of 3.5 to 4.5 m/s are observed. Michael Fürst reports flow speeds of 4m/s during the high water wave of August 2002 in the East of Upper Austria (in his diploma thesis:  Überflutungsraumanalysen anhand von Beispielen an der österreichischen Donau – Beitrag zur Verbesserung einer Evaluierungsmethodik, 2011. Institute of Water Management, Hydrology and Hydraulic Engineering, University of Natural Resources and Life Sciences, Vienna.)

Of course, the flow speed is lower close to the bottom due to the roughness of the river bed. Therefore, if we use width=252m, depth =9.3m, and a velocity=4m/s, we should get an upper bound for the flow rate. Multiplying and rounding gives 9400 cubic metres (or 9.4 million litres) per second. Can this be true?

Result validation
It is not that easy to obtain Danube flow rates for Austria. At least the following (semi-)governmental organisations are candidates: The water management departments of Upper and of Lower Austria, the traffic ministry (responsible for shipping regulations) and Verbund Hydro Power, which operates electric power plants and is therefore responsible for controlling the watergates.

Mauthausen (downstream of Linz and also downstream of the influent river Traun) reports a flow rate of 10.000 cubic metres/second on June 4 (source ).

A telephone call at the Upper Austrian governmental department yields between 8900 and 9000 cubic metres/second for the highest flow rate in Linz in June.

Relevance for model calibration
Why do I bother you with these details? At least for two reasons.
First, to show that simple models can deliver quite reasonable results. In finance, the preferred mathematical model for a specific task should be as simple as possible and as complicated as necessary.
Second: The parameters of your mathematical model are often not easily accessible. You might have data of good quality for simpler situations (regular water levels in the example, vanilla instruments in finance) and might have measurements only for proxies (Mauthausen instead of Linz, market price of one structured instrument instead of a similar one.)
Especially for the extreme cases, model validation is an essential task in modelling and simulation.

Risk modelling continues on next mathematics Wednesday

About the Rise of the Decision Factory and the Downturn of Possibilities

I just read Rethinking the Decision Factory, HBR Magazine Oct-13. The cover theme is "The Radical Innovation Playbook".
The Problem: Companies compete fiercely to find and retain knowledge workers, often accumulating thousands of them. Then they experience that they are not productive as hoped ....

CVA/FVA/DVA and Marginal Cost

In discrete manufacturing, we often thought about what will the next part cost and how to increase productivity to drop it. And along with this, makers thought of achieving market leadership by establishing a marginal cost pricing regime. As a result of this race the market became quite unstable.

Billiards, Chaos and Portfolio Optimization

First of all I have to excuse that the physics friday has become a physics saturday night. Reason for the delay has been a business trip to the UK.

The branch of physics studying how chaotic classical dynamical systems can be described in terms of quantum theory is called quantum chaos. The famous correspondence principle states that classical mechanics is the classical limit of quantum mechanics. If this is true then there must be quantum mechanisms underlying classical chaos. 

I think a good starting point here would be to give you a small example of classical chaos - this brings us to play around with billiards. A billiard can be described as a number of particles moving around in a region confined by hard walls.

Assume a 2d rectangle billiard with an aspect ratio β in a magnetic field perpendicular to the motion plane. Fixing the strength of the magnetic field one can tune the cyclotron radius Rc by varying the velocity of the particle. In the single-particle case, we focus on the dynamics of the system as a function of β and  μ=Rc/Lx where Lx is the choosable side of the rectangle. In both limits  (μ going to zero and  μ going to infinity) the motion is regular and between these two limits the dynamics is generally mixed except at particular values of μ when the system is completely chaotic.

The picture shows a phase space map for a rectangular billiard with aspect ratio β=2 and μ=6The color map indicates the phase-space distance ∆  (as a measure whether an initial point in the phase space leads to chaotic or regular motion) between two orbits having a small initial perturbation. (b) Ordered phase-space distances for all the cells plotted in (a). The dashed line shows the threshold (∆ = 0.1) between chaotic and regular motion.

To see how this classical picture relates to a quantum mechanical one and how one can use the concepts applied there for improving portfolio optimization you should mark next friday red in your calendar.

David and Goliath - About the Advantage of Speed, Accuracy and Better Eyesight

M. Gladwell's David and Goliath. Another Gladwell bestseller, taking the story of a shepherds boy felling a mighty warrior (in ancient Palestine) as metaphor for: what happens when ordinary people confront giants.

Catastrophic Streamlines

My sister is teacher at a local elementary school. Recently, I tried to pack some ideas of mathematical modelling into a two-hours guided tour for nine-year-olds.

As you may remember, in June 2013, Linz was hit by one of the worst Danube floods in history with a water depth of 9.30 metres (compared to average 4 metres).

The question I asked was “During the flooding, how many litres of water were flowing below the Danube bridges in Linz per second?”

I am convinced that interested children can tackle such a problem if someone gives them advice and helps them in sorting the orders of magnitude. At least my sister’s pupils were able to do so.

Boat in dangerous situation below the historic Eisenbahnbrücke.
(Source: Landespolizeidirektion Oberösterreich)

View from the Nibelungenbrücke downstream with
Brucknerhaus and Museum Lentos in the left half.
(Photo by Günter Auzinger) 

View from the Nibelungenbrücke upstream with
the castle of Linz in the right upper corner.
(Photo by Günter Auzinger)

The current post does not contain the solution of the Linz flooding problem. This is to inspire you to think about it yourself: Which information do I need?  What simplifications can be made to obtain still reasonable results? Can I verify my result qualitatively and quantitatively? Which tools from a household (bathtub?, loaf pan?) can be used to have an even more colourful demonstration?
Next week on Mathematics Wednesday: Streamlines and skateboarding.     

The Big Joke of Big Data?

The risk managers of tomorrow need to have as much experience in understanding massive data (extracted from news?) as they currently have when interpreting results of quantitative methods?

But how can we worry about big date, when we still struggle with getting the right small data (market data) to identify the parameters of our models?