Class OptionStrike
Defined in File option_strike.hpp
Inheritance Relationships
Base Type
public std::enable_shared_from_this< OptionStrike >
Class Documentation
-
class OptionStrike : public std::enable_shared_from_this<OptionStrike>
Represents the call and put option with the same strike price within a given expiration.
Public Functions
Constructs an OptionStrike object.
- Parameters:
strike – The strike price of the option.
underlying_dataset – The underlying dataset associated with the option.
option_expiration – The expiration object associated with this strike.
-
std::shared_ptr<Option> create_option(OptionType type)
Creates an option of the specified type.
- Parameters:
type – The type of option (call or put).
- Returns:
A shared pointer to the created option.
-
inline double distance_to_forward(double forward) const
Computes the distance between the strike price and a given forward price.
- Parameters:
forward – The forward price.
- Returns:
The absolute difference between the strike and forward price.
-
double synthetic_forward() const
Computes the synthetic forward price.
- Returns:
The synthetic forward price.
-
double synthetic_forward_spread() const
Computes the synthetic forward spread.
- Returns:
The synthetic forward spread value.
-
double call_put_disparity() const
Computes the call-put parity disparity.
- Returns:
The disparity value.
-
inline boost::posix_time::ptime get_expiration() const
Gets the expiration that it belongs to.
- Returns:
The expiration.
-
inline double get_strike() const
Gets the strike price.
- Returns:
The strike price.
-
inline void set_strike(double strike)
Sets the strike price.
- Parameters:
strike – The new strike price.
-
inline bool finite_call_put_bid_ask_volatility() const
Checks if both call and put bid-ask volatilities are finite.
- Returns:
True if both call and put bid-ask volatilities are finite, false otherwise.
-
inline Estimate get_strike_volatility() const
Gets the strike volatility estimate.
- Returns:
The strike volatility estimate.
-
inline double get_strike_volatility_value() const
Gets the value of the strike volatility.
- Returns:
The strike volatility value.
-
inline double get_strike_volatility_uncertainty() const
Gets the uncertainty of the strike volatility.
- Returns:
The strike volatility uncertainty.
-
inline double get_average_volatility_value() const
Gets the value of the average volatility.
- Returns:
The average volatility value.
-
inline double get_average_volatility_uncertainty() const
Gets the uncertainty of the average volatility.
- Returns:
The average volatility uncertainty.
-
inline double get_fair_volatility() const
Gets the fair volatility.
- Returns:
The fair volatility value.
-
inline double get_stochastic_process_volatility() const
Gets stochastic process implied volatility.
- Returns:
The stochastic process implied volatility.
-
inline Estimate get_implied_forward() const
Gets the implied forward estimate.
- Returns:
The implied forward estimate.
-
inline double get_implied_forward_value() const
Returns the value of the implied forward price.
- Returns:
The implied forward price as a double.
-
inline double get_implied_forward_uncertainty() const
Returns the uncertainty of the implied forward price.
- Returns:
The uncertainty of the implied forward price as a double.
-
inline double get_standard_price_value() const
Returns the value of the standard price.
- Returns:
The standard price as a double.
-
inline double get_standard_price_uncertainty() const
Returns the uncertainty of the standard price.
- Returns:
The uncertainty of the standard price as a double.
-
inline std::vector<std::shared_ptr<Option>> get_options() const
Returns a vector of shared pointers to the call and put options.
- Returns:
A std::vector containing shared pointers to the call and put Option objects.
-
std::shared_ptr<Option> otm_option() const
Gets the out-of-the-money (OTM) option.
- Returns:
A shared pointer to the OTM option.
-
inline std::shared_ptr<Option> get_call() const
Gets the call option.
- Returns:
A shared pointer to the call option.
-
inline std::shared_ptr<Option> get_put() const
Gets the put option.
- Returns:
A shared pointer to the put option.
-
inline double get_log_relative_strike() const
Gets the logarithm of the relative strike.
- Returns:
The log-relative strike value.
-
inline double get_relative_strike() const
Gets the relative strike.
- Returns:
The relative strike value.
-
void setup()
-
inline std::vector<double> get_volatility_model_outputs()
Computes the implied forward price using the given option calculator which contains pricing information, e.g. underlying price, volatility, interest and borrow estimates, dividends, etc.
- Parameters:
oc – A shared pointer to an OptionCalculator used to perform the computation.
- Returns:
An Estimate representing the implied forward price.
-
inline bool bid_above_intrinsic(double underlying_price) const
Determines whether bid prices are above intrinsic values for the given underlying price.
- Parameters:
underlying_price – The underlying price.
- Returns:
True if both call and put bid prices exceed intrinsic values, false otherwise.
-
bool put_call_volatility_crossed() const
Checks if the put-call volatilities are crossed.
- Returns:
True if volatilities are crossed, false otherwise.
Friends
-
friend std::ostream &operator<<(std::ostream&, const OptionStrike&)
Overloaded stream insertion operator for OptionStrike.