Struct options_common::OptionPosition [−][src]
Fields
symbol: StringThe symbol of the option itself.
underlying_symbol: StringThe symbol of the instrument that the option is a derivative of.
option_type: OptionTypestrike_price: Rational64expiration_date: ExpirationDateis_long: boolunit_cost: Option<Rational64>The original cost per contract in this position. If the position is long, this should be negative.
unit_bid_price: Option<Rational64>The current bid price per contract in this position. If the position is long, this should be positive.
unit_ask_price: Option<Rational64>The current ask price per contract in this position. If the position is long, this should be positive.
unit_delta: Option<NotNan<f64>>The delta per contract in this position.
quantity: usizeThe number of contracts in this position.
lot_size: Option<usize>The lot size per contract. Defaults to 100 if not defined.
Implementations
impl OptionPosition[src]
pub fn description(&self) -> String[src]
pub fn signed_quantity(&self) -> i64[src]
pub fn cost(&self) -> Option<Rational64>[src]
pub fn net_liq(&self) -> Option<Rational64>[src]
pub fn bid_price(&self) -> Option<Rational64>[src]
pub fn ask_price(&self) -> Option<Rational64>[src]
pub fn mid_price(&self) -> Option<Rational64>[src]
pub fn unit_mid_price(&self) -> Option<Rational64>[src]
pub fn delta(&self) -> Option<NotNan<f64>>[src]
pub fn profit_at_expiry(&self, underlying_price: Rational64) -> Rational64[src]
Trait Implementations
impl Clone for OptionPosition[src]
fn clone(&self) -> OptionPosition[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for OptionPosition[src]
impl Eq for OptionPosition[src]
impl PartialEq<OptionPosition> for OptionPosition[src]
fn eq(&self, other: &OptionPosition) -> bool[src]
fn ne(&self, other: &OptionPosition) -> bool[src]
impl StructuralEq for OptionPosition[src]
impl StructuralPartialEq for OptionPosition[src]
Auto Trait Implementations
impl RefUnwindSafe for OptionPosition[src]
impl Send for OptionPosition[src]
impl Sync for OptionPosition[src]
impl Unpin for OptionPosition[src]
impl UnwindSafe for OptionPosition[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub unsafe fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,