Skip to main content

weekly_bond_future_option_from_template

Function weekly_bond_future_option_from_template 

pub fn weekly_bond_future_option_from_template(
    code: &str,
    designated: NaiveDate,
    strike: f64,
    kind: OptionKind,
) -> Result<BondFutureOption, BondFutureOptionError>
Expand description

One long contract of the weekly option designated to expire on designated under the futures option template code, struck at strike per 100: its last trading day and the quarterly future it exercises into by FutureOptionTemplate::weekly, the rest as bond_future_option_from_template.

ยงErrors

BondFutureOptionError::Template for a code that names no futures option template, or a day the exchange lists no weekly for; BondFutureOptionError::Strike for a strike that is not finite.