Category Archives: Conference Talks

Monte Carlo simulation of a 2-factor interest rates model with ESGtoolkit

The whole post can be found here on RPubs, as (according to me !) this website provides a nice display for R code, figures and LaTeX formulas. Plus, you can publish directly on Rpubs, simply by using Markdown within RStudio.

Concerning the post content, it’s worth saying that there also a numerical integration error, induced by the calculation of discount factors.

For more ressources on ESGtoolkit, you can read these slides of a talk that I gave last month at Institut de Sciences Financières et d’Assurances (Université Lyon 1), and the package vignette.

Please, cite the package whenever you use it, according to citation(“ESGtoolkit”). And do not hesitate to report bugs or send features request 😉

simG2plus

3 Comments

Filed under Conference Talks, R stuff

Rmetrics Workshop on R in Finance and Insurance, Paris 2014

Here are the slides of the talk that I gave yesterday with Prof. Frédéric Planchet at the 8th Rmetrics workshop in Insurance and Finance :

 

http://www.ressources-actuarielles.net/C1256F13006585B2/0/39B54166464089AFC12572B0003D88C2/$FILE/Rmetrics.pdf?OpenElement

 

Image

The R codes can found here :

  • For ESG

http://www.ressources-actuarielles.net/EXT/ISFA/fp-isfa.nsf/34a14c286dfb0903c1256ffd00502d73/a5e99e9abf5d3674c125772f00600f6c/$FILE/examplesESG.R

  • For ESGtoolkit

http://www.ressources-actuarielles.net/EXT/ISFA/fp-isfa.nsf/34a14c286dfb0903c1256ffd00502d73/a5e99e9abf5d3674c125772f00600f6c/$FILE/examplesESGtoolkit.R

I also submitted (a bit late, maybe) a Shiny app for the  Shiny App contest (which is the example @ page 55 of the slides).

https://contest.shinyapps.io/ShinyALMapp/

The username is : contest.

The password : rmetrics.

However, in my opinion, my app is veerry slow. This is due to the way that I dealt with global/local variables. In the first section,  ‘Simulation’, I make projections of the portfolio assets, let’s call the associated R variables : S.CAC and S.SP. In server.R, the plot is obtained with  output$plotSimulation. In the second section, ‘Portfolio’, I had to duplicate the code for the simulation (veerry annoying… here’s the bottleneck), because S.CAC and S.SP could’nt be seen in the scope of output$plotPortfolio defined in server.R.

I didn’t have the time to investigate more by now. But If somebody knows how to deal with this in Shiny, I’ll be happy to hear !

Leave a comment

Filed under Conference Talks, R stuff