[−][src]Struct options_common::OptionPosition
Fields
symbol: String
The symbol of the option itself.
underlying_symbol: String
The symbol of the instrument that the option is a derivative of.
option_type: OptionType
strike_price: Rational64
expiration_date: ExpirationDate
is_long: bool
unit_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 negative.
unit_ask_price: Option<Rational64>
The current ask price per contract in this position. If the position is long, this should be negative.
unit_delta: Option<NotNan<f64>>
The delta per contract in this position.
quantity: usize
The 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]
pub 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]
pub fn eq(&self, other: &OptionPosition) -> bool
[src]
pub 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>,