check_discount_factor_fcn: Check that a discount factor function is internally...

View source: R/checkinputs.R

check_discount_factor_fcnR Documentation

Check that a discount factor function is internally consistent

Description

Ensure discount factor function satisfies the time-reversal identity

df(t,T) = 1/df(T,t)

. Emits a warning, whenever that identity is violated, returns TRUE if no problems are found.

Usage

check_discount_factor_fcn(discount_factor_fcn, time_pts, tolerance = 1e-06)

Arguments

discount_factor_fcn

A function for computing present values, with arguments T, t, returning the discount factor from time T back to time t

time_pts

A vector of time points at which to test the consistency of discount_factor_fcn

tolerance

Relative tolerance within which the reversal identity is considered to hold

Details

Discount factors that have underflowed to zero or overflowed to infinity carry no usable information about the reversed factor, so such pairs are silently ignored rather than flagged.

Value

TRUE if the discount factor function appears consistent at every tested pair, otherwise FALSE

See Also

Other Input Checking: check_survival_probability_fcn(), check_variance_cumulation_fcn(), warn_once_negative_default_intensity()


ragtop documentation built on June 20, 2026, 5:06 p.m.