2013/09/16

SABR calibration on Shiny

As you already know(if you often use R!!), Shiny allows us to create web applications in R easily. It doesn't require the knowledge of HTML, CSS, javascript, I mean, we don't need to write HTML, CSS and javascript directly to create web application.

The users of your web application can change the input parameters interactively via web applications. It will give a good opportunities to understand how the model works and it's limitation.

Systematic Investor's examples are very nice application in financial analysis, I was so excited when I saw it at first. I decided to create my own web application by shiny as a "mock" quant.

My appication is here(you can also get the source code of this application on Github):


It is a calibration of SABR model based on Hagan's approximation formula(Managing Smile Risk, P. Hagan et al(pdf)). In some derivative market, SABR model is de facto model, you can understand how much degree SABR model can fit market data(IV) and it's limit.

7 件のコメント:

  1. Just wanted to say thanks for posting, I hope you will continue in the future.
    I've been porting your R code into Matlab and I always enjoy the challenge :D

    返信削除
  2. Thank you for your comment. I hope that you usually use R instead of MATLAB :)

    返信削除
  3. Hi Teramonagi,
    The first time I saw R code was your "Pricing defaultable discount bond with reduced form model" code. I wanted to write it in MATLAB so I learnt R from that (it wasn't easy, took almost an entire weekend). I plan to start a github account soon, so you can see for yourself :)

    返信削除
  4. Hi Stefan,
    That's great!
    Let me know when you create your github account :)

    返信削除
  5. Hi Teramonagi,
    Finally read the Hagan paper, in it he suggests selecting beta as a constant "In particular, beta cannot be determined by fitting a market smile since this would clearly amount to "fitting the noise".
    Granted this paper was written was in 2002, so I was wondering whether in the market ppl. calibrate to beta ?

    返信削除
  6. Hi Stefan,

    I think that you are correct. This article related to this topic is also useful.
    (beta or rho should be fixed because of its redundancy)
    http://www.cs.utah.edu/~cxiong/Files/Docs/Changwei_Xiong_CalibrationSABR.pdf

    返信削除