Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SABR swaption #60

Merged
merged 18 commits into from Jul 23, 2016
Merged

SABR swaption #60

merged 18 commits into from Jul 23, 2016

Conversation

@tleitch
Copy link
Contributor

@tleitch tleitch commented Jul 21, 2016

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.

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Jul 21, 2016

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 :)

@tleitch
Copy link
Contributor Author

@tleitch tleitch commented Jul 21, 2016

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.

@tleitch
Copy link
Contributor Author

@tleitch tleitch commented Jul 21, 2016

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.

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Jul 23, 2016

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 ...

@eddelbuettel eddelbuettel reopened this Jul 23, 2016
@eddelbuettel eddelbuettel merged commit 14ba091 into eddelbuettel:master Jul 23, 2016
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@@ -0,0 +1 @@
# cftc

This comment has been minimized.

@eddelbuettel

eddelbuettel Jul 23, 2016
Owner

Did you mean to expand this?

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Jul 23, 2016

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.

eddelbuettel added a commit that referenced this pull request Jul 23, 2016
- some reindentation / whitespace fixes in R and C++
- suppress a few compiler warnings
- fill in ChangeLog
- update exports
- correct shiny file modes to 00644
@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Jul 23, 2016

Some of these are close to this (now merged) PR. I open a new issue.

@eddelbuettel eddelbuettel mentioned this pull request Jul 23, 2016
@eddelbuettel eddelbuettel mentioned this pull request Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.