5 New Insights Helping To Avoid The Risky Horror in 2014

Newer insights have unmasked established concepts as unreliable in certain cases. As a reference, I take the worst type of optimizer - Markowitz' concept of diversification. But also in times where the market shifts into new regimes established models do not work properly - Black vs. Bachelier revisited.

Thank You for Reading


Statistics tells us that in 2013 about 45.000 pages were read in this blog (from about 110.000 since mid 2009).

This is because we provided even more views behind the curtain (Mathematics Wednesday and Physics Friday) and try now to share ideas every working day.

Not surprisingly, the number of page entries are led by MATHEMATICS and the post hit list shows the interest in the background and foreground of computational finance, the UnRisk Financial Language and advanced risk management approaches.

The most popular posts this year were not the best ones?

Like in music, movies, restaurants, …  "best" is rarely the same as "popular", but this year I find an interesting correlation between both.

2013 Hit List

Skateboarding and Computational Finance
Hows, Whys and Wherefores of FEM in Quant Finance (II)
Extreme Vasicek Examples The World was (not) Waiting For
Black vs Bachelier Revisited
Setting Boundary Conditions That You Don't Know
Flakes of Artificial Graphene in Magnetic Fields
The Big Joke of Big Data
Should Quants Learn More About Machine Learning?
CVA/FVA/DVA - Fairer Pricing or Accounting VOODOO
Dupire or Not Dupire? Is this a Question?

In Agenda 2014 we have outlined what our focus will be next year: package and disseminate know how. We tried to compile our purpose and passion into one word: quantsourcing

We wish You a Prosperous 2014!

Picture from sehfelder

Not a Christmas Story: Guide Stars

Recently, I started to write about Adaptive Optics in Achievements 2013. The basic idea in Adaptive optics is to calibrate the deformable mirror in such a way that a known star gives a sharp image.

SCAO: Single Conjugate Adaptive Optics
If the astronomers know a true star (a natural guide star) that is close to (or: in the) observation area, then this star can be used for derforming the mirror.


Different types of wavefront sensors are in use: In Shack–Hartmann SCAO systems the wavefront sensor is an array of lenslets that measures the average gradient (slopes) of the phase over each subaperture in the pupil plane.

Schematic operation of a Shack Hartmann sensor. In the ideal case, the lenslets deliver a periodic image of the guide star (top).  Under a perturbed wavefront, this image bcomes irregular (bottom). Source:    http://www.ctio.noao.edu/~atokovin/tutorial/part3/wfs.html

MCAO and MOAO: Increasing the angle to be viewed.
The disadvantage of SCAO systems is the narrow field of view (typically less than 1 arc minute). Multi conjugate adaptive optic systems (MCAO) and multi object adaptive optics systems (MOAO)use artificial laser guide stars or combinations of laser guide stars and natural guidestars to increase the angle of view to several arc minutes. Such laser guide stars are obtained by sendig laser beams (like in Star Wars) into the sky which are then reflected at the sodium layer that surrounds the earth at a height of about 90 km. Due to the finite distance of this sodium layer, techniques from tomography have to be applied to detect the atmospheric turbulence at different heights of the atmosphere.

A merry Christmas to all of you.

What I am really excited about - Flakes of artificial graphene in magnetic fields

Last physic's friday before holiday season - and today I will write about something which is not directly connected to finance. Me and my colleague and friend Esa from the university of Tampere will write about Flakes of artificial graphene in magnetic fields.

Artificial graphene (AG) is a man-made nanomaterial that can be constructed by arranging molecules on a metal surface or by fabricating a quantum-dot lattice in a semiconductor heterostructure. In both cases, AG resembles graphene in many ways, but it also has additional appealing features such as tunability with respect to the lattice constant, system size and geometry, and edge configuration.

Designer Dirac fermions and topological phases in molecular graphene. Gomes et al.
NATURE | VOL 483 | 15 MARCH 2012

Here we solve numerically the electronic states of various hexagonal AG flakes. The next picture shows our results  when calculating the electron density for such a system. It is amazing how the experiment and the simulation coincidence.

What are we going to do next: In particular, we demonstrate the formation of the Dirac point as a function of the lattice size and its response to an external, perpendicular magnetic field. Secondly,we examine the complex behaviour of the energy levels as functions of both the system size and magnetic field. Eventually, we find the formation of "Hofstadter butterfly"-type patterns in the energy spectrum. I will report about our findings as soon as they are published.

What is the connection to finance: Although not obvious the numerical methods to solve equations like the Schrödinger equation extremely fast and efficient help us to improve our numerical finance codes. Algorithms and methods used in UnRisk have proofed to work also in the fields of physics and industrial mathematics for years.

Achievements 2013: Adaptive Optics

As mentioned in Telescopes and Mathematical Finance, we, together with the Industrial Mathematics Institute (Johannes Kepler Unibersität Linz) and the Radon Institute for Computational and Applied Mathematics (RICAM) of the Autrian Academy of Sciences, have been working on mathematical algorithms for Adaptive Optics for the last years. The achievements will be used in very large and extremely large ground-based telescopes.

Model of the European Extremely Large Telescope (E-ELT) which should go into operation in the early 2020s. Its primary mirror will have a diameter of 39 meters. Compare its size to that of the Munich football stadium.
The point spread function of a telescope describes, roughly speaking, how sharp an image can be under ideal conditions and, therefore, how well two distinct objects (think of a planet in the vicinity of a star) can be separated. When the primary mirror of a telescope gets larger, the point spread function gets closer to a delta distribution. This is the main reason for building extremely large telescopes.

The sharpness of the images is not only influenced by the point spread function but also by blurring through turbulences in the atmosphere. Adaptive optics uses deformable mirrors to correct blurred images.

If there were no atmosphere, the incoming wavefronts from a star to be observed would be parallel. The deformable mirror, optimally adjusted, corrects the perturbations. These perturbations change, more or less, continuously so that the actuator commands for the deformable mirror have to be calculated with a frequency of 500 to 3000 Hertz.

Next: SCAO, MCAO and MOAO.

 

Why Creating Simplicity Is Not Simple

As technology providers we are highly committed to relate to people. We want to take the interplay between our system and users and make them feel more "natural".

UnRisk Financial Language - A VaR Scenario

Recently we have written about the UnRisk Financial Language (UFL), our asset enabling quants to program in "their language". Up to now we did not give you examples but this will change today. I have chosen a Value at Risk scenario, as it makes it clearly obvious how a domain specific language can help to simplify things tremendously.

In a first step we set up the risk factors (Interest, Equity, FX, Credit) as a list. These list also contains the historical values and the information up to what extent the information will be taken account in the calculation (number of principal components).

Setup risk factors
With a one-liner we can set up the Monte Carlo scenarios. All necessary information, not explicitly passed will be calculated, for example the correlations between the risk factors.
Generating Monte Carlo scenarios, necessary parameters are calculated automatically from the market data. 
Now the scenarios will be applied to a single instrument. Using UnRisk Financial Language it would be of course possible to apply the scenarios to arbitrary portfolios.
With the time series command one can specify which risk factors will be applied.

The actual market data set describes today's market data and is needed to create scenario deltas.

We will apply the scenario deltas to a fixed rate bond.

We calculate the scenarios deltas
The results can be extracted easily by again providing high level commands.

Scenario Delta Values for the fixed rate bond. Additionally one can of course get out the single risk factor scenario deltas.
The above example shows how a programmatically elaborate task can be simplified significantly by using a domain specific language like UnRisk Financial Language.

Additionally to the high level UFL we think it is necessary to provide the information how things are calculated at the bottom. Therefore we have set up the UnRisk Academy and have written the Workout in Computational Finance

Brownian Motion Playground

In our previous physics Friday posts we discussed Brownian motion, starting with some historical anecdotes and showing where in nature Brownian notion occurs.
Today's post delivers a little app to play with and to get a feeling for the properties of Brownian motion with a drift.

Screenshot of the Brownian Motion App

You can download the app here. The Wolfram CDF player to run the app can be downloaded here.

Quant Finance and Mechanized Intelligence - Average is Over?

I enjoy reading Tyler Cowen's Blog Marginal Revolution. His recent book is Average is Over. It is about the challenge to complement machine intelligence, greatly commented in David Brooks column Thinking for the Future .

Tempering Monte Carlo

Counting the number of magic squares of order 6 exactly, is much more complicated than those of order 4 and 5, which were discussed in Magic Squares and Algorithms for Finance.

Similar arguments to those given there show that by rotation, reflection and simultaneous intersection of rows and columns, you can obtain 192 magic squares from one arrangement of magic rows, columns and diagonals.

For the last several years, my private working horse computer (with an i7 processor) has been calculating about a trillion (10^12) magic squares of order 6, and the end is not near at all. Is there a different way to count or to estimate the number of magic squares of order 6?

An example of a 6x6 magic square: All numbers in the diagonals are (here) between 13 and 24.

Already in 1998, K. Pinn and C. Wieczerkowski (Institute for Theoretical Physics, Münster, at that time) published their paper Number of Magic Squares From Parallel Tempering Monte Carlo.

For a configuration C (a permutation of the numbers 1 thru 36), they define the "energy" E(C) to be the sum of squared residuals of row sums, colmun sums and diagonal sums compared to the magic constant 111 (for the squares of order 6). Therefore, if a configuration is magic, then its energy is 0, otherwise it is strictly positive (and greater than 2, to be more specific.)

For a positive beta, we can (at least theoretically) calculate exp ( - beta E(C)) and sum over all configurations C. With beta going to infinity, this sum converges to the number of magic squares (counting each rotation or reflection separately).

The art, and it really is art in my eyes, is now twofold:
(1) Replace the sum over all configurations by a clever Monte Carlo simulation, which becomes increasingly difficult (larger standard deviations) for larger beta, and
(2) increase the number beta to obtain better accuracy.

Details can be found in their paper.

Their estimate for the number of magic squares of order 6 is  (0.17745 ± 0.00016) × 10^20 with a 99% significance.

Two of the techniques they use are extremely relevant for finance.
(1) Of course, Monte Carlo simulation and accuracy estimates are essential in valuation of derivative products.
(2) The tempering (increasing the beta) is a technique which is also essential in simulated annealing, a method from global optimization.

Radical Innovation - Revolution of Heroes or Heroes of Revolution?

I like music from all directions (from John Adams to John Zorn). Who are the innovators in music?

Examples from Jazz.

What was it that so many great musicians played, say, Bebop (Dizzy Gillepie, Charly Parker, Bud Powell, Thelonious Monk, Max Roach ..), Free Jazz (Ornette Coleman, John Coltrane, Charles Mingus, Archie Shepp, Cecil Taylor, ..), Loft Jazz (Anthony Braxton, Arthur Blythe, Julius Hemphill, David Murray, Sam Rivers, …) … or those around John Zorn (improvised music, hardcore, klezmer-oriented free jazz, …)?

A coincidence of talented artists at a time?  Or are artists motivated to join a revolution - and share their best work?

Quant Development - A Fractal Project Performance Model

The performance of a quant finance development project depends on the skills of the team members, their organizational interplay, the methods and tools.

The team contributions and their organizational consequences to the success of a project are usually modeled in Bell Curves (top- average- and under-performers under the law of average and standard deviation). But this does not work well for performance measurement systems, because dependencies make a project much more complex (Quants- Racers at Critical Paths).

Brownian Motion in 1D Structures

As mentioned in the last of my posts the main problem to observe truly one dimensional Brownian motion is the fabrication of narrow structures. In organic chemistry one important material is tetrathiafulvalene-tetracyanoquinodimethane (TTF-TCNQ)

Structure of TTF-TCNQ (image downloaded from http://www.intechopen.com/books/nanowires-fundamental-research/nanowires-of-molecule-based-conductors)

The large planar molecules are preferentially located on top of each other, and the one dimensionality of the electronic band structure is enhanced by the directional nature of the highest molecular orbitals. With the experimental technique of NMR (Nuclear Magnetic Resonance) one can monitor the motion of the electronic spin in these one dimensional bonds [Soda et. al. J.Phy. 38,931,(1977)].

In an ideal world without perturbations one would observe a sharp delta function agh the nuclear Larmor frequency. However, perturbations generate random magnetic fields at the sites of the nucleus and lead to a broadening of the resonance line. A source of perturbation is the electronic spins which couple to the nuclear spins through hyperfine interaction and thus generating a fluctuating magnetic field (at the nucleus site) reflecting the dynamics of the electron spin motion.

Assuming the electrons perform a random walk in one dimension it can be shown using the spin-spin correlation function that the spin lattice relaxation rate for this case needs to be proportional to x=1/Sqrt(H), where H is the initial external magnetic field.

In the measurement the spin-lattice relaxation rate is measured which is then plotted versus x. There is a wide range where the relaxation rate is proportional to 1/Sqrt(H) indicating 1D diffusion of electronic spins.

The New UnRisk Academy Event Blog


A common cold has killed today's mathematics wednesday post.

This is to inform you that the UnRisk Academy launched a Blog to present its courses, seminars, workouts, .. in a form that allows more detailed descriptions but keep an overview archive: UnRisk Academy Events.

No Math Today

Today, mathematics is closed due to a common cold.

5 "Don'ts" Heads of Quant Teams Should Remember


Quant finance projects are usually complex and quants are racers at the critical path. In the worst case they need to make deadlines others have already delayed. Hard work.

Idealism And Realism in Programming - UnRisk Financial Language


Idealism vs Realism in programming?

Idealism strives for abstraction, expressiveness, productivity, portability, …
Realism is driven by implementation, efficiency, performance, system programming, …