Class Smile

Inheritance Relationships

Base Type

Class Documentation

class Smile : public otyca::VolatilitySmile

A one-dimensional 2-parameter volatility smile.

The Smile 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 a slope parameter.

Parameters:

  • slope : common slope of the both wings.

  • shift_u : vertical shift.

The evaluation formula for a strike-like input k is:

\[\begin{split} \begin{aligned} v_l(k) &= \text{slope} \cdot \log\!\bigl(1+\exp\bigl(-k\bigr)\bigr),\\[6pt] v_r(k) &= \text{slope} \cdot \log\!\bigl(1+\exp\bigl(k\bigr)\bigr),\\[6pt] v(k) &= v_l(k) + v_r(k) + \text{shift}_u. \end{aligned} \end{split}\]

The model enforces positivity of parameters via the softplus transformation in calibration mode, and provides both raw and transformed accessors for parameters.

Public Functions

inline Smile(double t)
void reset()
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