Author Archives: Cyril

Monte Carlo on a graphics card

Recently I wrote an experience report on running Monte Carlo simulation on a GPU for the newsletter of TopQuants. My piece is here.

Posted in Uncategorized | Leave a comment

Units of measurement

Recently I had to familiarise myself with commodity futures. One thing that surprised me was the common unit of measurement for natural gas. It is used in MMBtu, which is a short for a million of British thermal units. It … Continue reading

Posted in Uncategorized | Leave a comment


This is not so much of a post, just a collection of bitcoin-related links:


Posted in Uncategorized | Leave a comment

Diagonalising an intensity matrix of a reversible Markov chain

Recently I needed to build a Monte Carlo simulator of a continuous-time Markov chain. This is a pretty straightforward exercise; the only catch was that I wanted it to perform well, so I had to use a fast algorithm for … Continue reading

Posted in Mathematics | Leave a comment

CVA calculation example

Let’s calculate CVA (credit value adjustment) analytically. We will see that analytical CVA calculation is quite complex even for a fairly simple transaction (a vanilla swap). A few shortcuts will help us simplify the calculation.

Posted in Finance | Tagged , , , , , | 2 Comments

The dreadful 40-60 rule

When we have to calculate exposure at default (EAD) on a particular trade, we seldom have to compute it analytically (e.g. as shown here). More often we just take the current MtM of the trade and add the so-called add-on. … Continue reading

Posted in Finance | Tagged , , , | 1 Comment

Historical or implied?

To calculate counterparty exposure, we need to calibrate our scenario generator to historical data. However, for CVA calculations, we need scenarios based on implied volatilities of the underlying risk factors. Continue reading

Posted in Finance | Tagged , , , , , | Leave a comment

Don't trust a model

Financial models are never precise, but it does not make them useless. Continue reading

Posted in Uncategorized | Leave a comment

Exposures are not additive: case in point

Potential exposure is not additive: the total exposure on two trades can be very different than the sum of potential exposures on each trade. Continue reading

Posted in Finance | Tagged , , | 5 Comments

Counterparty risk calculation guide

This paper by S.  Zhu and M. Pykhtin provides a blueprint for counterparty risk modelling framework.

Posted in Finance | Leave a comment