Calculate Upfront Payments

Share:

Description

spread_to_upfront takes a dataframe of variables on CDSs to return a vector of upfront values. Note that all CDS in the data frame must be denominated in the same currency.

Usage

1
2
3
4
spread_to_upfront(x, currency.var = "currency", notional = 1e+07,
  date.var = "date", spread.var = "spread", coupon.var = "coupon",
  tenor.var = "tenor", maturity.var = "maturity",
  recovery.var = "recovery", isPriceClean = FALSE)

Arguments

x

data frame, contains all the relevant columns.

currency.var

character, column in x containing currency.

notional

is the amount of the underlying asset on which the payments are based. Default is 10000000, i.e. 10MM.

date.var

character, column in x containing date variable.

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.

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.

isPriceClean

refers to the type of upfront calculated. It is boolean. When TRUE, calculate principal only. When FALSE, calculate principal + accrual.

Value

vector of upfront values (with accrual) in the same order