Class ShiftedLognormal

Inheritance Relationships

Base Type

Class Documentation

class ShiftedLognormal : public otyca::Model<1>

A simple shifted lognormal model for option pricing.

This model applies a lognormal distribution with a fixed shift to evaluate option prices based on relative strikes. The model is parameterized by volatility, shift, and time to maturity.

Inherits from Model<1>, indicating a 1-parameter transformed parameterization interface.

Public Functions

inline ShiftedLognormal(double t)

Constructs the shifted lognormal model with a given time to maturity.

Default values:

  • Shift = 0.5

  • Volatility = 0.6

Parameters:

t – Time to maturity (in years).

inline virtual std::string name() const override

Returns the name of the model.

Returns:

A string representing the model name: “ShiftedLognormal”.

std::vector<double> evaluate(const std::vector<std::array<double, 1>> &relative_strikes) const override

Evaluates the model over a vector of relative strikes.

Parameters:

relative_strikes – A vector of relative strikes (e.g., strike/forward).

Returns:

A vector of evaluated values (e.g., implied volatilities or prices).

virtual void set_transformed_calibration_parameters(const std::vector<double> &transformed_parameters) override

Sets the model parameters from a transformed representation.

Parameters:

transformed_parameters – A vector containing transformed parameter values. Expected to contain 1 value (volatility) in transformed space.

virtual std::vector<double> get_transformed_calibration_parameters() const override

Gets the current model parameters in transformed representation.

Returns:

A vector containing transformed parameter values.