Struct FutureOptionTemplate
pub struct FutureOptionTemplate {
pub name: String,
pub exchange: FuturesExchange,
pub underlying_root: &'static str,
pub currency: Currency,
pub premium_style: PremiumStyle,
pub exercise: ExerciseStyle,
pub point_value: f64,
pub tick: Option<f64>,
pub strike_interval: Option<f64>,
pub expiry_rule: OptionExpiryRule,
pub calendar_centers: &'static str,
pub source: &'static str,
}Expand description
The terms of one listed option on a bond future.
Fields§
§name: StringTemplate name (doubles as registry code), e.g. CBOT-OZN.
exchange: FuturesExchangeThe exchange the option and its future trade on.
underlying_root: &'static strThe root of the future the option exercises into, e.g. ZN.
currency: CurrencyThe currency premiums and margin settle in.
Futures-style or paid.
exercise: ExerciseStyleEuropean or American.
point_value: f64What one price point is worth per contract.
tick: Option<f64>The minimum price fluctuation, in price points; None where unsourced.
strike_interval: Option<f64>The listed strike interval, in price points; None where unsourced.
expiry_rule: OptionExpiryRuleHow an option month’s expiry is computed.
calendar_centers: &'static strCalendar expression the expiry is computed on.
source: &'static strThe document the row was taken from.
Implementations§
§impl FutureOptionTemplate
impl FutureOptionTemplate
pub fn underlying(
&self,
year: i32,
month: u32,
) -> Result<ListedFutureId, FutureOptionTemplateError>
pub fn underlying( &self, year: i32, month: u32, ) -> Result<ListedFutureId, FutureOptionTemplateError>
The future an option of year-month exercises into: the same month’s
for a quarterly month (March, June, September, December), the next
quarterly month’s for a serial one.
§Errors
FutureOptionTemplateError::Month for a year or month that names no
listed future.
pub fn expiry(
&self,
year: i32,
month: u32,
) -> Result<NaiveDate, FutureOptionTemplateError>
pub fn expiry( &self, year: i32, month: u32, ) -> Result<NaiveDate, FutureOptionTemplateError>
The last trading day of the option of year-month, by the
template’s rule on its calendar.
§Errors
FutureOptionTemplateError::HolidayExpiry where the rule lands on a
day that is not a business day and the source states no rule for it;
FutureOptionTemplateError::Month for a month outside 1–12.
§impl FutureOptionTemplate
impl FutureOptionTemplate
pub fn weekly(
&self,
designated: NaiveDate,
) -> Result<(NaiveDate, ListedFutureId), FutureOptionTemplateError>
pub fn weekly( &self, designated: NaiveDate, ) -> Result<(NaiveDate, ListedFutureId), FutureOptionTemplateError>
The last trading day of the weekly option designated to expire on
designated, and the quarterly future it exercises into (CBOT
xxA01.D.3–7 and xxA01.I.2–6).
§Errors
FutureOptionTemplateError::Weekly for a template whose exchange’s
weeklies are not drafted, a weekend, a Monday to Thursday holiday, or a
day another option of the contract trades last on;
FutureOptionTemplateError::HolidayExpiry where the quarterly option
that decides the future lands on a holiday.
Trait Implementations§
§impl Clone for FutureOptionTemplate
impl Clone for FutureOptionTemplate
§fn clone(&self) -> FutureOptionTemplate
fn clone(&self) -> FutureOptionTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more