Articles by sang-heon lee

Numerical Calculation of FRN Duration in R

September 21, 2021 | sang-heon lee

The duration of a floating rate note (FRN) is the remaining time until the first next payment date. Using this fact, a duration of FRN has not been calculated explicitly but has been understood conceptually. Instead of this reasoning, this post trie...
[Read more...]

Machine Learning : Workflow

September 19, 2021 | sang-heon lee

This post gives a brief introduction to a workflow of machine learning model and mostly used R packages before diving into the details. Given a problem to be solved, all machine learning (ML) models use the same input but different output. It is, ...
[Read more...]

Bond Convexity in Excel and R

September 11, 2021 | sang-heon lee

Bond duration is the first order linear approximation and thus does not consider a non-linearity. Making up for this shortcoming of the duration, a convexity is needed to describe the non-linearity of a bond price. This post explains the meaning and c...
[Read more...]

Bond Modified Duration in R

September 3, 2021 | sang-heon lee

Bond duration is a basic building block for bond portfolio management and asset-liability management (ALM). This post explains the meaning of duration and calculation of this risk measures by using Excel and R. Instead of using another full-fledged ...
[Read more...]

Basic R : Read so many CSV files

September 2, 2021 | sang-heon lee

This post presents basic R code snippets to read files with given file extensions such as csv or txt. This is simple but very useful when it comes to the case where there are too many files to read manually. If we have too many (i.e. 1000 file...
[Read more...]

Pricing of FX Forward in R and Excel

August 8, 2021 | sang-heon lee

This post explains how to price a FX forward. We assume that 1) USD is the foreign currency and KRW the domestic one, 2) USD IRS zero curve and KRW FX implied zero curve are given. Before making a R code, we use Excel spreadsheet for the clear under...
[Read more...]

Delta Sensitivity of Interest Rate Swap

July 23, 2021 | sang-heon lee

This post explains how to calculate delta sensitivities or delta vector of interest rate swap, especially delta. delta can be calculated by either 1) zero delta or 2) market delta. To the best of our knowledge, FRTB can use these two methods but SIM...
[Read more...]

Interest Rate Swap Pricing using R code

July 10, 2021 | sang-heon lee

This post explains how to price an interest rate swap (IRS) using R code and Excel's illustrations. We use swap rates, zero curve data from Bloomberg. We consider 5-Year Libor 3M IRS without OIS discounting as an pre-crisis IRS example. Libor ...
[Read more...]
1 2 3 4

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)