Enum options_common::Position [−][src]
pub enum Position { OptionsPosition(OptionsPosition), SharesPosition(SharesPosition), }
Variants
OptionsPosition(OptionsPosition)
Trait Implementations
Performs the conversion.
Performs the conversion.
For an option position, the symbol of the option itself. For a share position, equal to Self::underlying_symbol()
.
For an option position, the symbol of the instrument that the option is a derivative of. For a share position, the symbol of the stock.
The original cost per option contract or share in this position. If the position is long, this should be negative.
The current bid price per option contract or share in this position. If the position is long, this should be positive.
The current ask price per option contract or share in this position. If the position is long, this should be positive.
The delta per option contract or share in this position.
The vega per option contract or share in this position.
The theta per option contract in this position.
Equal to Self::quantity()
, but negative if the position is short.
The total original cost of all option contracts or shares in this position.
The total current bid price for all option contracts or shares in this position.
The total current ask price for all option contracts or shares in this position.
The total current mid price for all option contracts or shares in this position.
The current mid price per option contract or share in this position. If the position is long, this will be positive.
The total delta for all option contracts or shares in this position.
The total vega for all option contracts or shares in this position.
The total theta for all option contracts or shares in this position.
For an option position, the strike price of the option. For a share position, the strike price of the call option with the equivalent cost at the time of purchase i.e. $0.
For an option position, the type of the option. For a share position, equal to OptionType::Call
.
For an option position, the number of units of the underlying per option contract. For a share position, equal to 1.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Position
impl UnwindSafe for Position
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub unsafe fn to_subset_unchecked(&self) -> SS
pub unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V