pd_to_spread | R Documentation |
pd_to_spread
to calculate spread using the probability of default,
tenor and recovery rate.
pd_to_spread(
x,
recovery.var = "recovery",
currency.var = "currency",
tenor.var = "tenor",
date.var = "date",
pd.var = "pd"
)
x |
data frame, contains all the relevant columns. |
recovery.var |
character, column in x containing recovery rates. ISDA model standard recovery rate asscumption is 0.4. |
currency.var |
character, column in x containing currency. |
tenor.var |
character, column in x containing tenors. |
date.var |
character, column in x containing date variable. |
pd.var |
name of the column containing the probability of default in decimals. |
vector containing the spread values in basis points, calculated by inverting the formula for probability of default given in the Bloomberg Manual
spread_to_pd
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.