Pricing Equity Derivatives with Extensions of Black-Scholes
Overview
Algorithms to price American and European equity options, convertible bonds and a variety of other financial derivatives. It uses an extension of the usual Black-Scholes model in which jump to default may occur at a probability specified by a power-law link between stock price and hazard rate as found in the paper by Takahashi, Kobayashi, and Nakagawa (2001) doi:10.3905/jfi.2001.319302. We use ideas and techniques from Andersen and Buffum (2002) doi:10.2139/ssrn.355308 and Linetsky (2006) doi:10.1111/j.1467-9965.2006.00271.x.
Version 2.0.0 adds risk sensitivity ("greeks") calculations along with the supporting cache infrastructure that makes them efficient.
- New
find_greeks()computes delta, gamma, vega, rates DV01 and credit DV01 for grid-priced instruments. Delta and gamma are read directly from a single pricing grid, while vega, rates DV01 and credit DV01 come from central-difference "bumping" of the supplied term structure functions. Callers may request any subset of the greeks. - Instruments now provide
reset_caches(), andintegrate_pde()clears per-run instrument state automatically. A single instrument object can therefore be priced repeatedly (as in bump-and-reprice greeks) without recreating it. - Fixed the
futile.loggerlayout so that logger names no longer leak into formatted log messages.
From NEWS.md in the release
Install
Health
ERRORre-building of vignette outputsr-oldrel-macos-arm64, r-release-macos-arm64
r-oldrel-macos-arm64
Error(s) in re-building vignettes:
--- re-building ‘ragtop_convertibles_in_r.Rmd’ using rmarkdown
2026-10-24 13:48:30.101 R[52018:228121] XType: Using static font registry.
Quitting from ragtop_convertibles_in_r.Rmd:439-484 [twitter_cb_via_BondValuation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `if (index_LIPD >= 1) ...`:
! argument is of length zero
---
Backtrace:
▆
1. ├─base::tryCatch(...)
2. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
3. └─BondValuation::AnnivDates(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'ragtop_convertibles_in_r.Rmd' failed with diagnostics:
argument is of length zero
--- failed re-building ‘ragtop_convertibles_in_r.Rmd’
SUMMARY: processing the following file failed:
‘ragtop_convertibles_in_r.Rmd’
Error: Vignette re-building failed.
Execution haltedr-release-macos-arm64
Error(s) in re-building vignettes:
--- re-building ‘ragtop_convertibles_in_r.Rmd’ using rmarkdown
Quitting from ragtop_convertibles_in_r.Rmd:439-484 [twitter_cb_via_BondValuation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `if (index_LIPD >= 1) ...`:
! argument is of length zero
---
Backtrace:
▆
1. ├─base::tryCatch(...)
2. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
3. └─BondValuation::AnnivDates(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'ragtop_convertibles_in_r.Rmd' failed with diagnostics:
argument is of length zero
--- failed re-building ‘ragtop_convertibles_in_r.Rmd’
SUMMARY: processing the following file failed:
‘ragtop_convertibles_in_r.Rmd’
Error: Vignette re-building failed.
Execution haltedNOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: ragtop/tests/testthat/test_grid_solver.R (.Dim: 1) '.Dim' should be changed to 'dim'.
- ERROR6 OK, 5 NOTE, 2 ERRORNow
- ERROR11 OK, 2 ERROR2026-07-09
- OK13 OK2026-06-21
- ERROR11 OK, 3 ERROR2026-03-10
Documentation
- Help pages
- 65 (7 internal)includes a package overview page
- Examples that run
- 100%13 run in a plain check
- Exported functions with examples
- 22%
- Documented parameters
- 91%
- Return-value docs
- 59%
- Help pages citing references
- 0%
Downloads
Dependencies
Installing ragtop adds 4 packages (0 with compiled code, 147 KB of source tarballs). Heaviest: formatR 94 KB, lambda.r 25 KB, futile.logger 24 KB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 2.0.0Latest
- 1.3.1
- 1.2.12026-06-15 · diff ↗ ·
added 4 exports
check_discount_factor_fcn, check_survival_probability_fcn, check_variance_cumulation_fcn, warn_once_negative_default_intensity - RR 4.6.0 released · 2026-04-24
- unarchivedReturned to CRAN2025-07-10
- 1.2.02025-07-10 · diff ↗ ·
removed 2 exports
Quandl_df_fcn_UST, Quandl_df_fcn_UST_rawadded 2 exports
treasury_df, treasury_df_raw - archivedRemoved from CRAN2025-06-02requires archived package 'limSolve'
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 1.1.12020-03-03 · diff ↗
- 1.1.0
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2016-09-28
- Total releases
- 8 / 10 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5
- Bundled data
- 9.8 KB / 1 file
- Download size
- 158 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("ragtop")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.