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

Implement volatility surface functionality #24

Merged
merged 61 commits into from
Sep 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
98e590d
Create testing_debug.R
May 13, 2019
5848b11
VolSurface class and method
May 13, 2019
57c6869
vol surface unit testing implemented
May 14, 2019
fccd9f6
removing extra script
May 14, 2019
02f7a49
updated the zero curve to match the correct version
May 16, 2019
6e47935
package checks and ready for pull request
Jul 2, 2019
308c5dd
package checks
Jul 12, 2019
de57851
The package checks after Imanuel comments
Jul 23, 2019
2a46906
added the print fct and example for VolSurface interpolation
Jul 26, 2019
57fe572
included the comments in v0.4.0 milestone. package checked for PR
Aug 8, 2019
f5d951d
Removing a conflict
Aug 8, 2019
5c9efe4
Documentation typo
Aug 8, 2019
6af6bf1
Merge pull request #19 from sefhamada/sfi_validation_related
imanuelcostigan Aug 17, 2019
65c6359
Tidy DESCRIPTION
imanuelcostigan Aug 17, 2019
4891169
Move interpolate code to separate file
imanuelcostigan Aug 17, 2019
18ba37f
Update vol-surface-class.R
imanuelcostigan Aug 17, 2019
5dd4e5f
Move interpolation code to interpolation file
imanuelcostigan Aug 17, 2019
44f649b
Tidy up VolSurface documentation
imanuelcostigan Aug 17, 2019
aa83ea1
Code style changes
imanuelcostigan Aug 17, 2019
73b9eb6
Don't store interpolation method in VolSurface
imanuelcostigan Aug 17, 2019
be869a0
Improve VolSurface validator
imanuelcostigan Aug 17, 2019
2307c26
Clean up VolQuotes documentation
imanuelcostigan Aug 17, 2019
372ffdd
Put type argument at the end
imanuelcostigan Aug 17, 2019
8ddb0e9
Remove unnecessary code
imanuelcostigan Aug 18, 2019
7f2e109
Fix order of call
imanuelcostigan Aug 18, 2019
c067b8d
Use new_tibble()
imanuelcostigan Aug 18, 2019
abfcdfc
Make VolQuotes an extension of tibble
imanuelcostigan Aug 18, 2019
11aca84
roxygenise
imanuelcostigan Aug 18, 2019
c0c46af
Document what happens to "type"
imanuelcostigan Aug 18, 2019
b398cfd
interpolate.VolSurface() interface change
imanuelcostigan Aug 18, 2019
4ce6a78
Use pipe
imanuelcostigan Aug 20, 2019
3f2c6f9
No pipes
imanuelcostigan Aug 20, 2019
b4e9366
Refactor VolQuotes class
imanuelcostigan Aug 20, 2019
0e15f89
Refactor build_vol_quotes()
imanuelcostigan Aug 20, 2019
a07d63c
Update VolQuotes docs
imanuelcostigan Aug 20, 2019
358ec01
roxygenise
imanuelcostigan Aug 20, 2019
cfd6058
Use assertthat::is.date()
imanuelcostigan Aug 20, 2019
9880252
VolQuotes acquires a ticker argument
imanuelcostigan Aug 20, 2019
a238a9c
Begin to remove reference_date and ticker
imanuelcostigan Aug 20, 2019
c5b8cc3
Divide the right field by 100
imanuelcostigan Sep 7, 2019
e11cf6d
VolQuotes values - decimals
imanuelcostigan Sep 7, 2019
02b4c98
roxy
imanuelcostigan Sep 7, 2019
fc404f1
Fix vol surface test cases
imanuelcostigan Sep 7, 2019
3e94e46
Don't use deprecated tibble function
imanuelcostigan Sep 7, 2019
5971cdc
Confirm to new_tibble() interface
imanuelcostigan Sep 7, 2019
a26b674
Add argument to function call in eg
imanuelcostigan Sep 7, 2019
93650e4
Don't export linear_cubic_interp()
imanuelcostigan Sep 7, 2019
6fdb2b0
Fix example
imanuelcostigan Sep 7, 2019
ab55794
Remove example from unexported function
imanuelcostigan Sep 7, 2019
2d92077
interpolate() should use maturity
imanuelcostigan Sep 7, 2019
7eb992c
Improve VolSurface() documentation
imanuelcostigan Sep 7, 2019
0a3a9b2
roxy
imanuelcostigan Sep 7, 2019
b51b23a
Update NEWS
imanuelcostigan Sep 7, 2019
2bd66f7
Move code
imanuelcostigan Sep 7, 2019
5c4a1b5
roxy
imanuelcostigan Sep 7, 2019
37fe2d1
Sharpen doc
imanuelcostigan Sep 7, 2019
2f7cee6
Update NEWS
imanuelcostigan Sep 7, 2019
e8c117e
Add Sayf to DESCRIPTION
imanuelcostigan Sep 7, 2019
dfd9e9c
Rebuild README
imanuelcostigan Sep 7, 2019
0585718
Tidy badge block in README
imanuelcostigan Sep 7, 2019
c41b983
pkgdown::build_site()
imanuelcostigan Sep 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix example
  • Loading branch information
imanuelcostigan committed Sep 7, 2019
commit 6fdb2b0e031be43100a4a09da1d341b3c6c5b48c
15 changes: 9 additions & 6 deletions R/interpolation-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,17 @@ interpolate_dfs.ZeroCurve <- function(x, from, to, ...) {
#' @param interp_data `data.frame` object with three vectors x, y and z
#' @param x0 numeric vector containing the points at which to perform the interpolation along the first dimension
#' @param y0 numeric vector containing the points at which to perform the interpolation along the second dimension
#' @examples vols <- build_vol_quotes()
#' interp_data <- tibble::tibble(x = fmdates::year_frac(vols$reference_date,
#' as.Date(vols$maturity,"%Y%m%d"), "act/365"),
#' y = vols$smile,
#' z = vols$value)
#' @examples
#' vols <- build_vol_quotes()
#' interp_data <- tibble::tibble(
#' x = fmdates::year_frac(attr(vols, "reference_date"),
#' as.Date(vols$maturity,"%Y%m%d"), "act/365"),
#' y = vols$smile,
#' z = vols$value
#' )
#' x0 <- c(2.5, 3.5)
#' y0 <- c(22, 55)
#' linear_cubic_interp(interp_data = interp_data, x0 = x0, y0 = y0)
#' linear_cubic_interp(interp_data, x0 = x0, y0 = y0)
#' @keywords internal

linear_cubic_interp <- function(interp_data, x0, y0) {
Expand Down
12 changes: 7 additions & 5 deletions man/linear_cubic_interp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.