Microservices: ISDA SIMM™ in R

The Clarus API has a function to compute ISDA SIMM™ from a CRIF file contain portfolio sensitivities. What-if analysis can be performed in addition to the portfolio margin calculation. The function is very easy to call from many popular languages, including R, Python, C++, Java and Julia. What is R? R is a language and […]

Bachelier Model: Fast Accurate Implied Volatility

“An industrial solution” – provides computation to near machine precision for option prices over an extremely large range! Fast and analytic in nature, employs rational polynomials to determine implied BpVol. Follows the Bachelier model; that is, dF = σdW. A new method for computing implied BP Vol (basis point volatility) analytically has come to light. It is described by […]

Exploring Seasonality in a Time Series with R’s ggplot2

Inflation index values are decomposed into trend, seasonality and noise. Certain types of graph help identify seasonality. Graphs can be created simply and quickly in R. Simple graphs can be refined for stronger visual impact. Recently, I have been looking at inflation indices and studying their seasonality. The best way to see the overall trend and seasonality in this […]

Auto-detecting date format in CSV files

When uploading data into systems, comma separated value format (CSV) is a common choice. A difficulty can arise when editing CSV files in Excel — date formats can easily (and accidentally) change causing upload failures and end-user frustration. It is possible to write CSV uploading routines to automatically detect date formats and alleviate this problem […]

Data correction with fuzzy string matching

We are all familiar with Google’s “Did you mean” correction for misspelt search terms. But how does it work? There is a great chapter by Norvig in the book ‘Beautiful Data: The stories behind elegant data solutions’, that discusses and implements a basic spelling corrector, using only a few lines of python code. The chapter […]

Adapting to Direct Forward Curves

In interest rate pricing direct forward curves are defined on forward rates for a specific tenor as opposed to the more common discount factor representation, or the instantaneous forward curve representation. A simple example of a direct forward curve for 3M LIBOR would consist of a set of points and an interpolator, the points would […]

Quantitative Finance ‘GoodReads’

Two reading lists of books relevant to quantitative finance are provided using the GoodReads platform. Often I am asked to recommend good books to help a student, colleague or customer get a better grasp of quantitative finance. Instead of ad-hoc and incomplete lists, I thought it might be useful (especially for me) to have a […]

Swap Equivalents via Waves

In a recent paper, “Calculating Delta Risks and Hedges via Waves (2015)“, Hagan deals with an old practical problem–determining risk and hedges on an interest rate book. In older systems a delta hedge report is often implemented by perturbing quotes used to construct the yield curves, restripping the curves and then revaluing the book. As […]

Computus: Algorithms to compute Easter

With Easter arriving this weekend, I thought it might be interesting to mention something on the algorithms used to compute Easter. As we know, Easter is a not a fixed date each year, it is determined by the rule Easter is the first Sunday after the first full moon occurring on or after the vernal […]