Skip to main content

validate

Function validate 

fn validate(
    underlying: &SwaptionUnderlying,
    expiry: NaiveDate,
    strike: f64,
) -> Result<NaiveDate, SwaptionError>
Expand description

Rejects a strike that is not a finite number, and an expiry on or after the underlying’s last fixed payment.