Class AutoStochasticProcessPricer
Defined in File auto_stochastic_process_pricer.hpp
Inheritance Relationships
Base Type
public otyca::StochasticProcessPricer
(Class StochasticProcessPricer)
Class Documentation
-
class AutoStochasticProcessPricer : public otyca::StochasticProcessPricer
A stochastic process pricer that automatically selects specialized pricers based on input.
This class extends StochasticProcessPricer and manages a collection of specialized pricers internally. It delegates pricing, derivative calculation, implied volatility computation, and PDF evaluation to the appropriate pricer for each case.
Public Functions
-
inline virtual std::string name()
Returns the name of the pricer.
- Returns:
A string identifying the class name.
-
virtual std::vector<std::vector<double>> price(const StochasticProcess *process, const std::vector<double> &tenors, const std::vector<std::vector<double>> &strikes, StrikeType strike_type = LOG_STRIKE) const
Prices the given stochastic process at specified maturities and strikes.
- Parameters:
process – The stochastic process to price.
tenors – Vector of tenors.
strikes – 2D vector of strike values.
strike_type – Type of strikes (e.g., log-strike).
- Returns:
A 2D vector of computed prices.
-
virtual std::vector<std::vector<std::vector<double>>> price_derivatives(const StochasticProcess *process, const std::vector<double> &tenors, const std::vector<std::vector<double>> &strikes, StrikeType strike_type = LOG_STRIKE) const
Computes derivatives of the prices with respect to strikes.
- Parameters:
process – The stochastic process to price.
tenors – Vector of tenors.
strikes – 2D vector of strike values.
strike_type – Type of strikes (e.g., log-strike).
- Returns:
A 3D vector where the third dimension holds different derivatives.
-
virtual std::vector<std::vector<double>> implied_volatility(const StochasticProcess *process, const std::vector<double> &tenors, const std::vector<std::vector<double>> &strikes, StrikeType strike_type = LOG_STRIKE, double tolerance = 1e-4) const
Computes implied volatilities corresponding to given strikes and maturities.
- Parameters:
process – The stochastic process to price.
tenors – Vector of tenors.
strikes – 2D vector of strike values.
strike_type – Type of strikes (e.g., log-strike).
tolerance – Numerical tolerance for implied volatility inversion.
- Returns:
A 2D vector of implied volatilities.
-
virtual std::vector<std::vector<double>> pdf(const StochasticProcess *process, const std::vector<double> &tenors, const std::vector<std::vector<double>> &strikes, StrikeType strike_type = LOG_STRIKE) const
Computes the probability density function (PDF) values at specified strikes and maturities.
- Parameters:
process – The stochastic process.
tenors – Vector of tenors.
strikes – 2D vector of strike values.
strike_type – Type of strikes (e.g., log-strike).
- Returns:
A 2D vector of PDF values.
-
inline virtual std::string name()