Skip to content

Commit

Permalink
readme fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
farzadwp committed Nov 28, 2019
1 parent 39743c3 commit 6fee375
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
12 changes: 6 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ interpolate_dfs(zc, ymd(20170331), ymd(20170630))
Basic support for creating and interpolating volatility surfaces is possible:

```{r}
vs <- build_vol_surface()
at <- tibble::tibble(
maturity = as.Date(c("2020-03-31", "2021-03-31")),
smile = c(0.40, 0.80)
)
interpolate(vs, at)
# vs <- build_vol_surface()
# at <- tibble::tibble(
# maturity = as.Date(c("2020-03-31", "2021-03-31")),
# smile = c(0.40, 0.80)
# )
# interpolate(vs, at)
```


Expand Down
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,26 +96,25 @@ plot(zc$pillar_times, zc$pillar_zeros, xlab = 'Years', ylab = 'Zero')

``` r
interpolate(zc, year_frac(zc$reference_date, ymd(20170331), "act/365"))
#> [1] 0.01858073
#> [1] 0.0187453
interpolate_zeros(zc, ymd(20170331))
#> <InterestRate> 1.858073%, CONTINUOUS, ACT/365
#> <InterestRate> 1.87453%, CONTINUOUS, ACT/365
interpolate_fwds(zc, ymd(20170331), ymd(20170630))
#> <InterestRate> 1.837645%, SIMPLE, ACT/365
#> <InterestRate> 1.837274%, SIMPLE, ACT/365
interpolate_dfs(zc, ymd(20170331), ymd(20170630))
#> <DiscountFactor> 0.995439369532595, 2017-03-31--2017-06-30
#> <DiscountFactor> 0.995440285935839, 2017-03-31--2017-06-30
```

Basic support for creating and interpolating volatility surfaces is
possible:

``` r
vs <- build_vol_surface()
at <- tibble::tibble(
maturity = as.Date(c("2020-03-31", "2021-03-31")),
smile = c(0.40, 0.80)
)
interpolate(vs, at)
#> [1] 0.6001969 0.6042421
# vs <- build_vol_surface()
# at <- tibble::tibble(
# maturity = as.Date(c("2020-03-31", "2021-03-31")),
# smile = c(0.40, 0.80)
# )
# interpolate(vs, at)
```

Further details can be found in this package’s help pages and vignettes
Expand Down
Binary file modified inst/README-unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6fee375

Please sign in to comment.