View source: R/upfront_to_spread.R
upfront_to_spread | R Documentation |
upfront_to_spread
calculates conventional spread using the upfront
or ptsUpfront values.
upfront_to_spread(
x,
currency.var = "currency",
date.var = "date",
coupon.var = "coupon",
tenor.var = "tenor",
maturity.var = "maturity",
recovery.var = "recovery",
upfront.var = "upfront",
points.var = "ptsUpfront",
isPriceClean = FALSE,
notional = 1e+07,
payAccruedAtStart = FALSE,
payAccruedOnDefault = TRUE
)
x |
data frame, contains all the relevant columns. |
currency.var |
character, column in x containing currency. |
date.var |
character, column in x containing date variable. |
coupon.var |
character, column in x containing coupon rates in basis points. It specifies the payment amount from the protection buyer to the seller on an annual basis. |
tenor.var |
character, column in x containing tenors. |
maturity.var |
character, column in x containing maturity date. |
recovery.var |
character, column in x containing recovery rates. ISDA model standard recovery rate asscumption is 0.4. |
upfront.var |
is the character name of upfront column |
points.var |
character name of points Upfront column |
isPriceClean |
a boolean variable indicating whether the upfront is clean or dirty |
notional |
numeric variable indicating the notional value of the CDS contract |
payAccruedAtStart |
whether pay at start date the accrual amount |
payAccruedOnDefault |
whether pay in default scenario the accrual amount |
recovery |
numeric, the recovery rate for all pricing if there isn't a recovery.var |
a numeric indicating the spread.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.