Shiny has been available for some time now, but I've only recently had the opportunity to play around with it. For us R users who are constantly purporting the benefits of the language, Shiny is another point to add to the list. Below I've created a simple stock charting application that pulls data from Yahoo's server, then presents the historical…

# Beta Regression Modelling

It is known that the distribution of LGD, EAD, FUC, or CCF (see for the definitions of CCF and FUC) when capped between 0 and 1 exhibits a non-normal shape with bimodal peaks (near 0 and 1). Hence, it is common to use a logistic link function to achieve a unimodal distribution close to normal, prior to running a regression.…

# Implicit Targets of EAD

When modelling to predict a target variable, the relationship between some set of explanatory variables and this target may be unknown or complex. In the context of linear models, transformation by a link function may not be sufficient to capture the linear dependence. In this case it is suitable to model an implicit variable of the target rather than the…

# A Fast Fourier Transform Method for Mellin-type Option Pricing

Following from the previous post on Mellin-type option pricing, analytical pricing formulas and Greeks are obtained for European and American basket put options using Mellin transforms. In the manuscript below, we assume assets are driven by geometric Brownian motion which exhibit correlation and pay a continuous dividend rate. A novel approach to numerical Mellin inversion is achieved via the fast…

# Multi-Asset Option Pricing with Exponential Lévy Processes and the Mellin Transform

I'm a big fan of the Mellin transform for solving PDEs. As an application of this, I've provided the 'broad strokes' for solving multi-asset options driven by exponential Lévy processes in this brief manuscript: http://arxiv.org/abs/1309.3035 The extended version of this paper will be ready at the end of 2015.

# Parallel Programming in R: Easy As 1, 2, 3,...

Interpretative languages can be slow to perform certain routines that would otherwise be quick in compiled languages. While speed is often not the reason one uses an interpretative language such as R, reducing computational time can be easy with the use of parallel programming. Non-parallel loops, whose iterations are independent of each other, can be substituted for parallel loops with…

# Using Fourier Transforms To Solve Option Prices

When the pdf of a distribution is not known analytically, it's common to compute by taking the inverse Fourier transform of its characteristic function. The same idea applies to financial options. For simplicitly, let's consider the discounted expectation formula of a European option . for log prices and time to expiry . In integral form this is where is the transition…

# What is a Margin of Conservatism?

This question comes up a lot in my field of work, and unfortunately, there is no rigorous answer. Everybody seems to have a different (albeit loosely similar) definition of a margin of conservatism. However, we all need a definition, as it drives much of the model development and validation work at financial institutions. Furthermore, AIRB risk parameter estimation models require a margin of conservatism,…

# Non-Linearity and the RWA Formula

Some of you might find this interesting. Often a lot of emphasis is placed on the quantification of , , and under the AIRB approach at banks (recall). Sometimes it is easy to lose sight of what is actually driving , and hence, the amount of capital institutions must hold in reserve. Some banks adopt this AIRB framework in the…

# AIRB Risk-Weighted Assets

When banks adopt the Advanced Internal Ratings-Based approach to calculate risk-weighted assets, they must adhere to the specific guidelines and formulas governing the approach. Banks are allowed to quantify the parameters (e.g. PD, LGD, EAD) used in the Basel capital formula, but cannot deviate from the analytic formula used to determine RWA. RWA is merely the unexpected loss, less the…