In this post I will show how easy is to price a portfolio of swaps leveraging the purrr package and given the swap pricing functions that we introduced in a previous post. I will do this in a “real world” environment hence using real market data as per the last 14th of April. Import the discount factors from Bloomberg Let’s start the pricing of the swap portfolio with purrr by loading from an external source the EUR discount factor curve.

Continue reading

Introduction I am a big passionate of the tidyverse packages: I think they make the code very clean and clear. In particular, I like the lubridate packages for managing and making operations with dates but its major drawback is that it doesn’t manage financial holidays, which are key when projecting financial cashflows linked to instruments like interest rte swaps. In this case, I prefer to use the RQuantLib package.

Continue reading

Author's picture

Davide Magno

An Italian coding, tech, financial math professional and running lover

Head of Financial Risk Management

Dublin, Ireland