Learn R Programming

creditr (version 0.6.1)

pd_to_spread: Calculate spread with Default Probability

Description

pd_to_spread to calculate spread using the probability of default, tenor and recovery rate.

Usage

pd_to_spread(x, recovery.var = "recovery", currency.var = "currency", tenor.var = "tenor", date.var = "date", pd.var = "pd")

Arguments

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.

Value

vector containing the spread values in basis points, calculated by inverting the formula for probability of default given in the Bloomberg Manual

See Also

spread_to_pd