Yesterday evening I read The Cheat Code To Life in the Aug-13 issue of the WIRED Magazine.

Bill Hader's first pro tip: "Tell people it's your birthday. You'll get free drinks and meals ...."

I really enjoyed reading the article about the sneaky tricks and rule-bending ... knowing that they are fruit of sarcasm. At the other hand it is about "look stronger than you are" and "the key to getting away with any kind of cheating do not act like a winner".

### Part of the Quant Community - Not Apart from the Quant Community

A few hours ago we have fixed an agreement with one of our featured clients for an UnRisk add-on package that fits again into our made-to-measure architecture, but will be customized to their needs first and quickly - to make important deadlines of their clients.

### Big Data Quants - Is News Analytics Another Form of Riding the Price Waves?

It was the cover story of the March-13 issue of the Wilmott magazine. In short, it is about the extraction of insight from unstructured data - news, sentiment, ..

Many people may think news analytics is for event-driven--black-box trading, but Reuters, for example, has something different in mind. Something that fits to white-box quant finance, IMO. News-based factor generation for intelligent decisions? A technology to support multi-factor strategies.

Many people may think news analytics is for event-driven--black-box trading, but Reuters, for example, has something different in mind. Something that fits to white-box quant finance, IMO. News-based factor generation for intelligent decisions? A technology to support multi-factor strategies.

### Should Quants Learn More About Machine Learning?

We want systems that understand financial markets and anticipate their behavior. Quantitative finance is about the development of models and computational methods and their applications.

### FEM and Boundary Conditions II

A week ago we discussed two different types of boundary conditions - Dirichlet and Neumann boundary conditions - and presented different ways how to implement the first ones. Today's post will show how to implement the latter one. Just to remember:

For most applications in quantitative finance the h can be chosen equal to zero.

The inclusion of boundary condition of the Neumann type is accomplished by using the surface integral (see the beginning of the FEM blog post series).

This integral is added to the element load vector

It can be evaluated once the element shape functions are known. Here, we demonstrate the calculation for the linear triangular. Depending on the side of the triangle where the Neumann boundary condition is specified we obtain the results

for sides ij, jk, ik respectively.

The post excerpts a chapter of the book A Workout in Computational Finance.

**Neumann**boundary conditions, where the value of the normal derivative is knownFor most applications in quantitative finance the h can be chosen equal to zero.

The inclusion of boundary condition of the Neumann type is accomplished by using the surface integral (see the beginning of the FEM blog post series).

**f**.It can be evaluated once the element shape functions are known. Here, we demonstrate the calculation for the linear triangular. Depending on the side of the triangle where the Neumann boundary condition is specified we obtain the results

for sides ij, jk, ik respectively.

The post excerpts a chapter of the book A Workout in Computational Finance.

### Quants Do Mathematical Finance by Computer

Sounds simple? But when I thought about the Extreme Quants, I thought, I say a few words about maths and how it changed my life. You can find more about my background here.

Although I find mathematics is a result of the evolution of the "lazy" brain (a theorem proof frees you from testing many cases, the theorem holds for infinite many cases), I never found it boring. But as an algebraist, a kind of an "abstractonaut", I did not see immediately when maths became "real".

Although I find mathematics is a result of the evolution of the "lazy" brain (a theorem proof frees you from testing many cases, the theorem holds for infinite many cases), I never found it boring. But as an algebraist, a kind of an "abstractonaut", I did not see immediately when maths became "real".

### Extreme Quants - Survive Anywhere?

The cover story of the Sep-13 issue of Wired UK:

I select Ranulph Fiennes' expert advice, probably because his story of a life of extremes should not be the desired image of a quant?

*The Inspiration Issue*is about*Make the Impossible Happen*. 23 rule-breakers talk about extreme how-tos.I select Ranulph Fiennes' expert advice, probably because his story of a life of extremes should not be the desired image of a quant?

### An End of Books - Or Books Reinvented?

The bound paper documents are part of a long culture. Most of them may be replaced by e-books. Here I do not distinguish between them. A book is a book.

### FEM and Boundary Conditions I

In today's post we discuss two different types of boundary conditions:

In quantitative finance this situation for instance occurs in the valuation of barrier options.

For most applications in quantitative finance the h can be chosen equal to zero.

Implementation of Dirichlet boundary conditions:

Dirichlet boundary conditions are straightforward to implement: The simplest way is to keep the equations in the assembled matrix and to set the diagonal matrix

entry for each known nodal value equal to 1 and all other entries in this row to 0.

Assume that the value of the unknown function at node 3 in the example presented in last weeks post is known, Φ(x

While this method is straightforward and easy to implement, it has two drawbacks: First, known values are kept in the set of equations as unknown values, and second, the method destroys the symmetry of the coefficient matrix. The second method I want to present -which is only a slight modification of the first one - accomplishes the same goal but preserves the symmetry of the matrix. Again, we keep the equations in the assembled matrix, but now multiply the diagonal matrix entry for each known nodal value with l, where l is a number several orders of magnitude larger than

any other term in the matrix. The corresponding right-hand-side value is replaced by the known nodal value multiplied with the new diagonal.

The method is easy to understand by dividing all entries of the row corresponding to the known value by its diagonal entry (including the right-hand side vector). This yields a diagonal entry equal to unity and very small off-diagonal values (order 1/l) in the matrix, and the known nodal value in the right-hand-side vector. This is essentially the same result as obtained with method one.

**Dirichlet**boundary conditions, where the unknown function is known on some parts of the boundaryIn quantitative finance this situation for instance occurs in the valuation of barrier options.

**Neumann**boundary conditions, where the value of the normal derivative is knownFor most applications in quantitative finance the h can be chosen equal to zero.

Implementation of Dirichlet boundary conditions:

Dirichlet boundary conditions are straightforward to implement: The simplest way is to keep the equations in the assembled matrix and to set the diagonal matrix

entry for each known nodal value equal to 1 and all other entries in this row to 0.

Assume that the value of the unknown function at node 3 in the example presented in last weeks post is known, Φ(x

_{3}, y_{3})=g_{3}. The matrix and the right-hand side vector would in this case have the formWhile this method is straightforward and easy to implement, it has two drawbacks: First, known values are kept in the set of equations as unknown values, and second, the method destroys the symmetry of the coefficient matrix. The second method I want to present -which is only a slight modification of the first one - accomplishes the same goal but preserves the symmetry of the matrix. Again, we keep the equations in the assembled matrix, but now multiply the diagonal matrix entry for each known nodal value with l, where l is a number several orders of magnitude larger than

The method is easy to understand by dividing all entries of the row corresponding to the known value by its diagonal entry (including the right-hand side vector). This yields a diagonal entry equal to unity and very small off-diagonal values (order 1/l) in the matrix, and the known nodal value in the right-hand-side vector. This is essentially the same result as obtained with method one.

In the next post I will show how to implement Neumann boundary conditions in a finite element setup.

It will be published on Tuesday the 20th of August. The post excerpts a chapter of the book A Workout in Computational Finance.

### CVA/FVA/DVA - Fairer Pricing or Accounting VOODOO?

**What is it?**

**CVA? The positive or negative market value of counterparty credit risk related to a set of future net cash inflows or outflows.**

Assume that the position of interest is a swap agreement with a specific counter party. For the valuation, you calculate the expected present values of future cashflows, where some realizations of these cashflows will be positive for you, some will be negative. If the counter party defaults, the positive outcomes (for you) will become less valuable. This adjustment taking into account the credit risk of the counter party is carried out in CVA.

FVA? Similar to the CVA concept but reflecting the positive or negative market value of cost or benefit to fund a derivative

DVA? Adjustment to reflect the market value of non-performance risk to the carrying value of fixed income securities issued by a company

**How to deal with it?**

**The continuing financial crisis has led to significant changes in the valuation of derivatives contracts. Fair value continues to be one of the key issues for the banking sector. Risk-free world or real world? This discussion is influenced by methodology and technology.**

New accounting standards force the adjustment of credit or fund values (CVA/FVA) or even more controversial debt values (DVA) - DVA allows an institution to report profit as its health deteriorates ....?

However, the adjustments need to rely on exposure modeling, the prediction of future cash flows of a portfolio with a counter party.

This introduces much more complexity in the valuation space, relevant to trading, risk management and accounting.

UnRisk is a valuation and risk management technology and we have already shown that, for example, the calculation of Monte Carlo VaRs with full valuation for a moderately complex portfolio needs enormous computing muscles and optimized numerical schemes for the over night valuation.

And this is what we do first - make valuation engines as blazingly fast as required and organize them intelligently in high level tasks

With VAs one may run into requirements of billions of single valuations for portfolios with a major counter party and general derivatives.

Selecting momentary technologies blindly may make it impossible to achieve the ambitious goals (full valuation with LMM?). Data and valuation management needs to be integrated carefully and an exposure modeling engine needs to work event driven.

With this respect we are in the middle of the VA project. Manage the valuation side first - and do it the UnRisk way: build a sound fundament for a really tall bullding

Picture from sehfelder

### Without Passion You May As Well Give Up

A short video: Steve Jobs explains the rules for success - presented by Michael Hyatt.

I totally agree. Here I have tried to characterize industrial work vs lab work. In lab work you work hard and take risk to do new things. To be successful in a lab environment you need passion and talented people around you.

### FEM - From Single Elements to Global Matrices

In our series of blog posts

must be solved in each time step. For instance, for a single triangular element (with nodes

i,j,k) with linear test functions and a fully implicit time stepping scheme (Θ=1),

the resulting coefficient matrix

diffusion-reaction equation is

where the corresponding right-hand-side vector is given by

To obtain a solution, terminal/initial and boundary conditions must be specified. The procedure to incorporate these element matrices into a global system of equations is called direct stiffness method.

I will now illustrate the procedure using a simple triangular mesh (see figure below)

consisting of 6 nodes and 4 elements.

The table below connects the global node numbers to the local element numbers i,j,k.

The dimension of the coefficient matrix is 6x6 (6 unknowns). We will now loop through the elements and add their contributions to the global coefficient matrix - this assembling process is shown step by step in the next table table. The position for the entries of a single element (3x3 matrix) are determined by the global node numbers of the element's node.

An identical procedure is performed for the assembling of the right-hand-side vector:

A last blog post in our FEM series will deal with the incorporation of boundary condition to our matrices - it will be published on Tuesday the 13th of August.

The post excerpts a chapter of the book A Workout in Computational Finance.

**Hows, Whys and Wherefores of FEM in Quantitative Finance****we explained how to obtain the different matrices (stiffness, mass,...) for a single element but did not discuss the assembling process. Irrespective of the type of the partial differential equation (diffusion, reaction-diffusion, reaction-convection-diffusion), for a time dependent problem with a time discretisation Θ≠0 a system of linear equations**

i,j,k) with linear test functions and a fully implicit time stepping scheme (Θ=1),

the resulting coefficient matrix

**U**of the system of linear equations of adiffusion-reaction equation is

where the corresponding right-hand-side vector is given by

I will now illustrate the procedure using a simple triangular mesh (see figure below)

consisting of 6 nodes and 4 elements.

The figure shows the simple mesh used for explaining the global matrix assembling process. Numbers in frames denote element numbers, numbers without frames are the node numbers.

The table below connects the global node numbers to the local element numbers i,j,k.

The dimension of the coefficient matrix is 6x6 (6 unknowns). We will now loop through the elements and add their contributions to the global coefficient matrix - this assembling process is shown step by step in the next table table. The position for the entries of a single element (3x3 matrix) are determined by the global node numbers of the element's node.

Form of the global matrix after assembling the first (first table), the first and the second (second table) element and all (third table) elements.

An identical procedure is performed for the assembling of the right-hand-side vector:

A last blog post in our FEM series will deal with the incorporation of boundary condition to our matrices - it will be published on Tuesday the 13th of August.

The post excerpts a chapter of the book A Workout in Computational Finance.

### Is There Optimal Risk if The Wood Burns?

This is a picture (from Wikimedia) from the Höllengebirge at the Lake Attersee, where I have rented a summer apartment. It is right in front of the Höllengebirge, where the rock wall is really steep. In From Financial Doldrums to Storm I have made pictures from our old wooden boathouse.

### Diffusion reverted - what was the temperature of Lake Traunsee?

In my recent post What is the temperature of LakeTraunsee, we started with a cold and a warm half of the lake

and calculated the lake temperature after while during which diffusion transported heat from the warm side to the cold one.

Now we ask: Can we mathematically revert this process? This means, we would measure the final temperature (with arbitrary precsion) and would like to know the (in our case) jumpy initial temperature.

To do some analysis, we observe that on the space-time domain (0,1) times (0,T)

when Dirichlet boundary conditions u= 0 are to be satisfied. (In our case, the constant 20, which satisfies the heat equation just has to be added).

This means that if we can develop the initial condition into a Fourier sine series, then the solution can be calculated at any future time (always assuming that boundary conditions do not change. The "exp" in the eigenfunction damps high-frequent oscillations in the initial conditon.

Reverting?

With the same analysis, we could develop the final condition into a Fourier series. Reverting time means that the damping factor becomes an amplifying factor now. An error in the n-th Fourier coefficient is amplified by exp(n^2 pi ^2 t). We actually can observe this:

However, so called regularization techniques help to overcome these oscillatory results. With a regularized singular value decomposition and a regularization parameter of 0.001 (top) and of 0.1 (bottom) we obtain:

This reproduction is reasonable, albeit not perfect. The jumps in the intial condition are the reason for slow convergence (in the appropriate Sobolev space).

Chapter 15 of the Workout deals with inverse problems arising in computational finance.

and calculated the lake temperature after while during which diffusion transported heat from the warm side to the cold one.

Now we ask: Can we mathematically revert this process? This means, we would measure the final temperature (with arbitrary precsion) and would like to know the (in our case) jumpy initial temperature.

To do some analysis, we observe that on the space-time domain (0,1) times (0,T)

builds a system of eigenfunctions for the heat equationThis means that if we can develop the initial condition into a Fourier sine series, then the solution can be calculated at any future time (always assuming that boundary conditions do not change. The "exp" in the eigenfunction damps high-frequent oscillations in the initial conditon.

Reverting?

With the same analysis, we could develop the final condition into a Fourier series. Reverting time means that the damping factor becomes an amplifying factor now. An error in the n-th Fourier coefficient is amplified by exp(n^2 pi ^2 t). We actually can observe this:

Backwards heat equation: 20 Fourier coefficients used. |

This reproduction is reasonable, albeit not perfect. The jumps in the intial condition are the reason for slow convergence (in the appropriate Sobolev space).

Chapter 15 of the Workout deals with inverse problems arising in computational finance.

### Future Thinking Is About the Presence - But Present Quants Can Build Future

I have often hoped to have an idea about the future, but when I predicted it, it was on the ground of (my) "todays" behavior. Whatever I did, thinking, modeling, .. machine learning. Predictive modeling tries to create models that forecast. It is a wavering calculus ...

**We need to accept it: we often fail to predict the important stuff****The real behavior is often more complex than our models describe (if not, our models are reality). We need to embrace uncertainty.**

**But we can use scenarios to build resilience and agility**
Subscribe to:
Posts (Atom)