Nothing
context("Test spread_to_pd")
test_that("spread_to_pd.test.R", {
## test case from Bloomberg screenshots of Chorus
data <- data.frame(date = as.Date("2014-04-15"),
tenor = 5,
recovery = 0.4,
spread = 243.2800,
currency = "USD")
truth <- 0.1915
result <- spread_to_pd(data)
## currently the test case cannot be matched for 100%, so we need rounding
## here
stopifnot(all.equal(round(result, 3), round(truth, 3)))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.