Closed tleitch closed 8 years ago
Looks great at a first glance. I may go over it a bit and re-indent a little here or there.
Congrats also on having become a git(hub) ninja :)
Thanks. I'm sure I have room for much improvement, but I have a base process to catch (most) of the stupid stuff.
I have someone who I've asked to develop a unit test for this and I'm waiting for a reply. I decided to commit now as it is a natural break for me and the unit test will be incremental.
By the way, on the indentation in C++, RStudio doesn't know what to do with the ".with" and just keeps indenting. I took them out by hand, but it just put it back.
Well RStudio is not the only editor. The real pros use external formatters and specification (and by the way Google also has one for R: rfmt) or common definitions for editors. I just use Emacs mode a little more informally ...
There are still a few warts that come up in testing:
* checking R code for possible problems ... NOTE
volDF2CubeK: warning in factor(tbl$Expiry, level = expLvl): partial
argument match of 'level' to 'levels'
volDF2CubeK: warning in factor(tbl$Tenor, level = tenorLvl): partial
argument match of 'level' to 'levels'
volDF2CubeK: no visible global function definition for ‘acast’
volDF2CubeK: no visible global function definition for ‘na.spline’
Undefined global functions or variables:
acast na.spline
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... WARNING
Undocumented code objects:
‘SabrSwaption’
Undocumented data sets:
‘tsQuotes’ ‘vcube’
All user-level objects in a package should have documentation entries.
See chapter ‘Writing R documentation files’ in the ‘Writing R Extensions’ manual.
* checking for code/documentation mismatches ... OK
I'll tackle those. I re-indented some, made some int <-> uint
comparison warnings go away etc pp. But all good -- nice PR. Thank you.
Some of these are close to this (now merged) PR. I open a new issue.
SABR swaption module for European swaption valuation using a volcube was added. In addition, a data set was added, called rqlib, with a representative market for a volcube and a rate curve and a Shiny app that reads the data, calculates the payer and receiver for either the European or Bermudan, and displays the results.
It generates values using swaptionvolcube1 vol calac and then Black76 swaption model for Europeans, but for continuity, it will also value Bermudan swaption using markovfunctional and the provided volcube information.