CDSCurve: Builds a 'CDSCurve'

Description Usage Arguments Value See Also Examples

View source: R/credit-class.R

Description

This will allow you to create an instance of a CDS curve.

Usage

1
CDSCurve(reference_date, tenors, spreads, lgd, premium_frequency, specs)

Arguments

reference_date

the curve's reference date as a base::Date

tenors

a numeric vector of pillar points time steps expressed in years

spreads

a numeric vector of creadit default spreads expressed in decimals. Must be the same length as tenors

lgd

the loss given default associated with the curve as supplied by Markit and expressed as a decimal value

premium_frequency

represents the number of premiums payments per annum expressed as an integer. Must be one of 1, 2, 4 or 12.

specs

CDS curve specifications that inherits from CDSSpec()

Value

An object of type CDSCurve

See Also

Other CDS curve helpers: CDSMarkitSpec, CDSSingleNameSpec, CDSSpec, SurvivalProbabilities, ZeroHazardRate, is.CDSCurve, is.CDSSpec

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
curve_specs <- CDSMarkitSpec(
  rating = "AAA",
  region = "Japan",
  sector = "Utilities"
)

CDSCurve(
  as.Date("2019-06-29"),
  tenors = c(1, 3, 5, 7),
  spreads = c(0.0050, 0.0070, 0.0090, 0.0110),
  lgd = 0.6,
  premium_frequency = 4,
  specs = curve_specs
)

imanuelcostigan/fmbasics documentation built on Dec. 6, 2019, 9:48 a.m.