Description Usage Arguments Value Examples
check_inputs
checks whether a data frame's inputs are valid. It is a
minimum set of checks. Things such as recovery var are not checked,
because some functions don't need them as input.
1 2 3 4 | check_inputs(x, date.var = "date", currency.var = "currency",
maturity.var = "maturity", tenor.var = "tenor", spread.var = "spread",
coupon.var = "coupon", notional.var = "notional", notional = 1e+06,
recovery.var = "recovery", recovery = 0.4)
|
x |
data frame, contains all the relevant columns. |
date.var |
character, column in x containing date variable. |
currency.var |
character, column in x containing currency. |
maturity.var |
character, column in x containing maturity date. |
tenor.var |
character, column in x containing tenors. |
spread.var |
character, column in x containing spread in basis points. |
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. |
notional.var |
character, column in x containing the amount of the underlying asset on which the payments are based. |
notional |
numeric, the notional amount for all pricing if there isn't a notional.var |
recovery.var |
character, column in x containing recovery rates. ISDA model standard recovery rate asscumption is 0.4. |
recovery |
numeric, the recovery rate for all pricing if there isn't a recovery.var |
a data frame if not stopped by errors.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.