| warn_once_negative_default_intensity | R Documentation |
The default intensity (hazard rate) must be nonnegative. A solver
such as integrate_pde calls the intensity function many
times, on various stock-price grids and at various times, so a naive
check would emit a flood of redundant warnings. This routine returns
a function that behaves exactly like default_intensity_fcn but
latches a flag in its enclosing environment so that, across all of its
invocations, at most one warning about negative intensities is
emitted in the usual futile.logger manner.
warn_once_negative_default_intensity(default_intensity_fcn)
default_intensity_fcn |
A function for computing default
intensity, with arguments |
Create a fresh wrapper for each top-level pricing call so that the "already warned" state is scoped to that call and resets on the next.
A function with the same interface as
default_intensity_fcn that warns at most once about negative
default intensities
Other Input Checking:
check_discount_factor_fcn(),
check_survival_probability_fcn(),
check_variance_cumulation_fcn()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.