R

Surfing the Web at Work

In my previous post, I mentioned my friend and previous co-worker at Tryg, Ole Schei, that is wonderfully meticulous, and has for some time quantified aspects of his life in a time-series format. This is, of course, a natural thing to do for an actuary. While we both worked at Tryg I was allowed to look at one of these time-series – the one containing detailed information about Ole’s web-surfing (for non work-related matters) at work.

XGBoost and University Acceptance

Student acceptance Lately I got to play with some very interesting data, relating to student acceptance (and ranking) into applied courses from a university in Korea. The university (which name must be hidden) is a highly ranked university in Korea, and life there is super competetive in almost every way. It is therefore very interesting to see what drives acceptance, and what can students do to improve their chances?

The Modified Bessel function of the first kind and Automatic Differentiation

I was intending to write a longer blog-post about my favourite dataset of all time: the internet surf-times of a previous co-worker (and dear I say, friend? :) ). However, this will have to be delayed to another post, because in running some old TMB code, all optimisations collapsed. The old codes were built on a Linux computer around two years ago, so I first thought it was due to some difference in the operating systems, or that TMB had changed.

TMB and the Saddlepoint Approximation

We seek to employ the framework of the R package Template Model Builder TMB (Kristensen et al. 2016) which approximately “integrates out” latent variables using the Laplace approximation – to automatically solve the inner problem of the saddlepoint approximation (SPA) and return the negative logarithm of the SPA. All code can be found in this Github repository. The document has the following layout: Introduction to the Laplace approximation Introduction to the Saddlepoint approximation Introduction to TMB Using TMB in numerical SPA calculations and parameter optimization spaTMB example Edit 12.

The fear index, VIX and variance swaps

Four years ago, back in 2014, a friend from HKUST, that had started working in the finance industry, asked me about the VIX. He could not figure out why the CBOE volatility index, popularly called the fear index, was calculated the way it was (see this white paper) – specifically he was curious about the reason for the term \(1/K^2\). Pursuing the quest of understanding the VIX, I remember it felt like very few people truly understood what was going on, and that the ones that did had no interest in sharing their knowledge.