Class Sneer
Defined in File sneer.hpp
Inheritance Relationships
Base Type
public otyca::VolatilitySmile(Class VolatilitySmile)
Class Documentation
-
class Sneer : public otyca::VolatilitySmile
A one-dimensional 5-parameter volatility smile model with left and right “Sneer.”.
The Sneer model parameterizes implied volatility using two exponential wing functions: one for the left tail and one for the right tail. Each wing is controlled by slope, shift, and sharpness parameters.
Parameters:
slope_l: slope of the left wing.slope_r: slope of the right wing.shift: common horizontal offset of both wings.sharp: common transition sharpness/steepness of both wings.shift_u: vertical shift.
The evaluation formula for a strike-like input
kis:\[\begin{split} \begin{aligned} v_l(k) &= \text{slope}_l \cdot \frac{\log\!\bigl(1+\exp\bigl(-(k+\text{shift})\cdot \text{sharp}\bigr)\bigr)} {\text{sharp}},\\[6pt] v_r(k) &= \text{slope}_r \cdot \frac{\log\!\bigl(1+\exp\bigl((k-\text{shift})\cdot \text{sharp}\bigr)\bigr)} {\text{sharp}},\\[6pt] v(k) &= v_l(k) + v_r(k) + \text{shift}_u. \end{aligned} \end{split}\]The model enforces positivity of parameters via the
softplustransformation in calibration mode, and provides both raw and transformed accessors for parameters.Public Functions
-
inline Sneer(double t)
-
inline virtual std::vector<std::string> get_parameter_names() const override
Get the names of the model parameters.
Default implementation assigns names as “p1”, “p2”, etc.
- Returns:
A vector of parameter names.
-
virtual void set_transformed_calibration_parameters(const std::vector<double> &p) override
set the transformed parameters for calibration.
- Parameters:
transformed_calibration_parameters – the transformed calibration parameters
-
inline virtual void set_parameters(const std::vector<double> &p) override
Set the model’s raw parameters.
- Parameters:
parameters – A vector of new parameter values.
-
inline virtual std::vector<double> get_parameters() const override
Get the model’s raw parameters.
- Returns:
A vector containing the model’s parameters.
-
virtual std::vector<double> get_transformed_calibration_parameters() const override
get the transformed parameters for calibration.
- Returns:
the transformed parameters for calibration
-
inline virtual std::string name() const override
Get the model’s name.
- Returns:
A string representing the name of the model.
-
std::vector<double> evaluate(const std::vector<std::array<double, 1>> &x) const override
-
virtual std::vector<double> get_regularizer_penalties(const CalibrationInput &ci) const override
-
virtual void pre_calibration(const CalibrationInput &calibration_input) override