as_SurvivalProbabilities: Coerce to InterestRate

Description Usage Arguments Examples

View source: R/credit-methods.R

Description

You can coerce objects to the SurvivalProbabilities class using this method.

Usage

1
2
3
4
as_SurvivalProbabilities(x, ...)

## S3 method for class 'ZeroHazardRate'
as_SurvivalProbabilities(x, d1, d2, ...)

Arguments

x

object to coerce

...

other parameters passed to methods

d1

a Date vector containing the as of date

d2

a Date vector containing the date to which the survival probability applies

Examples

1
2
3
4
5
6
7
8
curve_specs <- CDSMarkitSpec(
  rating = "AAA",
  region = "Japan",
  sector = "Utilities"
)
HR <- ZeroHazardRate(values = c(0.04, 0.05), compounding = c(2, 4),
day_basis = 'act/365', specs = curve_specs)
as_SurvivalProbabilities(HR, lubridate::ymd(20160202), lubridate::ymd(20160302))

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