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, …