Class Frown

Inheritance Relationships

Base Type

Class Documentation

class Frown : public otyca::VolatilitySmile

A one-dimensional Gaussian-shaped volatility smile model with 3 parameters.

The Frown model represents implied volatility as a bell-shaped (Gaussian-like) function centered at a specified point, with configurable height and width. Can be combined with other volatility smile models in a Composite Model to fit events caused bump in smile

Parameters:

  • level : amplitude of the frown (overall volatility scale).

  • width : width parameter controlling the spread of the frown.

  • center : horizontal location of the frown’s peak.

The evaluation formula for an input k is:

\[ w(k) = \text{level} \cdot \exp\!\left(-\frac{(k-\text{center})^2}{\text{width}}\right) \]

The model enforces positivity of level and width through the softplus transformation during calibration, while center remains unconstrained.

Public Functions

inline Frown(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 void pre_calibration(const CalibrationInput &calibration_input) override