Python API

Our Python API is a direct exposure of the C++ API to Python. Implicit conversions are supported between C++ standard containers and their Python counterparts. For example, C++ std::map is automatically converted to and from Python dictionaries, while std::vector is converted to and from Python lists. Additionally, conversions are supported between C++ boost::posix_time::ptime and Python’s datetime.datetime, as well as between C++ boost::gregorian::date and Python’s datetime.date, among others.

class otyca_cpp.AlphaStable

Bases: TimeChangeProcess

Represents an Alpha-Stable time change process.

property alpha

Stability parameter (0 < alpha <= 2)

class otyca_cpp.AutoStochasticProcessPricer

Bases: 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.

class otyca_cpp.BimodalGaussian

Bases: StochasticProcess

A stochastic jump process exhibiting bimodal behavior with a mean and a standard deviation parameter. The BimodalGaussian jump process can be used to model events, e.g. stock earning announcements. The model is parameterized by: mu: the mean of the jump sigma: the standard deviation of the jump

property mu

Mean of the Gaussian distribution.

property sigma

Standard deviation of the Gaussian distribution.

class otyca_cpp.BimodalGaussianBoundedSchedule

Bases: instance

A schedule that maps bounded time intervals to values of type T. The type of T is BimodalGaussian.

add_centered_on((BimodalGaussianBoundedSchedule)arg1, (object)arg2, (int)arg3, (BimodalGaussian)arg4) bool :

Adds an entry to the schedule using a center reference time and a symmetric business-day window.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time.nbusiness_days : intn The number of business days before and after the reference time.nvalue : const T &n The value associated with the time range.nnReturnsn——-nbooln True if the insertion was successful, false otherwise.n

add_with_bounds((BimodalGaussianBoundedSchedule)arg1, (object)arg2, (BimodalGaussian)arg3) bool :

Adds an entry to the schedule using an explicit start and end time.nnParametersn———-nbounds : const std::pair<boost::posix_time::ptime, boost::posix_time::ptime> &n A pair representing the start and end time of the entry.nvalue : const T &n The value associated with the time range.nnReturnsn——-nbooln True if the insertion was successful, false otherwise.n

size((BimodalGaussianBoundedSchedule)arg1) int
to_dict((BimodalGaussianBoundedSchedule)arg1) object :

Converts the object to a map.nnReturnsn——-nstd::map<std::pair<boost::posix_time::ptime, boost::posix_time::ptime>, T>n A std::map mapping pairs of boost::posix_time::ptime to values of type T. Each key is a (start_time, end_time) pair associated with a corresponding value.n

class otyca_cpp.BrownianMotion

Bases: LevyProcess

Standard Brownian motion process. Represents a continuous-time stochastic process with independent, normally distributed increments. Inherits from the LevyProcess base class.

property sigma

diffusion volatility

class otyca_cpp.CGMY

Bases: LevyProcess

Represents the CGMY stochastic process model. The CGMY process is a pure-jump Lévy process widely used in financial modeling, particularly for capturing asset returns with jumps and heavy tails. It is characterized by four parameters: C: Activity level of small jumps G: Decay rate of positive jumps M: Decay rate of negative jumps Y: Tail heaviness (or jump intensity) parameter The CGMY process generalizes several well-known models, including the Variance Gamma process (when Y=0) and the stable process (when Y∈(0,2) and C is constant). This class provides methods for evaluating process characteristics, simulating paths, and computing relevant quantities for applications such as option pricing and risk management. The process reduces to a Brownian motion in the appropriate parameter limits. "Carr, P., Geman, H., Madan, D.B., and Yor, M. The Fine Structure of Asset Returns: An Empirical Investigation, Journal of Business, 2002" for more detailed background.

property c

c parameter of CGMY model

property g

g parameter of CGMY model

property m

m parameter of CGMY model

property y

y parameter of CGMY model

class otyca_cpp.CIR

Bases: LCIR

Represents a CIR (Cox-Ingersoll-Ross) process. The CIR class models a Cox-Ingersoll-Ross (CIR) process

class otyca_cpp.Chuckle

Bases: VolatilitySmile

A one-dimensional 6-parameter volatility smile model. The Chuckle model parameterizes implied volatility using two exponential wing functions and a vertical shift: 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_l : horizontal offset of the left wing. shift_r : horizontal offset of the right wing. sharp : common transition sharpness/steepness of both wings. shift_u : vertical shift. The evaluation formula for a strike-like input k is: [ begin{aligned} v_l(k) &= text{slope}_l cdot frac{log!bigl(1+expbigl(-(k+text{shift}_l)cdot text{sharp}bigr)bigr)} {text{sharp}},\[6pt] v_r(k) &= text{slope}_r cdot frac{log!bigl(1+expbigl((k-text{shift}_r)cdot text{sharp}bigr)bigr)} {text{sharp}},\[6pt] v(k) &= v_l(k) + v_r(k) + text{shift}_u. end{aligned} ]

class otyca_cpp.ClaimFourierTransform

Bases: FourierTransform

Fourier transform of call put or covered call.

class otyca_cpp.CompositeLevyProcess

Bases: LevyProcess

A Levy process composed of multiple LevyProcess components. This class aggregates several LevyProcess instances and combines their characteristic exponents, parameters, and derivatives. The characteristic exponent of the composite process is the sum of the characteristic exponents of its components.

add_component((CompositeLevyProcess)arg1, (LevyProcess)arg2) None :

Add a Levy process component to the composite.nnParametersn———-ncomponent : std::shared_ptr<LevyProcess>n Shared pointer to a LevyProcess to be added.

get_levy_components((CompositeLevyProcess)arg1) object :

Get a const reference to the internal list of Levy process components.nnReturnsn——-nconst std::vector<std::shared_ptr<LevyProcess>> &n Vector of shared pointers to LevyProcess.n

class otyca_cpp.CompositeStochasticProcess

Bases: StochasticProcess

A composite stochastic process combining multiple StochasticProcess components. This class represents a collection of stochastic processes, allowing the user to build complex models by combining simpler components. Each component can contribute to the overall characteristic function and its derivatives.

add_component((CompositeStochasticProcess)arg1, (StochasticProcess)arg2) None :

Add a component process to the composite.nnParametersn———-ncomponent : std::shared_ptr<StochasticProcess>n Shared pointer to a StochasticProcess instance.

get_components((CompositeStochasticProcess)arg1) object :

Get all components in this composite process.nnReturnsn——-nstd::vector<std::shared_ptr<StochasticProcess>>n Vector of shared pointers to the component processes.n

class otyca_cpp.CompositeStochasticProcessConfig

Bases: instance

Configuration parameters for a composite stochastic process calibration.

property max_n_event

Maximum number of events (e.g., jumps) allowed in the process.

property max_tenor

Maximum tenor (time to maturity) over which the process is applied.

property min_tenor

Minimum tenor (time to maturity) over which the process is applied.

property specification

Specification string of the process. See CompositeStochasticProcessFactory.

class otyca_cpp.CompositeStochasticProcessFactory

Bases: instance

Factory class for creating composite stochastic processes from string specifications. This factory provides a static method to create complex time-changed Lévy processes based on a textual specification. Each term in the specification corresponds to a stochastic process, and multiple processes can be combined using the + operator. Example specification: "lcir(mt+bm) + lcir(cgmy) + kou" This creates a composite process consisting of: An LCIR time-changed Merton plus BrownianMotion process. An LCIR time-changed CGMY process. A Kou process.

create_composite_stochastic_process((str)arg1) CompositeStochasticProcess :

Create a CompositeStochasticProcess from a string specification.nnParametersn———-nspecification : const std::string &n A textual specification describing the composite process. The format follows a functional expression with nested components, such as "lcir(mt+bm)+kou".nnReturnsn——-nstd::shared_ptr<CompositeStochasticProcess>n A shared pointer to the constructed CompositeStochasticProcess.n

class otyca_cpp.CubicSpline

Bases: VolatilitySmile

A one-dimensional spline model with lazy recalculation support. Inherits from Model to provide a generic modeling interface and privately from Scatter to reuse scattered data functionality.

add_knot((CubicSpline)arg1, (float)arg2, (float)arg3) bool :

Adds a new knot (x, y) to the spline.nnParametersn———-nx : doublen The x-coordinate of the knot.ny : doublen The y-coordinate of the knot.nnReturnsn——-nbooln true if the knot was added successfully.n

class otyca_cpp.DirectIntegrationPricer

Bases: StochasticProcessPricer

Option pricer using direct integration in the Fourier domain. This class implements a numerically efficient option pricing technique based on Fourier inversion, as proposed by Kilin (2007) and Attari (2004). It computes option prices, derivatives, implied volatilities, and PDFs using the characteristic function of a given stochastic process.

class otyca_cpp.Dividend

Bases: instance

Represents a dividend with both fixed and proportional components. The Dividend class models a dividend with a fixed amount and a proportional yield. It supports common arithmetic operations, equality checks, and formatting for output.

get_fixed((Dividend)arg1) float :

Gets the fixed component of the dividend.nnReturnsn——-ndoublen The fixed component of the dividend.n

get_proportional((Dividend)arg1) float :

Gets the proportional component of the dividend.nnReturnsn——-ndoublen The proportional component of the dividend.n

set_fixed((Dividend)arg1, (float)arg2) None :

Sets the fixed component of the dividend.nnParametersn———-nfixed : doublen The fixed component to set.

set_proportional((Dividend)arg1, (float)arg2) None :

Sets the proportional component of the dividend.nnParametersn———-nproportional : doublen The proportional component to set.

class otyca_cpp.DividendBoundedSchedule

Bases: instance

A schedule that maps bounded time intervals to values of type T. The type of T is Dividend.

add_centered_on((DividendBoundedSchedule)arg1, (object)arg2, (int)arg3, (Dividend)arg4) bool :

Adds an entry to the schedule using a center reference time and a symmetric business-day window.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time.nbusiness_days : intn The number of business days before and after the reference time.nvalue : const T &n The value associated with the time range.nnReturnsn——-nbooln True if the insertion was successful, false otherwise.n

add_with_bounds((DividendBoundedSchedule)arg1, (object)arg2, (Dividend)arg3) bool :

Adds an entry to the schedule using an explicit start and end time.nnParametersn———-nbounds : const std::pair<boost::posix_time::ptime, boost::posix_time::ptime> &n A pair representing the start and end time of the entry.nvalue : const T &n The value associated with the time range.nnReturnsn——-nbooln True if the insertion was successful, false otherwise.n

size((DividendBoundedSchedule)arg1) int
to_dict((DividendBoundedSchedule)arg1) object :

Converts the object to a map.nnReturnsn——-nstd::map<std::pair<boost::posix_time::ptime, boost::posix_time::ptime>, T>n A std::map mapping pairs of boost::posix_time::ptime to values of type T. Each key is a (start_time, end_time) pair associated with a corresponding value.n

class otyca_cpp.DividendFlexibleSchedule

Bases: TimeDeltaDividendSchedule

A schedule that associates a value with a flexible time duration. This class extends Schedule and allows each value to be associated with a time duration, offering the ability to convert into a BoundedSchedule where each entry is bounded by its duration. The type of T is Dividend.

to_bounded_schedule((DividendFlexibleSchedule)arg1) DividendBoundedSchedule :

Converts the flexible schedule into a bounded schedule. Each entry in the flexible schedule is transformed into a bounded range by subtracting and adding the duration from the key, forming an interval.nnReturnsn——-nstd::shared_ptr<BoundedSchedule<T>>n A shared pointer to the resulting BoundedSchedule .n

class otyca_cpp.DividendScatter

Bases: instance

A container for managing scattered data points with unique numeric keys. The Scatter class is a specialized map that provides additional functionalities such as adding points, retrieving values, computing minimum spacing, and summing values. The type of T is Dividend.

add((DividendScatter)arg1, (float)arg2, (Dividend)arg3) bool :

Adds a data point to the scatter collection.nnParametersn———-nx : doublen The x-coordinate.ny : const T &n The y-coordinate.nnReturnsn——-nbooln true if the point was inserted, false if it already exists.n

class otyca_cpp.DividendSchedule

Bases: instance

A template class that represents a schedule with time points as keys. This class stores values of type T, indexed by time, and provides methods to add, generate, accumulate, extrapolate, and scatter values. The type of T is Dividend.

add((DividendSchedule)arg1, (object)arg2, (Dividend)arg3) bool :

Add a value at a specific time point.nnParametersn———-nt : const boost::posix_time::ptime &n The time point at which the value is added.nv : const T &n The value to be added.nnReturnsn——-nbooln True if the value was added successfully, false otherwise.n

extrapolate((DividendSchedule)arg1, (object)arg2) None :

Extrapolate values to a specified end time using a given gap.nnParametersn———-nend : const boost::posix_time::ptime &n The end time to extrapolate to.ngap : const boost::posix_time::time_duration &n The time gap between each extrapolated value.nvalue : const T &n The value to be assigned to the extrapolated time points.

scatter((DividendSchedule)arg1, (object)arg2, (TenorCalculator)arg3, (DividendScatter)arg4) None :

Scatter values based on a reference time using a tenor calculator. This method calculates the tenor between the reference time and each time point, adding the corresponding value to the output scatter.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time used to calculate tenor.nf : const TenorCalculator *n The tenor calculator.nout : Scatter<T> &n The scatter object where the results are stored.

size((DividendSchedule)arg1) int
to_dict((DividendSchedule)arg1) object :

Convert the schedule to a regular map.nnReturnsn——-nstd::map<boost::posix_time::ptime, T>n A map with time points as keys and values of type T.n

class otyca_cpp.DividendTable

Bases: DividendScatter

A class representing a table of Dividends indexed by time to Dividend, inheriting from Scatter . The DividendTable class is used to handle and process dividend data in pricing. It supports functions for calculating fixed present value, yields, adapting to given time grid, and checking equality between tables, etc.

fixed_present_value((DividendTable)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

nParametersn———-ncountinous_compounding_rate : doublen The countinous compounding interest rate.nreference_time : doublen The reference time to which the values are discounted to.ntimel : doublen The lower bound of the time interval.ntimeu : doublen The upper bound of the time interval.nnReturnsn——-ndoublen The present value of all fixed dividends between timel and timeu.n

class otyca_cpp.DoubleScatter

Bases: instance

A container for managing scattered data points with unique numeric keys. The Scatter class is a specialized map that provides additional functionalities such as adding points, retrieving values, computing minimum spacing, and summing values. The type of T is Double.

add((DoubleScatter)arg1, (float)arg2, (float)arg3) bool :

Adds a data point to the scatter collection.nnParametersn———-nx : doublen The x-coordinate.ny : const T &n The y-coordinate.nnReturnsn——-nbooln true if the point was inserted, false if it already exists.n

class otyca_cpp.Estimate

Bases: instance

Represents a numerical estimate with an associated uncertainty. The Estimate class stores a value along with its uncertainty and provides operations for weighted averaging, arithmetic updates, and comparisons.

get_uncertainty((Estimate)arg1) float :

Gets the uncertainty associated with the estimate.nnReturnsn——-ndoublen The uncertainty value.n

get_value((Estimate)arg1) float :

Gets the estimated value.nnReturnsn——-ndoublen The estimate’s value.n

class otyca_cpp.EstimateScatter

Bases: instance

A container for managing scattered data points with unique numeric keys. The Scatter class is a specialized map that provides additional functionalities such as adding points, retrieving values, computing minimum spacing, and summing values. The type of T is Estimate.

add((EstimateScatter)arg1, (float)arg2, (Estimate)arg3) bool :

Adds a data point to the scatter collection.nnParametersn———-nx : doublen The x-coordinate.ny : const T &n The y-coordinate.nnReturnsn——-nbooln true if the point was inserted, false if it already exists.n

class otyca_cpp.EstimateSchedule

Bases: instance

A template class that represents a schedule with time points as keys. This class stores values of type T, indexed by time, and provides methods to add, generate, accumulate, extrapolate, and scatter values. The type of T is Estimate.

add((EstimateSchedule)arg1, (object)arg2, (Estimate)arg3) bool :

Add a value at a specific time point.nnParametersn———-nt : const boost::posix_time::ptime &n The time point at which the value is added.nv : const T &n The value to be added.nnReturnsn——-nbooln True if the value was added successfully, false otherwise.n

extrapolate((EstimateSchedule)arg1, (object)arg2) None :

Extrapolate values to a specified end time using a given gap.nnParametersn———-nend : const boost::posix_time::ptime &n The end time to extrapolate to.ngap : const boost::posix_time::time_duration &n The time gap between each extrapolated value.nvalue : const T &n The value to be assigned to the extrapolated time points.

scatter((EstimateSchedule)arg1, (object)arg2, (TenorCalculator)arg3, (EstimateScatter)arg4) None :

Scatter values based on a reference time using a tenor calculator. This method calculates the tenor between the reference time and each time point, adding the corresponding value to the output scatter.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time used to calculate tenor.nf : const TenorCalculator *n The tenor calculator.nout : Scatter<T> &n The scatter object where the results are stored.

size((EstimateSchedule)arg1) int
to_dict((EstimateSchedule)arg1) object :

Convert the schedule to a regular map.nnReturnsn——-nstd::map<boost::posix_time::ptime, T>n A map with time points as keys and values of type T.n

class otyca_cpp.Event

Bases: instance

Represents a market event characterized by tenor, variance, and significance.

property significance

A numeric measure of the event’s statistical significance, similar to number of standard deviations.

property tenor

The event measured in terms of extra tenor (time to expiration), expressed in the unit of years.

property variance

Represents a market event characterized by tenor, variance, and significance.

class otyca_cpp.EventBoundedSchedule

Bases: instance

A schedule that maps bounded time intervals to values of type T. The type of T is Event.

add_centered_on((EventBoundedSchedule)arg1, (object)arg2, (int)arg3, (Event)arg4) bool :

Adds an entry to the schedule using a center reference time and a symmetric business-day window.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time.nbusiness_days : intn The number of business days before and after the reference time.nvalue : const T &n The value associated with the time range.nnReturnsn——-nbooln True if the insertion was successful, false otherwise.n

add_with_bounds((EventBoundedSchedule)arg1, (object)arg2, (Event)arg3) bool :

Adds an entry to the schedule using an explicit start and end time.nnParametersn———-nbounds : const std::pair<boost::posix_time::ptime, boost::posix_time::ptime> &n A pair representing the start and end time of the entry.nvalue : const T &n The value associated with the time range.nnReturnsn——-nbooln True if the insertion was successful, false otherwise.n

size((EventBoundedSchedule)arg1) int
to_dict((EventBoundedSchedule)arg1) object :

Converts the object to a map.nnReturnsn——-nstd::map<std::pair<boost::posix_time::ptime, boost::posix_time::ptime>, T>n A std::map mapping pairs of boost::posix_time::ptime to values of type T. Each key is a (start_time, end_time) pair associated with a corresponding value.n

class otyca_cpp.FFTPricer

Bases: FourierTransformPricer

Option pricer using Fast Fourier Transform (FFT). This class implements a numerically efficient option pricing technique based on Fast Fourier Transform (FFT), as proposed by Peter Carr and Dilip B. Madan (1999): "Option valuation using the fast Fourier transform" It computes option prices, derivatives, implied volatilities, and PDFs using the characteristic function of a given stochastic process.

class otyca_cpp.FRFTPricer

Bases: FourierTransformPricer

Option pricer using Fraction Fast Fourier Transform (FRFT). This class implements a numerically efficient option pricing technique based on Fractional Fast Fourier Transform (FRFT), as proposed by Peter Carr and Dilip B. Madan (1999): "Option valuation using the fast Fourier transform" It computes option prices, derivatives, implied volatilities, and PDFs using the characteristic function of a given stochastic process.

class otyca_cpp.FloatBoundedSchedule

Bases: instance

A schedule that maps bounded time intervals to values of type T. The type of T is Float.

add_centered_on((FloatBoundedSchedule)arg1, (object)arg2, (int)arg3, (float)arg4) bool :

Adds an entry to the schedule using a center reference time and a symmetric business-day window.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time.nbusiness_days : intn The number of business days before and after the reference time.nvalue : const T &n The value associated with the time range.nnReturnsn——-nbooln True if the insertion was successful, false otherwise.n

add_with_bounds((FloatBoundedSchedule)arg1, (object)arg2, (float)arg3) bool :

Adds an entry to the schedule using an explicit start and end time.nnParametersn———-nbounds : const std::pair<boost::posix_time::ptime, boost::posix_time::ptime> &n A pair representing the start and end time of the entry.nvalue : const T &n The value associated with the time range.nnReturnsn——-nbooln True if the insertion was successful, false otherwise.n

size((FloatBoundedSchedule)arg1) int
to_dict((FloatBoundedSchedule)arg1) object :

Converts the object to a map.nnReturnsn——-nstd::map<std::pair<boost::posix_time::ptime, boost::posix_time::ptime>, T>n A std::map mapping pairs of boost::posix_time::ptime to values of type T. Each key is a (start_time, end_time) pair associated with a corresponding value.n

class otyca_cpp.FloatFlexibleSchedule

Bases: TimeDeltaFloatSchedule

A schedule that associates a value with a flexible time duration. This class extends Schedule and allows each value to be associated with a time duration, offering the ability to convert into a BoundedSchedule where each entry is bounded by its duration. The type of T is Float.

to_bounded_schedule((FloatFlexibleSchedule)arg1) FloatBoundedSchedule :

Converts the flexible schedule into a bounded schedule. Each entry in the flexible schedule is transformed into a bounded range by subtracting and adding the duration from the key, forming an interval.nnReturnsn——-nstd::shared_ptr<BoundedSchedule<T>>n A shared pointer to the resulting BoundedSchedule .n

class otyca_cpp.FloatSchedule

Bases: instance

A template class that represents a schedule with time points as keys. This class stores values of type T, indexed by time, and provides methods to add, generate, accumulate, extrapolate, and scatter values. The type of T is Float.

add((FloatSchedule)arg1, (object)arg2, (float)arg3) bool :

Add a value at a specific time point.nnParametersn———-nt : const boost::posix_time::ptime &n The time point at which the value is added.nv : const T &n The value to be added.nnReturnsn——-nbooln True if the value was added successfully, false otherwise.n

extrapolate((FloatSchedule)arg1, (object)arg2) None :

Extrapolate values to a specified end time using a given gap.nnParametersn———-nend : const boost::posix_time::ptime &n The end time to extrapolate to.ngap : const boost::posix_time::time_duration &n The time gap between each extrapolated value.nvalue : const T &n The value to be assigned to the extrapolated time points.

scatter((FloatSchedule)arg1, (object)arg2, (TenorCalculator)arg3, (DoubleScatter)arg4) None :

Scatter values based on a reference time using a tenor calculator. This method calculates the tenor between the reference time and each time point, adding the corresponding value to the output scatter.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time used to calculate tenor.nf : const TenorCalculator *n The tenor calculator.nout : Scatter<T> &n The scatter object where the results are stored.

size((FloatSchedule)arg1) int
to_dict((FloatSchedule)arg1) object :

Convert the schedule to a regular map.nnReturnsn——-nstd::map<boost::posix_time::ptime, T>n A map with time points as keys and values of type T.n

class otyca_cpp.ForwardVolatilityCRROptionCalculator

Bases: instance

american_grid_premium((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((ForwardVolatilityCRROptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((ForwardVolatilityCRROptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((ForwardVolatilityCRROptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((ForwardVolatilityCRROptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((ForwardVolatilityCRROptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((ForwardVolatilityCRROptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((ForwardVolatilityCRROptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((ForwardVolatilityCRROptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((ForwardVolatilityCRROptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((ForwardVolatilityCRROptionCalculator)arg1) float
rho((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((ForwardVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((ForwardVolatilityCRROptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((ForwardVolatilityCRROptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((ForwardVolatilityCRROptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((ForwardVolatilityCRROptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((ForwardVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((ForwardVolatilityCRROptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((ForwardVolatilityCRROptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((ForwardVolatilityCRROptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((ForwardVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((ForwardVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((ForwardVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((ForwardVolatilityCRROptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((ForwardVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((ForwardVolatilityCRROptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((ForwardVolatilityCRROptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((ForwardVolatilityCRROptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((ForwardVolatilityCRROptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((ForwardVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((ForwardVolatilityCRROptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((ForwardVolatilityCRROptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.ForwardVolatilityDCRROptionCalculator

Bases: instance

american_grid_premium((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((ForwardVolatilityDCRROptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((ForwardVolatilityDCRROptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((ForwardVolatilityDCRROptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((ForwardVolatilityDCRROptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((ForwardVolatilityDCRROptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((ForwardVolatilityDCRROptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((ForwardVolatilityDCRROptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((ForwardVolatilityDCRROptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((ForwardVolatilityDCRROptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((ForwardVolatilityDCRROptionCalculator)arg1) float
rho((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((ForwardVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((ForwardVolatilityDCRROptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((ForwardVolatilityDCRROptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((ForwardVolatilityDCRROptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((ForwardVolatilityDCRROptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((ForwardVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((ForwardVolatilityDCRROptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((ForwardVolatilityDCRROptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((ForwardVolatilityDCRROptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((ForwardVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((ForwardVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((ForwardVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((ForwardVolatilityDCRROptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((ForwardVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((ForwardVolatilityDCRROptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((ForwardVolatilityDCRROptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((ForwardVolatilityDCRROptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((ForwardVolatilityDCRROptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((ForwardVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((ForwardVolatilityDCRROptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((ForwardVolatilityDCRROptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.ForwardVolatilityJROptionCalculator

Bases: instance

american_grid_premium((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((ForwardVolatilityJROptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((ForwardVolatilityJROptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((ForwardVolatilityJROptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((ForwardVolatilityJROptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((ForwardVolatilityJROptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((ForwardVolatilityJROptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((ForwardVolatilityJROptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((ForwardVolatilityJROptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((ForwardVolatilityJROptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((ForwardVolatilityJROptionCalculator)arg1) float
rho((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((ForwardVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((ForwardVolatilityJROptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((ForwardVolatilityJROptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((ForwardVolatilityJROptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((ForwardVolatilityJROptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((ForwardVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((ForwardVolatilityJROptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((ForwardVolatilityJROptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((ForwardVolatilityJROptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((ForwardVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((ForwardVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((ForwardVolatilityJROptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((ForwardVolatilityJROptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((ForwardVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((ForwardVolatilityJROptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((ForwardVolatilityJROptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((ForwardVolatilityJROptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((ForwardVolatilityJROptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((ForwardVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((ForwardVolatilityJROptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((ForwardVolatilityJROptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.ForwardVolatilityLROptionCalculator

Bases: instance

american_grid_premium((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((ForwardVolatilityLROptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((ForwardVolatilityLROptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((ForwardVolatilityLROptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((ForwardVolatilityLROptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((ForwardVolatilityLROptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((ForwardVolatilityLROptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((ForwardVolatilityLROptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((ForwardVolatilityLROptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((ForwardVolatilityLROptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((ForwardVolatilityLROptionCalculator)arg1) float
rho((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((ForwardVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((ForwardVolatilityLROptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((ForwardVolatilityLROptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((ForwardVolatilityLROptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((ForwardVolatilityLROptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((ForwardVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((ForwardVolatilityLROptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((ForwardVolatilityLROptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((ForwardVolatilityLROptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((ForwardVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((ForwardVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((ForwardVolatilityLROptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((ForwardVolatilityLROptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((ForwardVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((ForwardVolatilityLROptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((ForwardVolatilityLROptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((ForwardVolatilityLROptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((ForwardVolatilityLROptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((ForwardVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((ForwardVolatilityLROptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((ForwardVolatilityLROptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.ForwardVolatilityTIANOptionCalculator

Bases: instance

american_grid_premium((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((ForwardVolatilityTIANOptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((ForwardVolatilityTIANOptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((ForwardVolatilityTIANOptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((ForwardVolatilityTIANOptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((ForwardVolatilityTIANOptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((ForwardVolatilityTIANOptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((ForwardVolatilityTIANOptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((ForwardVolatilityTIANOptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((ForwardVolatilityTIANOptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((ForwardVolatilityTIANOptionCalculator)arg1) float
rho((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((ForwardVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((ForwardVolatilityTIANOptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((ForwardVolatilityTIANOptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((ForwardVolatilityTIANOptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((ForwardVolatilityTIANOptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((ForwardVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((ForwardVolatilityTIANOptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((ForwardVolatilityTIANOptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((ForwardVolatilityTIANOptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((ForwardVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((ForwardVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((ForwardVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((ForwardVolatilityTIANOptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((ForwardVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((ForwardVolatilityTIANOptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((ForwardVolatilityTIANOptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((ForwardVolatilityTIANOptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((ForwardVolatilityTIANOptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((ForwardVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((ForwardVolatilityTIANOptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((ForwardVolatilityTIANOptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.FourierTransform

Bases: instance

Abstract base class for Fourier transformation of various claims(payoffs). This class defines the interface for Fourier-based option pricing methods. It provides interfaces for evaluating the Fourier integrand and its derivatives of various claims(payoffs).

class otyca_cpp.FourierTransformPricer

Bases: StochasticProcessPricer

Option pricer using Fourier Transform. This class implements a numerically efficient option pricing technique based on Fourier transform, as introduced by Peter Carr and Dilip B. Madan (1999) in “Option Valuation Using the Fast Fourier Transform.” It computes option prices, derivatives, implied volatilities, and PDFs using the characteristic function of a given stochastic process.

set_fourier_transform((FourierTransformPricer)arg1, (FourierTransform)arg2) None
class otyca_cpp.Gamma

Bases: TimeChangeProcess

property mu
property nu
class otyca_cpp.Giggle

Bases: VolatilitySmile

A one-dimensional 7-parameter volatility smile model. The Giggle model parameterizes implied volatility using two exponential wing functions and a vertical shift: 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_l : horizontal offset of the left wing. shift_r : horizontal offset of the right wing. sharp_l : transition sharpness/steepness of the left wing. sharp_r : transition sharpness/steepness of the right wing. shift_u : vertical shift. The evaluation formula for a strike-like input k is: [ begin{aligned} v_l(k) &= text{slope}_l cdot frac{log!bigl(1+expbigl(-(k+text{shift}_l)cdot text{sharp}_lbigr)bigr)} {text{sharp}_l},\[6pt] v_r(k) &= text{slope}_r cdot frac{log!bigl(1+expbigl((k-text{shift}_r)cdot text{sharp}_rbigr)bigr)} {text{sharp}_r},\[6pt] v(k) &= v_l(k) + v_r(k) + text{shift}_u. end{aligned} ] The model enforces positivity of parameters via the softplus transformation in calibration mode, and provides both raw and transformed accessors for parameters.

class otyca_cpp.Grin

Bases: VolatilitySmile

A one-dimensional 3-parameter volatility smile model. The Grin 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_l : slope of the left wing. slope_r : slope of the right wing. shift_u : vertical shift. The evaluation formula for a strike-like input k is: [ begin{aligned} v_l(k) &= text{slope}_l cdot log!bigl(1+expbigl(-kbigr)bigr),\[6pt] v_r(k) &= text{slope}_r cdot log!bigl(1+expbigl(kbigr)bigr),\[6pt] v(k) &= v_l(k) + v_r(k) + text{shift}_u. end{aligned} ] The model enforces positivity of parameters via the softplus transformation in calibration mode, and provides both raw and transformed accessors for parameters.

class otyca_cpp.ImpliedVarianceTenorCalculator

Bases: TenorCalculator

A class that calculates implied variance time based on the original time calculator. This class extends TimeCalculator and provides functionality to calculate the fraction of the year between two given times, as well as manage the reference expiration and valuation times. It also manages a variance schedule and its associated term structure.

set_original_time_calculator((ImpliedVarianceTenorCalculator)arg1, (TenorCalculator)arg2) None :

Sets the original time calculator used for time computations. This method allows setting an original time calculator, which may be used for more accurate or base calculations of time-related values.nnParametersn———-noriginal : std::shared_ptr<TenorCalculator>n A shared pointer to the original TimeCalculator.

set_reference_expiration((ImpliedVarianceTenorCalculator)arg1, (object)arg2) None :

Sets the reference expiration time. This method allows setting the reference expiration time, which is used in calculating implied variance.nnParametersn———-nreference_expiration : const boost::posix_time::ptime &n The reference expiration time to set.

set_valuation_time((ImpliedVarianceTenorCalculator)arg1, (object)arg2) None :

Sets the valuation time. This method allows setting the valuation time, which is used in variance-related calculations.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The valuation time to set.

set_variance_schedule((ImpliedVarianceTenorCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the variance schedule. This method allows setting the schedule of variance estimates used for implied variance calculations.nnParametersn———-nvars : const Schedule<Estimate> &n The variance schedule to set.

tenor((ImpliedVarianceTenorCalculator)arg1, (object)arg2, (object)arg3) float :

Calculates the year fraction between two given times. This method calculates the fraction of a year between the begin and end times provided. It uses the underlying time calculator to compute this value.nnParametersn———-nbegin : const boost::posix_time::ptime &n The start time.nend : const boost::posix_time::ptime &n The end time.nnReturnsn——-ndoublen The year fraction between begin and end.n

class otyca_cpp.InterestRateCurve

Bases: instance

Manages a collection of interest rate instruments (spots, futures, swaps) and builds a yield curve. The InterestRateCurve class allows for the creation and storage of different types of interest rate instruments, such as spot rates, futures, and swaps. It provides functionality to construct a piecewise yield curve based on these instruments. The yield curve is automatically updated when new instruments are added.

create_interest_rate_future((InterestRateCurve)arg1, (object)arg2, (float)arg3, (float)arg4) InterestRateFuture :

Creates and adds an interest rate future.nnParametersn———-nexpiration : const boost::gregorian::date &n Expiration date of the future.nbid : doublen Bid price of the future.nask : doublen Ask price of the future.nnReturnsn——-nstd::shared_ptr<InterestRateFuture>n A shared pointer to the created InterestRateFuture.n

create_interest_rate_spot((InterestRateCurve)arg1, (float)arg2, (float)arg3) InterestRateSpot :

Creates and adds an interest rate spot.nnParametersn———-ndays : doublen Maturity in days.nrate : doublen Interest rate.nnReturnsn——-nstd::shared_ptr<InterestRateSpot>n A shared pointer to the created InterestRateSpot.n

create_interest_rate_swap((InterestRateCurve)arg1, (float)arg2, (float)arg3, (float)arg4) InterestRateSwap :

Creates and adds an interest rate swap.nnParametersn———-nyears : doublen Maturity of the swap in years.nbid : doublen Bid rate of the swap.nask : doublen Ask rate of the swap.nnReturnsn——-nstd::shared_ptr<InterestRateSwap>n A shared pointer to the created InterestRateSwap.n

get_yield_curve((InterestRateCurve)arg1) PieceWiseYieldCurve :

Returns the constructed piecewise yield curve.nnReturnsn——-nstd::shared_ptr<PieceWiseYieldCurve>n A shared pointer to the PieceWiseYieldCurve.n

class otyca_cpp.InterestRateFuture

Bases: Security

Represents an interest rate futures contract. The InterestRateFuture class models a futures contract on short-term interest rates. It provides methods to access the expiration date and to calculate the implied interest rate based on the futures price.

class otyca_cpp.InterestRateSpot

Bases: instance

Represents a simple point on an interest rate curve, defined by a maturity (in days) and a rate.

class otyca_cpp.InterestRateSwap

Bases: Security

Represents an interest rate swap contract. The InterestRateSwap class models a fixed-for-floating interest rate swap. It provides methods to access the swap’s tenor and to calculate the implied fixed rate.

class otyca_cpp.InverseGaussian

Bases: TimeChangeProcess

property mu
property sigma
class otyca_cpp.Kou

Bases: LevyProcess

Represents the double exponential jump diffusion (Kou) stochastic process. The Kou jump process models asset prices by a stochastic jump, where the jump sizes follow a double exponential distribution. The jump size distribution is characterized by: Probability p for an upward jump with mean jump size 1/eta1, Probability 1-p for a downward jump with mean jump size -1/eta2$. This model allows for asymmetric jump behavior, capturing realistic market features like a tendency for large downward moves (crashes) and smaller upward corrections. A Jump-Diffusion Model for Option Pricing, S.G.Kou 2002

property eta1

Controls the mean size of upward jumps. The mean upward jump size is 1/_eta1. _eta1>1.

property eta2

Controls the mean size of downward jumps. The mean downward jump size is 1/_eta2. _eta2>0.

get_lambda((Kou)arg1) float
property lambda

Governs the frequency of jumps per unit time. Higher values mean more frequent jumps.

property p

Defines the probability that a jump is upward.

class otyca_cpp.LCIR

Bases: TimeChangeProcess

Represents a CIR (Cox-Ingersoll-Ross) process with leverage. The LCIR class models a Cox-Ingersoll-Ross (CIR) process with an additional correlation (leverage) between the CIR process and an external source of randomness, such as an underlying asset return process. CIR process, stochastic volatility modeling, Heston model

property kappa

Mean reversion rate. Determines the speed at which the process reverts to the long-term mean $ theta $.

property omega

Volatility coefficient. Controls the magnitude of random fluctuations in the process, scaled by the square root of the current state.

property rho

Correlation coefficient (leverage parameter). Measures the instantaneous correlation between the Brownian motion driving the CIR process and the Brownian motion driving the underlying asset or external process.

property sigma

Long-term mean level. The value toward which the CIR process tends to revert over time.

property v0

Current value of the CIR process. Represents the instantaneous level of the time-change process at the current time. Must remain non-negative.

class otyca_cpp.LevyProcess

Bases: StochasticProcess

Abstract base class for Lévy processes. A Lévy process is a stochastic process with stationary, independent increments, and is fully characterized by its characteristic exponent. This class defines the interface for Lévy processes used in Fourier-based option pricing.

class otyca_cpp.LevyProcessFactory

Bases: instance

Factory class for creating instances of Lévy processes by name. This class provides a static interface for constructing different types of Lévy process objects based on a string identifier.

create_levy_process((str)arg1) LevyProcess :

Create a Lévy process instance. Given the name of a Lévy process, this function returns a shared pointer to a newly created instance of that process. The exact list of supported process names is defined in the implementation.nnParametersn———-nname : const std::string &n A string identifier for the desired Lévy process type. These are the supported Lévy processes:nnReturnsn——-nstd::shared_ptr<LevyProcess>n A shared pointer to the created Lévy process.n

class otyca_cpp.LogLevel

Bases: enum

Debug = otyca_cpp.LogLevel.Debug
Error = otyca_cpp.LogLevel.Error
Info = otyca_cpp.LogLevel.Info
Warning = otyca_cpp.LogLevel.Warning
names = {'Debug': otyca_cpp.LogLevel.Debug, 'Error': otyca_cpp.LogLevel.Error, 'Info': otyca_cpp.LogLevel.Info, 'Warning': otyca_cpp.LogLevel.Warning}
values = {0: otyca_cpp.LogLevel.Debug, 1: otyca_cpp.LogLevel.Info, 2: otyca_cpp.LogLevel.Warning, 3: otyca_cpp.LogLevel.Error}
class otyca_cpp.Logger

Bases: instance

static log((LogLevel)arg1, (str)arg2) None :

Logs a message using the configured callback, if the level is sufficient.nnParametersn———-nlevel : LogLeveln The severity level of the message.nmessage : const std::string &n The message to be logged.

static set_log_callback((object)arg1) None :

Sets the global logging callback.nnParametersn———-ncallback : LogCallbackn The function to call when logging messages.

static set_log_level((LogLevel)arg1) None :

Sets the minimum log level to be reported.nnParametersn———-nlevel : LogLeveln The minimum severity level to log.

class otyca_cpp.Merton

Bases: LevyProcess

Represents the jump component of the Merton jump diffusion process. In the Merton model, jumps occur at random times determined by a Poisson process. The jump size follows Gaussian distribution. This jump mechanism allows the model to capture sudden large moves in asset prices, both upward and downward. The continuous part (diffusion) is governed by separate parameters and is not described here.

get_lambda((Merton)arg1) float
property lambda

The expected number of jumps per unit time. Higher values indicate more frequent jumps.

property mu

The mean size of the jump.

property sigma

The standard deviation of the jump size.

class otyca_cpp.Model1

Bases: ModelBase

calibrate((Model1)arg1, (Model1CalibrationInput)arg2, (Model1CalibrationConfig)arg3) None
evaluate((Model1)arg1, (object)arg2) float

evaluate( (Model1)arg1, (object)arg2) -> object

get_last_calibration_iterations((Model1)arg1) int
get_last_calibration_reduced_chi2((Model1)arg1) float
get_last_calibration_residuals((Model1)arg1) int
name((Model1)arg1) str
ukf((Model1)arg1, (Model1CalibrationInput)arg2) None
class otyca_cpp.Model1CalibrationConfig

Bases: instance

property epsfcn
property factor
property ftol
property gtol
property maxfev
property xtol
class otyca_cpp.Model1CalibrationInput

Bases: instance

property dy
property x
property y
class otyca_cpp.Model1CalibrationStatus

Bases: instance

aic((Model1CalibrationStatus)arg1) float
bic((Model1CalibrationStatus)arg1) float
property chi2
property cost2
property info
property iterations
message((Model1CalibrationStatus)arg1) str
property parameters
reduced_chi2((Model1CalibrationStatus)arg1) float
property residuals
class otyca_cpp.Model2

Bases: ModelBase

calibrate((Model2)arg1, (Model2CalibrationInput)arg2, (Model2CalibrationConfig)arg3) None
evaluate((Model2)arg1, (object)arg2) float

evaluate( (Model2)arg1, (object)arg2) -> object

get_last_calibration_iterations((Model2)arg1) int
get_last_calibration_reduced_chi2((Model2)arg1) float
get_last_calibration_residuals((Model2)arg1) int
name((Model2)arg1) str
ukf((Model2)arg1, (Model2CalibrationInput)arg2) None
class otyca_cpp.Model2CalibrationConfig

Bases: instance

property epsfcn
property factor
property ftol
property gtol
property maxfev
property xtol
class otyca_cpp.Model2CalibrationInput

Bases: instance

property dy
property x
property y
class otyca_cpp.Model2CalibrationStatus

Bases: instance

aic((Model2CalibrationStatus)arg1) float
bic((Model2CalibrationStatus)arg1) float
property chi2
property cost2
property info
property iterations
message((Model2CalibrationStatus)arg1) str
property parameters
reduced_chi2((Model2CalibrationStatus)arg1) float
property residuals
class otyca_cpp.ModelBase

Bases: instance

Abstract base class for parametric models supporting calibration. This class provides a generic interface for models that expose parameter access, transformation for calibration, and other utilities like parameter naming and printing.

get_calibration_parameters((ModelBase)arg1) object :

get the parameters for calibration.nnReturnsn——-nstd::vector<double>n the parameters for calibrationn

get_parameter_names((ModelBase)arg1) object :

Get the names of the model parameters.nnReturnsn——-nstd::vector<std::string>n A vector of parameter names. Default implementation assigns names as "p1", "p2", etc.n

get_parameters((ModelBase)arg1) object :

Get the model’s raw parameters.nnReturnsn——-nstd::vector<double>n A vector containing the model’s parameters.n

name((ModelBase)arg1) str :

Get the model’s name.nnReturnsn——-nstd::stringn A string representing the name of the model.n

class otyca_cpp.NelsonSiegel

Bases: Model1

Implements the Nelson-Siegel yield curve model. The Nelson-Siegel model is commonly used for fitting yield curves. It consists of four parameters: level, slope, curvature, and tau.

property curvature

Medium-term curvature parameter.

property level

Long-term level parameter.

property slope

Short-term slope parameter.

property tau

Decay factor controlling the shape.

class otyca_cpp.NelsonSiegelSvensson

Bases: NelsonSiegel

Extended Nelson-Siegel model with an additional curvature term. This class implements the Nelson-Siegel-Svensson model which adds a second curvature term to the original Nelson-Siegel formulation to better fit the term structure of interest rates.

property curvature2

Second curvature term (Svensson extension).

property tau2

Time-decay constant for the second curvature term.

class otyca_cpp.Option

Bases: Security

Represents a financial option with various pricing attributes.

get_ask_volatility((Option)arg1) float :

Calculates and gets the ask volatility.

get_bid_volatility((Option)arg1) float :

Calculates and gets the bid volatility.

get_delta((Option)arg1) float :

Calculate and gets option delta using fitted volatility.

get_delta_decay((Option)arg1) float :

Calculate and gets option Delta decay using fitted volatility.

get_expiration((Option)arg1) object :

Retrieves the option expiration date.

get_fugit((Option)arg1) float :

Calculate and gets option fugit using fitted volatility.

get_gamma((Option)arg1) float :

Calculate and gets option Gamma using fitted volatility.

get_mid_volatility((Option)arg1) float :

Calculates and gets the mid-price implied volatility.

get_osi_sub((Option)arg1) str :

Generates the OSI sub symbol (OSI without the root) for the option.

get_phi((Option)arg1) float :

Calculate and gets option phi using fitted volatility.

get_premium((Option)arg1) float :

Calculate and gets option premium using fitted volatility.

get_rho((Option)arg1) float :

Calculate and gets option Rho using fitted volatility.

get_strike((Option)arg1) float :

Retrieves the option strike price.

get_style((Option)arg1) OptionStyle :

Retrieves the option style.

get_theta((Option)arg1) float :

Calculate and gets option Theta using fitted volatility.

get_type((Option)arg1) OptionType :

Retrieves the option type.

get_vanna((Option)arg1) float :

Calculate and gets option Vanna using fitted volatility.

get_vega((Option)arg1) float :

Calculate and gets option Vega using fitted volatility.

get_volga((Option)arg1) float :

Calculate and gets option Volga using fitted volatility.

class otyca_cpp.OptionExpiration

Bases: instance

atm_volatility((OptionExpiration)arg1, (StochasticProcess)arg2) float :

For a given stochastic process, calculate forward ATM volatility.nnReturnsn——-ndoublen Forward ATM volatilityn

get_accumulated_fixed_dividend((OptionExpiration)arg1) float :

Retrieves the accumulated fixed dividend upto this expiration.nnReturnsn——-ndoublen The accumulated fixed dividend as a double.n

get_accumulated_proportional_dividend((OptionExpiration)arg1) float :

Retrieves the accumulated proportional dividend upto this expiration.nnReturnsn——-ndoublen The accumulated proportional dividend as a double.n

get_atm_volatility_uncertainty((OptionExpiration)arg1) float :

Retrieves the uncertainty of the at-the-money (ATM) volatility.nnReturnsn——-ndoublen The ATM volatility uncertainty as a double.n

get_atm_volatility_value((OptionExpiration)arg1) float :

Retrieves the numerical value of the ATM volatility.nnReturnsn——-ndoublen The ATM volatility value as a double.n

get_borrow_rate_uncertainty((OptionExpiration)arg1) float :

Retrieves the uncertainty of the borrow rate estimate.nnReturnsn——-ndoublen The uncertainty in the borrow rate as a double.n

get_borrow_rate_value((OptionExpiration)arg1) float :

Retrieves the numerical value of the borrow rate.nnReturnsn——-ndoublen The borrow rate value as a double.n

get_carry_tenor((OptionExpiration)arg1) float :

Retrieves the carry tenor.nnReturnsn——-ndoublen The carry tenor as a double.n

get_expiration((OptionExpiration)arg1) object :

Gets the expiration time.nnReturnsn——-nboost::posix_time::ptimen The expiration time.n

get_fair_atm_volatility((OptionExpiration)arg1) float :

Retrieves the fair at-the-money (ATM) volatility.nnReturnsn——-ndoublen The fair ATM volatility as a double.n

get_fair_volatility_model((OptionExpiration)arg1) VolatilitySmile :

Retrieves the calibrated fair volatility model.nnReturnsn——-nauton A shared pointer to the calibrated fair volatility model.n

get_fair_volatility_model_reduced_chi2((OptionExpiration)arg1) float :

Retrieves the fair volatility model fitting chi2.nnReturnsn——-ndoublen The fair volatility model fitting chi2 as a double.n

get_fair_volatility_skew((OptionExpiration)arg1) float :

Retrieves the fair volatility skew.nnReturnsn——-ndoublen The fair volatility skew as a double.n

get_forward((OptionExpiration)arg1) Estimate :

Gets the estimated forward price.nnReturnsn——-nEstimaten The forward price estimate.n

get_forward_uncertainty((OptionExpiration)arg1) float :

Gets the forward price uncertainty.nnReturnsn——-ndoublen The forward price uncertainty.n

get_forward_value((OptionExpiration)arg1) float :

Gets the forward price value.nnReturnsn——-ndoublen The forward price value.n

get_hedge_tenor((OptionExpiration)arg1) float :

Retrieves the hedge tenor.nnReturnsn——-ndoublen The hedge tenor as a double.n

get_implied_forward_uncertainty((OptionExpiration)arg1) float :

Retrieves the uncertainty of the implied forward estimate.nnReturnsn——-ndoublen The uncertainty in the implied forward as a double.n

get_implied_forward_value((OptionExpiration)arg1) float :

Retrieves the numerical value of the implied forward.nnReturnsn——-ndoublen The implied forward value as a double.n

get_interest_rate_uncertainty((OptionExpiration)arg1) float :

Retrieves the uncertainty of the interest rate estimate.nnReturnsn——-ndoublen The uncertainty in the interest rate as a double.n

get_interest_rate_value((OptionExpiration)arg1) float :

Retrieves the numerical value of the interest rate.nnReturnsn——-ndoublen The interest rate value as a double.n

get_jointly_implied_borrow_uncertainty((OptionExpiration)arg1) float :

Retrieves the numerical uncertainty of the borrow part of the jointly implied interest and borrow.nnReturnsn——-ndoublen The uncertainty in the implied borrow rate as a double.n

get_jointly_implied_borrow_value((OptionExpiration)arg1) float :

Retrieves the numerical value of the borrow part of the jointly implied interest and borrow.nnReturnsn——-ndoublen The jointly implied borrow rate value as a double.n

get_jointly_implied_forward_uncertainty((OptionExpiration)arg1) float :

Retrieves the numerical uncertainty of the early exercise premium (using jointly implied interest and borrow) adjusted put-call parity implied forward.nnReturnsn——-ndoublen The uncertainty in the forward price as a double.n

get_jointly_implied_forward_value((OptionExpiration)arg1) float :

Retrieves the numerical value the early exercise premium (using jointly implied interest and borrow) adjusted put-call parity implied forward.nnReturnsn——-ndoublen The value in the forward price as a double.n

get_jointly_implied_interest_uncertainty((OptionExpiration)arg1) float :

Retrieves the numerical uncertainty of the interest part of the jointly implied interest and borrow.nnReturnsn——-ndoublen The uncertainty in the implied interest rate as a double.n

get_jointly_implied_interest_value((OptionExpiration)arg1) float :

Retrieves the numerical value of the interest part of the jointly implied interest and borrow.nnReturnsn——-ndoublen The jointly implied interest rate value as a double.n

get_option_strike_dataframe((OptionExpiration)arg1) object :

Retrieves a structured representation of option strike data.nnReturnsn——-nstd::tuple<std::vector<double>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of option strike values, labels, and additional data.n

get_option_strikes((OptionExpiration)arg1[, (object)arg2]) object
get_stochastic_process_atm_volatility((OptionExpiration)arg1) float :

Retrieves the stochastic process ATM volatility.nnReturnsn——-ndoublen The stochastic process ATM volatility as a double.n

get_variance_tenor((OptionExpiration)arg1) float :

Retrieves the variance tenor.nnReturnsn——-ndoublen The variance tenor as a double.n

get_variance_term_structure_core_model_value((OptionExpiration)arg1) float :

Retrieves the variance term structure core model value.nnReturnsn——-ndoublen The variance term structure core model value as a double.n

get_variance_term_structure_model_value((OptionExpiration)arg1) float :

Retrieves the variance term structure model value.nnReturnsn——-ndoublen The variance term structure model value as a double.n

get_vix_style_volatility((OptionExpiration)arg1) float :

Retrieves the VIX-style volatility.nnReturnsn——-ndoublen The VIX-style volatility as a double.n

variance((OptionExpiration)arg1, (StochasticProcess)arg2) float :

For a given stochastic process, calculate variance.nnReturnsn——-ndoublen variancen

class otyca_cpp.OptionStrike

Bases: instance

get_call((OptionStrike)arg1) Option
get_expiration((OptionStrike)arg1) object :

Gets the expiration that it belongs to.nnReturnsn——-nboost::posix_time::ptimen The expiration.n

get_fair_volatility((OptionStrike)arg1) float :

Gets the fair volatility.nnReturnsn——-ndoublen The fair volatility value.n

get_implied_forward_uncertainty((OptionStrike)arg1) float :

Returns the uncertainty of the implied forward price.nnReturnsn——-ndoublen The uncertainty of the implied forward price as a double.n

get_implied_forward_value((OptionStrike)arg1) float :

Gets the implied forward estimate.nnReturnsn——-nEstimaten The implied forward estimate.n

get_options((OptionStrike)arg1) object :

Returns a vector of shared pointers to the call and put options.nnReturnsn——-nstd::vector<std::shared_ptr<Option>>n A std::vector containing shared pointers to the call and put Option objects.n

get_put((OptionStrike)arg1) Option
get_relative_strike((OptionStrike)arg1) float :

Gets the relative strike.nnReturnsn——-ndoublen The relative strike value.n

get_stochastic_process_volatility((OptionStrike)arg1) float
get_strike((OptionStrike)arg1) float :

Gets the strike price.nnReturnsn——-ndoublen The strike price.n

get_strike_volatility((OptionStrike)arg1) Estimate :

Gets the strike volatility estimate.nnReturnsn——-nEstimaten The strike volatility estimate.n

get_strike_volatility_uncertainty((OptionStrike)arg1) float :

Gets the strike volatility estimate.nnReturnsn——-nEstimaten The strike volatility estimate.n

get_strike_volatility_value((OptionStrike)arg1) float :

Gets the value of the strike volatility.nnReturnsn——-ndoublen The strike volatility value.n

get_volatility_model_outputs((OptionStrike)arg1) object
class otyca_cpp.OptionStyle

Bases: enum

AMERICAN = otyca_cpp.OptionStyle.AMERICAN
EUROPEAN = otyca_cpp.OptionStyle.EUROPEAN
names = {'AMERICAN': otyca_cpp.OptionStyle.AMERICAN, 'EUROPEAN': otyca_cpp.OptionStyle.EUROPEAN}
values = {0: otyca_cpp.OptionStyle.EUROPEAN, 1: otyca_cpp.OptionStyle.AMERICAN}
class otyca_cpp.OptionType

Bases: enum

CALL = otyca_cpp.OptionType.CALL
PUT = otyca_cpp.OptionType.PUT
names = {'CALL': otyca_cpp.OptionType.CALL, 'PUT': otyca_cpp.OptionType.PUT}
values = {-1: otyca_cpp.OptionType.PUT, 1: otyca_cpp.OptionType.CALL}
class otyca_cpp.PieceWiseTermStructure

Bases: TermStructure, EstimateScatter

A piecewise implementation of a term structure. This class inherits from both TermStructure and Scatter to represent term structure data in a piecewise form. Interpolation between time points allows the term structure to provide estimates at arbitrary times.

term_estimate((PieceWiseTermStructure)arg1, (float)arg2) Estimate :

Returns the term estimate at time x. This function should interpolate between known points stored in the Scatter base class.nnParametersn———-nx : doublen The time for which the estimate is requested.nnReturnsn——-nEstimaten Estimate at time x.n

class otyca_cpp.PieceWiseYieldCurve

Bases: PieceWiseTermStructure, YieldCurve

A piecewise implementation of a yield curve. Combines the behavior of a yield curve and a piecewise term structure to model interest rates or discount factors in a flexible, segment-wise fashion. Inherits from: PieceWiseTermStructure: to provide interpolation between known time-value points. YieldCurve: to expose discount and growth factor computations.

class otyca_cpp.Poisson

Bases: TimeChangeProcess

property lambda
class otyca_cpp.Poker

Bases: VolatilitySmile

A one-dimensional volatility smile model with just 1 parameter. The Poker model is a parametric form for modeling implied volatility smiles. It extends the generic Model base class and provides functionality to set, get, and transform parameters for calibration purposes. The model evaluates implied volatility given strike-like input values. Parameters: level : the baseline volatility. The implied volatility is: v = level

class otyca_cpp.RealizedVarianceTenorCalculator

Bases: TenorCalculator

set_variance_weights((RealizedVarianceTenorCalculator)arg1, (float)arg2, (float)arg3, (float)arg4) None
tenor((RealizedVarianceTenorCalculator)arg1, (object)arg2, (object)arg3) float
class otyca_cpp.Security

Bases: instance

Represents a financial security with bid/ask prices and sizes. The Security class provides methods to access and modify market pricing data, such as bid and ask prices and their respective sizes. It also provides utility methods to compute the mid-price and spread.

get_ask_price((Security)arg1) float :

Gets the ask price.nnReturnsn——-ndoublen Ask price.n

get_bid_price((Security)arg1) float :

Gets the bid price.nnReturnsn——-ndoublen Bid price.n

id((Security)arg1) int :

Gets the ID.nnReturnsn——-nsize_tn ID.n

mid((Security)arg1) float :

Computes the mid-price. If the bid price is positive, returns the weighted mid; otherwise, simple mid.nnReturnsn——-ndoublen Mid-price of the security.n

set_bid_ask((Security)arg1, (float)arg2, (int)arg3, (float)arg4, (int)arg5) None :

Sets bid/ask prices and sizes. If any input is negative, or if bid >= ask, values are invalidated.nnParametersn———-nbid_price : doublen The bid price.nbid_size : intn The bid size.nask_price : doublen The ask price.nask_size : intn The ask size.

simple_mid((Security)arg1) float :

Computes the simple (unweighted) mid-price.nnReturnsn——-ndoublen Simple mid-price.n

spread((Security)arg1) float :

Computes the spread between ask and bid.nnReturnsn——-ndoublen The spread.n

weighted_mid((Security)arg1) float :

Computes the inverse-size-weighted mid-price.nnReturnsn——-ndoublen Weighted mid-price.n

class otyca_cpp.Smile

Bases: 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{aligned} v_l(k) &= text{slope} cdot log!bigl(1+expbigl(-kbigr)bigr),\[6pt] v_r(k) &= text{slope} cdot log!bigl(1+expbigl(kbigr)bigr),\[6pt] v(k) &= v_l(k) + v_r(k) + text{shift}_u. end{aligned} ] The model enforces positivity of parameters via the softplus transformation in calibration mode, and provides both raw and transformed accessors for parameters.

class otyca_cpp.Smirk

Bases: VolatilitySmile

A one-dimensional 4-parameter volatility smile model. The Smirk 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. sharp : common transition sharpness/steepness of both wings. shift_u : vertical shift. The evaluation formula for a strike-like input k is: [ begin{aligned} v_l(k) &= text{slope}_l cdot frac{log!bigl(1+expbigl(-kcdot text{sharp}bigr)bigr)} {text{sharp}},\[6pt] v_r(k) &= text{slope}_r cdot frac{log!bigl(1+expbigl(kcdot text{sharp}bigr)bigr)} {text{sharp}},\[6pt] v(k) &= v_l(k) + v_r(k) + text{shift}_u. end{aligned} ] The model enforces positivity of parameters via the softplus transformation in calibration mode, and provides both raw and transformed accessors for parameters.

class otyca_cpp.Sneer

Bases: 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 k is: [ begin{aligned} v_l(k) &= text{slope}_l cdot frac{log!bigl(1+expbigl(-(k+text{shift})cdot text{sharp}bigr)bigr)} {text{sharp}},\[6pt] v_r(k) &= text{slope}_r cdot frac{log!bigl(1+expbigl((k-text{shift})cdot text{sharp}bigr)bigr)} {text{sharp}},\[6pt] v(k) &= v_l(k) + v_r(k) + text{shift}_u. end{aligned} ] The model enforces positivity of parameters via the softplus transformation in calibration mode, and provides both raw and transformed accessors for parameters.

class otyca_cpp.SpotVolatilityCRROptionCalculator

Bases: instance

american_grid_premium((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((SpotVolatilityCRROptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((SpotVolatilityCRROptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((SpotVolatilityCRROptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((SpotVolatilityCRROptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((SpotVolatilityCRROptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((SpotVolatilityCRROptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((SpotVolatilityCRROptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((SpotVolatilityCRROptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((SpotVolatilityCRROptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((SpotVolatilityCRROptionCalculator)arg1) float
rho((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((SpotVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((SpotVolatilityCRROptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((SpotVolatilityCRROptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((SpotVolatilityCRROptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((SpotVolatilityCRROptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((SpotVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((SpotVolatilityCRROptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((SpotVolatilityCRROptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((SpotVolatilityCRROptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((SpotVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((SpotVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((SpotVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((SpotVolatilityCRROptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((SpotVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((SpotVolatilityCRROptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((SpotVolatilityCRROptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((SpotVolatilityCRROptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((SpotVolatilityCRROptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((SpotVolatilityCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((SpotVolatilityCRROptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((SpotVolatilityCRROptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.SpotVolatilityDCRROptionCalculator

Bases: instance

american_grid_premium((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((SpotVolatilityDCRROptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((SpotVolatilityDCRROptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((SpotVolatilityDCRROptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((SpotVolatilityDCRROptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((SpotVolatilityDCRROptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((SpotVolatilityDCRROptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((SpotVolatilityDCRROptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((SpotVolatilityDCRROptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((SpotVolatilityDCRROptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((SpotVolatilityDCRROptionCalculator)arg1) float
rho((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((SpotVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((SpotVolatilityDCRROptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((SpotVolatilityDCRROptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((SpotVolatilityDCRROptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((SpotVolatilityDCRROptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((SpotVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((SpotVolatilityDCRROptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((SpotVolatilityDCRROptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((SpotVolatilityDCRROptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((SpotVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((SpotVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((SpotVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((SpotVolatilityDCRROptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((SpotVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((SpotVolatilityDCRROptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((SpotVolatilityDCRROptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((SpotVolatilityDCRROptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((SpotVolatilityDCRROptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((SpotVolatilityDCRROptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((SpotVolatilityDCRROptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((SpotVolatilityDCRROptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.SpotVolatilityJROptionCalculator

Bases: instance

american_grid_premium((SpotVolatilityJROptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((SpotVolatilityJROptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((SpotVolatilityJROptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((SpotVolatilityJROptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((SpotVolatilityJROptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((SpotVolatilityJROptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((SpotVolatilityJROptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((SpotVolatilityJROptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((SpotVolatilityJROptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((SpotVolatilityJROptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((SpotVolatilityJROptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((SpotVolatilityJROptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((SpotVolatilityJROptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((SpotVolatilityJROptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((SpotVolatilityJROptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((SpotVolatilityJROptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((SpotVolatilityJROptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((SpotVolatilityJROptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((SpotVolatilityJROptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((SpotVolatilityJROptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((SpotVolatilityJROptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((SpotVolatilityJROptionCalculator)arg1) float
rho((SpotVolatilityJROptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((SpotVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((SpotVolatilityJROptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((SpotVolatilityJROptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((SpotVolatilityJROptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((SpotVolatilityJROptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((SpotVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((SpotVolatilityJROptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((SpotVolatilityJROptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((SpotVolatilityJROptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((SpotVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((SpotVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((SpotVolatilityJROptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((SpotVolatilityJROptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((SpotVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((SpotVolatilityJROptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((SpotVolatilityJROptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((SpotVolatilityJROptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((SpotVolatilityJROptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((SpotVolatilityJROptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((SpotVolatilityJROptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((SpotVolatilityJROptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((SpotVolatilityJROptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((SpotVolatilityJROptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((SpotVolatilityJROptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((SpotVolatilityJROptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.SpotVolatilityLROptionCalculator

Bases: instance

american_grid_premium((SpotVolatilityLROptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((SpotVolatilityLROptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((SpotVolatilityLROptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((SpotVolatilityLROptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((SpotVolatilityLROptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((SpotVolatilityLROptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((SpotVolatilityLROptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((SpotVolatilityLROptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((SpotVolatilityLROptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((SpotVolatilityLROptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((SpotVolatilityLROptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((SpotVolatilityLROptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((SpotVolatilityLROptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((SpotVolatilityLROptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((SpotVolatilityLROptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((SpotVolatilityLROptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((SpotVolatilityLROptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((SpotVolatilityLROptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((SpotVolatilityLROptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((SpotVolatilityLROptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((SpotVolatilityLROptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((SpotVolatilityLROptionCalculator)arg1) float
rho((SpotVolatilityLROptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((SpotVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((SpotVolatilityLROptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((SpotVolatilityLROptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((SpotVolatilityLROptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((SpotVolatilityLROptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((SpotVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((SpotVolatilityLROptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((SpotVolatilityLROptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((SpotVolatilityLROptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((SpotVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((SpotVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((SpotVolatilityLROptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((SpotVolatilityLROptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((SpotVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((SpotVolatilityLROptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((SpotVolatilityLROptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((SpotVolatilityLROptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((SpotVolatilityLROptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((SpotVolatilityLROptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((SpotVolatilityLROptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((SpotVolatilityLROptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((SpotVolatilityLROptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((SpotVolatilityLROptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((SpotVolatilityLROptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((SpotVolatilityLROptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.SpotVolatilityTIANOptionCalculator

Bases: instance

american_grid_premium((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the premium of an American option using a grid-based numerical method.nnReturnsn——-ndoublen The computed American option premium.n

carry_tenor((SpotVolatilityTIANOptionCalculator)arg1) float :

Gets the carry tenor.nnReturnsn——-ndoublen The carry tenor (in years).n

delta((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the delta of the option.nnReturnsn——-ndoublen The delta.n

delta_decay((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the decay in delta due to passage of time.nnReturnsn——-ndoublen The delta decay.n

dual_delta((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the dual delta of the option.nnReturnsn——-ndoublen The dual delta.n

early_exercise_premium((SpotVolatilityTIANOptionCalculator)arg1) float :

Computes the early exercise premium of an American option.nnReturnsn——-ndoublen The early exercise premium.n

european_dual_delta((SpotVolatilityTIANOptionCalculator)arg1) float :

Computes the dual delta (sensitivity to strike) of a European option.nnReturnsn——-ndoublen The European dual delta.n

european_grid_bias((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the premium difference of an European option using a grid-based numerical method v.s. analytical method.nnReturnsn——-ndoublen European grid premium - european analytical premium.n

european_grid_premium((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the premium of an European option using a grid-based numerical method.nnReturnsn——-ndoublen The computed option premium.n

european_premium((SpotVolatilityTIANOptionCalculator)arg1) float :

Computes the premium of a European option.nnReturnsn——-ndoublen The European option premium.n

european_vega((SpotVolatilityTIANOptionCalculator)arg1) float :

Computes the vega (sensitivity to volatility) of a European option.nnReturnsn——-ndoublen The European vega.n

forward((SpotVolatilityTIANOptionCalculator)arg1) float :

Computes and returns the forward price of the underlying asset.nnReturnsn——-ndoublen The forward price.n

forward_intrinsic((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the intrinsic value using the forward price.nnReturnsn——-ndoublen The forward intrinsic value.n

fugit((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the fugit (expected life) of the option.nnReturnsn——-ndoublen The fugit.n

gamma((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the gamma of the option.nnReturnsn——-ndoublen The gamma.n

hedge_tenor((SpotVolatilityTIANOptionCalculator)arg1) float :

Gets the hedge tenor.nnReturnsn——-ndoublen The hedge tenor (in years).n

implied_volatility((SpotVolatilityTIANOptionCalculator)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) float :

Computes the implied volatility that matches a given option price. Uses numerical methods to solve for the volatility that, when input into a pricing model, produces the specified option price.nnParametersn———-nprice : doublen The observed option price to match.nvolatility_tolerance : doublen The tolerance for volatility convergence (default = 1e-4).nguess : doublen The initial guess for the implied volatility (default = 0.25).nrelative_price_tolerance : doublen The tolerance for price convergence relative to input price (default = 1e-4).nnReturnsn——-ndoublen The implied volatility.n

intrinsic((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the intrinsic value of the option. For a call, this is max(S - K, 0); for a put, max(K - S, 0), where S is the underlying asset price.

overwrite((SpotVolatilityTIANOptionCalculator)arg1, (DividendTable)arg2, (float)arg3, (float)arg4, (float)arg5) None :

Overwrites core market assumptions for pricing calculations. Instead of calculating time to dividends, carry time to expiration, hedge time to expiration and variance time to expiration, use these values.nnParametersn———-ndividend_table : const DividendTable &n A new DividendTable to use.ncarry_tenor : doublen The tenor (in years) for carry cost estimation.nhedge_tenor : doublen The tenor for delta hedging.nvariance_tenor : doublen The tenor used for implied volatility input.

phi((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the phi of the option.nnReturnsn——-ndoublen The phi.n

premium((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the premium (price) of the option.nnReturnsn——-ndoublen The option premium.n

premium_function_cost_in_seconds((SpotVolatilityTIANOptionCalculator)arg1) float
rho((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the rho of the option.nnReturnsn——-ndoublen The rho.n

set_borrow_rate((SpotVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding borrowing rate.nnParametersn———-nannualized_continuous_compounding_borrow_rate : doublen The new borrowing rate.

set_ctrl_smooth((SpotVolatilityTIANOptionCalculator)arg1, (bool)arg2) None
set_dividend_schedule((SpotVolatilityTIANOptionCalculator)arg1, (DividendSchedule)arg2) None :

Sets the dividend schedule.nnParametersn———-ndividend_schedule : const std::shared_ptr<Schedule<Dividend>> &n The new dividend schedule.

set_exercise_settlement_lag((SpotVolatilityTIANOptionCalculator)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nexercise_settlement_lag : intn The new exercise settlement lag.

set_expiration((SpotVolatilityTIANOptionCalculator)arg1, (object)arg2) None :

Sets the expiration date of the option.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The new expiration date.

set_interest_rate((SpotVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the annualized continuous compounding interest rate.nnParametersn———-nannualized_continuous_compounding_interest_rate : doublen The new interest rate.

set_option_settlement_lag((SpotVolatilityTIANOptionCalculator)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The new option settlement lag.

set_option_style((SpotVolatilityTIANOptionCalculator)arg1, (OptionStyle)arg2) None :

Sets the style of the option (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style.

set_option_type((SpotVolatilityTIANOptionCalculator)arg1, (OptionType)arg2) None :

Sets the type of the option (e.g., Call or Put).nnParametersn———-ntype : OptionTypen The option type.

set_precision((SpotVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the numerical precision used in internal calculations.nnParametersn———-nprecision : doublen The new precision value. Recommend 1 for standard precision.

set_strike((SpotVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the strike price of the option.nnParametersn———-nstrike : doublen The new strike price.

set_tenor((SpotVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Instead of calculating carry, hedge, and variance time to expiration, use these values.nnParametersn———-ntenor : doublen The tenor to use for carry, hedge and variance tenors

set_trading_calendar((SpotVolatilityTIANOptionCalculator)arg1, (TradingCalendar)arg2) None :

Sets the trading calendar used to determine business days and holidays.nnParametersn———-ntrading_calendar : const std::shared_ptr<TradingCalendar> &n Shared pointer to a TradingCalendar instance.

set_underlying_price((SpotVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the underlying asset price.nnParametersn———-nunderlying_price : doublen The new underlying asset price.

set_underlying_settlement_lag((SpotVolatilityTIANOptionCalculator)arg1, (int)arg2) None :

Sets the underlying settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The new underlying settlement lag.

set_valuation_time((SpotVolatilityTIANOptionCalculator)arg1, (object)arg2) None :

Sets the valuation time.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_schedule((SpotVolatilityTIANOptionCalculator)arg1, (EstimateSchedule)arg2) None :

Sets the schedule of estimated variances to be used in computations.nnParametersn———-nvariance_schedule : const std::shared_ptr<Schedule<Estimate>> &n Shared pointer to a Schedule containing Estimate objects.

set_variance_tenor_calculator((SpotVolatilityTIANOptionCalculator)arg1, (TenorCalculator)arg2) None :

Sets the tenor calculator used to compute time intervals for variance calculations.nnParametersn———-ntenor_calculator : const std::shared_ptr<TenorCalculator> &n Shared pointer to a TenorCalculator instance.

set_volatility((SpotVolatilityTIANOptionCalculator)arg1, (float)arg2) None :

Sets the annualized volatility used in pricing and risk calculations.nnParametersn———-nannualized_volatility : doublen The annualized volatility.

theta((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the theta of the option.nnReturnsn——-ndoublen The theta.n

time_value((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the time value of the option.nnReturnsn——-ndoublen The time value.n

vanna((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the vanna of the option.nnReturnsn——-ndoublen The vanna.n

variance_tenor((SpotVolatilityTIANOptionCalculator)arg1) float :

Gets the variance tenor.nnReturnsn——-ndoublen The variance tenor (in years).n

vega((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the vega of the option.nnReturnsn——-ndoublen The vega.n

volga((SpotVolatilityTIANOptionCalculator)arg1) float :

Returns the volga (or vomma) of the option.nnReturnsn——-ndoublen The volga.n

class otyca_cpp.StochasticProcess

Bases: Model2

get_parameter_names((StochasticProcess)arg1) object
specification((StochasticProcess)arg1) str
variance((StochasticProcess)arg1, (float)arg2) float
volatility((StochasticProcess)arg1, (float)arg2) float

volatility( (StochasticProcess)arg1, (float)arg2, (float)arg3) -> float

class otyca_cpp.StochasticProcessPricer

Bases: instance

Abstract base class for pricing instruments under a stochastic process.

implied_volatility((StochasticProcessPricer)arg1, (StochasticProcess)process, (object)expirations, (object)strikes[, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE[, (float)tolerance=0.0001]]) object

implied_volatility( (StochasticProcessPricer)arg1, (StochasticProcess)process, (float)expiration, (object)strikes [, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE [, (float)tolerance=0.0001]]) -> object

implied_volatility( (StochasticProcessPricer)arg1, (StochasticProcess)process, (float)expiration, (float)strike [, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE [, (float)tolerance=0.0001]]) -> float

name((StochasticProcessPricer)arg1) str :

Returns the name of the pricer.nnReturnsn——-nstd::stringn The name as a string.n

pdf((StochasticProcessPricer)arg1, (StochasticProcess)process, (object)expirations, (object)strikes[, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE]) object

pdf( (StochasticProcessPricer)arg1, (StochasticProcess)process, (float)expiration, (object)strikes [, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE]) -> object

pdf( (StochasticProcessPricer)arg1, (StochasticProcess)process, (float)expiration, (float)strike [, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE]) -> float

price((StochasticProcessPricer)arg1, (StochasticProcess)process, (object)expirations, (object)strikes[, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE]) object :

Prices for multiple tenors and strike sets.nnParametersn———-nstochastic_process : const StochasticProcess *n Pointer to the stochastic process model.ntenors : const std::vector<double> &n Vector of tenors.nstrikes : const std::vector<std::vector<double>> &n 2D vector of strikes (per tenor).nstrike_type : StrikeTypen Type of strike to use. See StrikeType for available options.nnReturnsn——-nstd::vector<std::vector<double>>n 2D vector of prices.n

price( (StochasticProcessPricer)arg1, (StochasticProcess)process, (float)expiration, (object)strikes [, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE]) -> object :

Prices for multiple tenors and strike sets.nnParametersn———-nstochastic_process : const StochasticProcess *n Pointer to the stochastic process model.ntenors : const std::vector<double> &n Vector of tenors.nstrikes : const std::vector<std::vector<double>> &n 2D vector of strikes (per tenor).nstrike_type : StrikeTypen Type of strike to use. See StrikeType for available options.nnReturnsn——-nstd::vector<std::vector<double>>n 2D vector of prices.n

price( (StochasticProcessPricer)arg1, (StochasticProcess)process, (float)expiration, (float)strike [, (StrikeType)strike_type=otyca_cpp.StrikeType.LOG_STRIKE]) -> float :

Prices for multiple tenors and strike sets.nnParametersn———-nstochastic_process : const StochasticProcess *n Pointer to the stochastic process model.ntenors : const std::vector<double> &n Vector of tenors.nstrikes : const std::vector<std::vector<double>> &n 2D vector of strikes (per tenor).nstrike_type : StrikeTypen Type of strike to use. See StrikeType for available options.nnReturnsn——-nstd::vector<std::vector<double>>n 2D vector of prices.n

class otyca_cpp.StrikeType

Bases: enum

DELTA = otyca_cpp.StrikeType.DELTA
LOG_STRIKE = otyca_cpp.StrikeType.LOG_STRIKE
STDEV = otyca_cpp.StrikeType.STDEV
STRIKE = otyca_cpp.StrikeType.STRIKE
names = {'DELTA': otyca_cpp.StrikeType.DELTA, 'LOG_STRIKE': otyca_cpp.StrikeType.LOG_STRIKE, 'STDEV': otyca_cpp.StrikeType.STDEV, 'STRIKE': otyca_cpp.StrikeType.STRIKE}
values = {0: otyca_cpp.StrikeType.LOG_STRIKE, 1: otyca_cpp.StrikeType.STRIKE, 2: otyca_cpp.StrikeType.DELTA, 3: otyca_cpp.StrikeType.STDEV}
class otyca_cpp.TenorCalculator

Bases: instance

tenor((TenorCalculator)arg1, (object)arg2, (object)arg3) float
class otyca_cpp.TermStructure

Bases: instance

Abstract base class representing a term structure of rates. A TermStructure provides methods to retrieve term and forward estimates or rates as a function of time. Derived classes must implement the term_estimate function.

forward_rate((TermStructure)arg1, (float)arg2, (float)arg3) float :

Returns the forward rate (value of the forward estimate) between two times. This is a convenience method that calls forward_estimate(t1, t2) and returns its value.nnParametersn———-nt1 : doublen The start time.nt2 : doublen The end time.nnReturnsn——-ndoublen The forward rate value between t1 and t2.n

term_rate((TermStructure)arg1, (float)arg2) float :

Returns the term rate (value of the term estimate) at a given time. This is a convenience method that calls term_estimate(t) and returns its value.nnParametersn———-nt : doublen The time at which to evaluate the term rate.nnReturnsn——-ndoublen The rate value at time t.n

class otyca_cpp.TimeBoundedBimodalGaussian

Bases: TimeBoundedJump, BimodalGaussian

class otyca_cpp.TimeBoundedJump

Bases: instance

property tau_hi
property tau_lo
class otyca_cpp.TimeChangeProcess

Bases: ModelBase

Abstract base class for time change processes. A time change process is a mathematical model that modifies time or time steps in Levy processes. This class defines the interface for time change processes used in pricing and risk management.

compare_d_phi_d_p((TimeChangeProcess)arg1, (object)arg2, (object)arg3, (object)arg4, (float)arg5, (float)arg6) bool :

Compare the derivative of the Laplace transform with respect to parameters against a finite difference approximation. This method checks if the analytical derivative of the Laplace transform with respect to parameters matches the finite difference approximation within a specified tolerance.nnParametersn———-nt : const arma::rowvec &n The time vector for which the Laplace transform is computed.nu : const arma::cx_colvec &n Complex-valued column vector of Fourier arguments.npsi : const arma::cx_colvec &n The characteristic exponent.nh : doublen The step size for finite differences (default: 1e-6).ntolerance : doublen The tolerance for comparison (default: 1e-6).nnReturnsn——-nbooln true if the derivatives are within the tolerance, false otherwise.n

compare_d_phi_d_psi((TimeChangeProcess)arg1, (object)arg2, (object)arg3, (object)arg4, (float)arg5, (float)arg6) bool :

Compare the derivative of the Laplace transform with respect to psi against a finite difference approximation. This method checks if the analytical derivative of the Laplace transform with respect to psi matches the finite difference approximation within a specified tolerance.nnParametersn———-nt : const arma::rowvec &n The time vector.nu : const arma::cx_colvec &n Complex-valued column vector of Fourier arguments.npsi : const arma::cx_colvec &n The characteristic exponent.nh : doublen The step size for finite differences (default: 1e-6).ntolerance : doublen The tolerance for comparison (default: 1e-6).nnReturnsn——-nbooln true if the derivatives are within the tolerance, false otherwise.n

d_phi_d_p_finite_difference((TimeChangeProcess)arg1, (object)arg2, (object)arg3, (object)arg4, (float)arg5) object :

Compute the derivative of the Laplace transform with respect to parameters using finite differences. This method approximates the derivative of the Laplace transform with respect to parameters using finite differences.nnParametersn———-nt : const arma::rowvec &n The time vector for which the Laplace transform is computed.nu : const arma::cx_colvec &n Complex-valued column vector of Fourier arguments.npsi : const arma::cx_colvec &n The characteristic exponent.nh : doublen The step size for finite differences (default: 1e-6).nnReturnsn——-nstd::vector<arma::cx_mat>n A vector that contains the finite difference approximations of the derivatives of characteristic function with respect to parameters.n

d_phi_d_psi_finite_difference((TimeChangeProcess)arg1, (object)arg2, (object)arg3, (object)arg4, (float)arg5) object :

Compute the derivative of the Laplace transform with respect to psi using finite differences. This method approximates the derivative of the Laplace transform with respect to psi using finite differences.nnParametersn———-nt : const arma::rowvec &n The time vector for which the Laplace transform is computed.nu : const arma::cx_colvec &n Complex-valued column vector of Fourier arguments.npsi : const arma::cx_colvec &n The characteristic exponent.nh : doublen The step size for finite differences (default: 1e-6).nnReturnsn——-narma::cx_matn The finite difference approximation of the derivative of characteristic function with respect to psi.n

class otyca_cpp.TimeChangeProcessFactory

Bases: instance

A factory class to create instances of TimeChangeProcess. The TimeChangeProcessFactory class provides a static method to create instances of the TimeChangeProcess class based on the specification of the time change process. TimeChangeProcess

create_time_change_process((str)arg1) TimeChangeProcess :

Creates a TimeChangeProcess object based on a string specification. This static method creates a new TimeChangeProcess object based on the given string that specifies the time change process.nnParametersn———-ntime_change : const std::string &n A string that defines the time change process. supported time change procsses are:nnReturnsn——-nstd::shared_ptr<TimeChangeProcess>n A shared pointer to a new TimeChangeProcess object.n

class otyca_cpp.TimeChangedLevyProcess

Bases: StochasticProcess

Represents a time-changed Lévy process, where a base Lévy process is evaluated at a stochastic clock. This class composes a Lévy process with a time change process to model a wider range of stochastic behaviors. It supports computing characteristic functions, their derivatives, and various parameter manipulations.

get_levy_process((TimeChangedLevyProcess)arg1) LevyProcess :

Get the underlying Lévy process.nnReturnsn——-nstd::shared_ptr<LevyProcess>n A shared pointer to the Lévy process.n

get_time_change((TimeChangedLevyProcess)arg1) TimeChangeProcess :

Get the time change process.nnReturnsn——-nstd::shared_ptr<TimeChangeProcess>n A shared pointer to the time change process.n

set_levy_process((TimeChangedLevyProcess)arg1, (LevyProcess)arg2) None :

Set the underlying Lévy process.nnParametersn———-np : std::shared_ptr<LevyProcess>n Shared pointer to the new Lévy process.

set_time_change((TimeChangedLevyProcess)arg1, (TimeChangeProcess)arg2) None :

Set the time change process.nnParametersn———-np : std::shared_ptr<TimeChangeProcess>n Shared pointer to the new time change process.

class otyca_cpp.TimeChangedLevyProcessFactory

Bases: instance

create_time_changed_levy_process((object)arg1, (str)arg2) TimeChangedLevyProcess :

Create process with levy components and time change

create_time_changed_levy_process( (str)arg1) -> TimeChangedLevyProcess :

Create process with specification

class otyca_cpp.TimeDeltaDividendSchedule

Bases: instance

A template class that represents a schedule with time points as keys. This class stores values of type T, indexed by time, and provides methods to add, generate, accumulate, extrapolate, and scatter values. The type of T is TimeDeltaDividend.

add((TimeDeltaDividendSchedule)arg1, (object)arg2, (object)arg3) bool :

Add a value at a specific time point.nnParametersn———-nt : const boost::posix_time::ptime &n The time point at which the value is added.nv : const T &n The value to be added.nnReturnsn——-nbooln True if the value was added successfully, false otherwise.n

extrapolate((TimeDeltaDividendSchedule)arg1, (object)arg2) None :

Extrapolate values to a specified end time using a given gap.nnParametersn———-nend : const boost::posix_time::ptime &n The end time to extrapolate to.ngap : const boost::posix_time::time_duration &n The time gap between each extrapolated value.nvalue : const T &n The value to be assigned to the extrapolated time points.

scatter((TimeDeltaDividendSchedule)arg1, (object)arg2, (TenorCalculator)arg3, (object)arg4) None :

Scatter values based on a reference time using a tenor calculator. This method calculates the tenor between the reference time and each time point, adding the corresponding value to the output scatter.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time used to calculate tenor.nf : const TenorCalculator *n The tenor calculator.nout : Scatter<T> &n The scatter object where the results are stored.

size((TimeDeltaDividendSchedule)arg1) int
to_dict((TimeDeltaDividendSchedule)arg1) object :

Convert the schedule to a regular map.nnReturnsn——-nstd::map<boost::posix_time::ptime, T>n A map with time points as keys and values of type T.n

class otyca_cpp.TimeDeltaFloatSchedule

Bases: instance

A template class that represents a schedule with time points as keys. This class stores values of type T, indexed by time, and provides methods to add, generate, accumulate, extrapolate, and scatter values. The type of T is TimeDeltaFloat.

add((TimeDeltaFloatSchedule)arg1, (object)arg2, (object)arg3) bool :

Add a value at a specific time point.nnParametersn———-nt : const boost::posix_time::ptime &n The time point at which the value is added.nv : const T &n The value to be added.nnReturnsn——-nbooln True if the value was added successfully, false otherwise.n

extrapolate((TimeDeltaFloatSchedule)arg1, (object)arg2) None :

Extrapolate values to a specified end time using a given gap.nnParametersn———-nend : const boost::posix_time::ptime &n The end time to extrapolate to.ngap : const boost::posix_time::time_duration &n The time gap between each extrapolated value.nvalue : const T &n The value to be assigned to the extrapolated time points.

scatter((TimeDeltaFloatSchedule)arg1, (object)arg2, (TenorCalculator)arg3, (object)arg4) None :

Scatter values based on a reference time using a tenor calculator. This method calculates the tenor between the reference time and each time point, adding the corresponding value to the output scatter.nnParametersn———-nreference_time : const boost::posix_time::ptime &n The reference time used to calculate tenor.nf : const TenorCalculator *n The tenor calculator.nout : Scatter<T> &n The scatter object where the results are stored.

size((TimeDeltaFloatSchedule)arg1) int
to_dict((TimeDeltaFloatSchedule)arg1) object :

Convert the schedule to a regular map.nnReturnsn——-nstd::map<boost::posix_time::ptime, T>n A map with time points as keys and values of type T.n

class otyca_cpp.TimeFixedBimodalGaussian

Bases: TimeFixedJump, BimodalGaussian

class otyca_cpp.TimeFixedJump

Bases: instance

property tau
class otyca_cpp.TimeValueFourierTransform

Bases: FourierTransform

Fourier transform of option time value.

class otyca_cpp.TradingCalendar

Bases: instance

Utility class for determining trading days, holidays, and related calendar computations.

calendar_days((object)arg1, (object)arg2) int :

Computes the total number of calendar days between two dates.nnParametersn———-nstart : const boost::gregorian::date &n Start date (inclusive).nend : const boost::gregorian::date &n End date (exclusive).nnReturnsn——-nintn Total number of calendar days.n

day_of_week_days((object)arg1, (object)arg2, (int)arg3) int :

Counts the number of specific weekday occurrences between two dates.nnParametersn———-nstart : const boost::gregorian::date &n Start date (inclusive).nend : const boost::gregorian::date &n End date (exclusive).nday_of_week : intn 0 = Sunday, …, 6 = Saturday.nnReturnsn——-nintn Number of days matching the specified weekday.n

effective_dividend_time_for_early_exercise((object)arg1) object :

Returns the effective dividend time relevant for early exercise logic.nnParametersn———-nd : const boost::gregorian::date &n The reference date.nnReturnsn——-nboost::posix_time::ptimen The timestamp representing the dividend time.n

get_holidays() object :

Returns the list of holiday dates.nnReturnsn——-nstd::vector<boost::gregorian::date>n Vector of holiday dates.n

half_trade_day((object)arg1) bool :

Checks if a date is a half trading day.nnParametersn———-nday : const boost::gregorian::date &n The date to check.nnReturnsn——-nbooln True if the date is a half trading day.n

holiday((object)arg1) bool :

Checks whether a date is a recognized holiday.nnParametersn———-nday : const boost::gregorian::date &n The date to check.nnReturnsn——-nbooln True if the date is a holiday.n

next_to_non_trade_day((object)arg1) bool :

Checks if a given day is adjacent to a non-trading day.nnParametersn———-nday : const boost::gregorian::date &n The date to check.nnReturnsn——-nbooln True if the previous or next day is a non-trade day.n

non_trade_day((object)arg1) bool :

Checks whether a given day is a non-trade day (weekend or holiday).nnParametersn———-nday : const boost::gregorian::date &n The date to check.nnReturnsn——-nbooln True if the date is a non-trade day.n

non_trade_days((object)arg1, (object)arg2) int :

Computes the number of non-trading days between two dates.nnParametersn———-nstart : const boost::gregorian::date &n Start date (inclusive).nend : const boost::gregorian::date &n End date (exclusive).nnReturnsn——-nintn The number of non-trading days.n

post_holidays((object)arg1, (object)arg2) int :

Counts the number of days immediately after holidays in a range.nnParametersn———-nstart : const boost::gregorian::date &n Start date (inclusive).nend : const boost::gregorian::date &n End date (exclusive).nnReturnsn——-nintn Number of post-holiday days.n

pre_holidays((object)arg1, (object)arg2) int :

Counts the number of days immediately before holidays in a range.nnParametersn———-nstart : const boost::gregorian::date &n Start date (inclusive).nend : const boost::gregorian::date &n End date (exclusive).nnReturnsn——-nintn Number of pre-holiday days.n

previous_trade_date((object)arg1) object :

Gets the last trading day before a given date.nnParametersn———-nd : const boost::gregorian::date &n The reference date.nnReturnsn——-nboost::gregorian::daten The previous trading day.n

previous_trade_day_cutoff((object)arg1) object :

Gets the market cutoff time on the previous trading day before the given date.nnParametersn———-nd : const boost::gregorian::date &n The reference date.nnReturnsn——-nboost::posix_time::ptimen Time of market close on the previous trade day.n

set_holidays((TradingCalendar)arg1, (object)arg2) None :

Sets the holiday calendar and sorts it.nnParametersn———-nholidays : const std::vector<boost::gregorian::date> &n List of dates to set as holidays.

trade_dates((object)arg1, (object)arg2) object :

Retrieves a list of all trade dates between two dates.nnParametersn———-nstart : const boost::gregorian::date &n Start date (inclusive).nend : const boost::gregorian::date &n End date (exclusive).nnReturnsn——-nstd::vector<boost::gregorian::date>n Vector of trade dates.n

trade_day((object)arg1) bool :

Checks if a given day is a valid trade day.nnParametersn———-nday : const boost::gregorian::date &n The date to check.nnReturnsn——-nbooln True if the date is not a weekend or holiday.n

trade_day_offset((object)arg1, (int)arg2) object :

Returns the trade day that is a given number of trade days from the specified day.nnParametersn———-nday : const boost::gregorian::date &n The reference date.ntrade_offset : intn The number of trade days to offset.nnReturnsn——-nboost::gregorian::daten The resulting trade date.n

trade_days((object)arg1, (object)arg2) int :

Computes the number of trading days between two dates.nnParametersn———-nfirst_day : const boost::gregorian::date &n Start date (inclusive).nlast_day : const boost::gregorian::date &n End date (exclusive).nnReturnsn——-nintn Number of trading days.n

trade_days_to_calendar_days((object)arg1, (int)arg2) int :

Converts a trade day offset into calendar day offset.nnParametersn———-nday : const boost::gregorian::date &n Starting date.ntrade_offset : intn Number of trade days to move.nnReturnsn——-nintn Number of calendar days between start and resulting trade day.n

weekend((object)arg1) bool :

Checks if a date is a weekend (Saturday or Sunday).nnParametersn———-nday : const boost::gregorian::date &n The date to check.nnReturnsn——-nbooln True if it’s Saturday or Sunday.n

class otyca_cpp.TreeType

Bases: enum

CRR = otyca_cpp.TreeType.CRR
DCRR = otyca_cpp.TreeType.DCRR
JR = otyca_cpp.TreeType.JR
LR = otyca_cpp.TreeType.LR
TIAN = otyca_cpp.TreeType.TIAN
names = {'CRR': otyca_cpp.TreeType.CRR, 'DCRR': otyca_cpp.TreeType.DCRR, 'JR': otyca_cpp.TreeType.JR, 'LR': otyca_cpp.TreeType.LR, 'TIAN': otyca_cpp.TreeType.TIAN}
values = {0: otyca_cpp.TreeType.CRR, 1: otyca_cpp.TreeType.JR, 2: otyca_cpp.TreeType.TIAN, 3: otyca_cpp.TreeType.LR, 4: otyca_cpp.TreeType.DCRR}
class otyca_cpp.UnderlyingDataset

Bases: instance

A comprehensive dataset for option pricing and analysis on an underlying security. The UnderlyingDataset class provides a complete framework for managing, analyzing, and modeling option data for a specific underlying security. It stores and processes: Underlying security price information Dividend schedules and projections Option expirations and strikes Interest rate and borrowing cost curves Volatility term structures and models Stochastic processes for option pricing Event schedules for market events This class serves as the central repository for all data required for sophisticated option pricing, volatility surface modeling, and risk analysis. This class uses the POSIX time library for handling dates and times. It implements the enable_shared_from_this pattern for safe shared_ptr management.

add_composite_stochastic_process_config((UnderlyingDataset)arg1, (CompositeStochasticProcessConfig)arg2) int :

Adds a composite stochastic process configuration.nnParametersn———-nconfig : const CompositeStochasticProcessConfig &n The composite stochastic process configuration.nnReturnsn——-nsize_tn The ID of the added configuration.n

add_projected_dividend((UnderlyingDataset)arg1, (object)arg2, (float)arg3, (float)arg4, (int)arg5) None :

Adds a projected dividend to the dataset.nnParametersn———-nex_date : const boost::gregorian::date &n The ex-dividend date.nfixed : doublen The fixed dividend amount.nproportional : doublen The proportional dividend amount (default: 0).nex_date_uncertainty : intn The uncertainty in the ex-dividend date (default: 0).

create_option((UnderlyingDataset)arg1, (object)arg2, (float)arg3, (OptionType)arg4) Option :

Creates an option contract with the specified parameters.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The expiration date of the option.nstrike : doublen The strike price of the option.ntype : OptionTypen The type of option (call or put).nnReturnsn——-nstd::shared_ptr<Option>n A shared pointer to the created option.n

create_underlying((UnderlyingDataset)arg1) Security :

Creates the underlying security.nnReturnsn——-nstd::shared_ptr<Security>n A shared pointer to the created security.n

get_bounded_bimodal_gaussian((UnderlyingDataset)arg1) object :

Retrieves the bounded bimodal Gaussian model.nnReturnsn——-nstd::shared_ptr<BoundedSchedule<std::shared_ptr<TimeBoundedBimodalGaussian>>>n A shared pointer to the bounded bimodal Gaussian model.n

get_composite_stochastic_process((UnderlyingDataset)arg1, (int)arg2) CompositeStochasticProcess :

Retrieves the composite stochastic process associated with the given ID.nnParametersn———-nid : size_tn The ID of the stochastic process.nnReturnsn——-nstd::shared_ptr<CompositeStochasticProcess>n A shared pointer to the composite stochastic process.n

get_composite_stochastic_process_volatility_grid((UnderlyingDataset)arg1, (int)arg2) object :

Gets the volatility grid for the specified composite stochastic process.nnParametersn———-nid : size_tn The ID of the stochastic process.nnReturnsn——-nstd::vector<std::vector<double>>n A 2D vector containing the volatility grid values.n

get_composite_stochastic_process_volatility_grids((UnderlyingDataset)arg1) object :

Retrieves the composite stochastic process volatility grids.nnReturnsn——-nstd::vector<std::vector<std::vector<double>>>n A 3D vector containing volatility grids. The first dimension is in stochastic processes. The second dimension is in tenors. The third dimension is in deltas.n

get_composite_stochastic_processes((UnderlyingDataset)arg1) object :

Retrieves all composite stochastic processes.nnReturnsn——-nstd::vector<std::shared_ptr<CompositeStochasticProcess>>n A vector of shared pointers to composite stochastic processes.n

get_dividend_schedule((UnderlyingDataset)arg1) DividendSchedule :

Retrieves the dividend schedule.nnReturnsn——-nstd::shared_ptr<Schedule<Dividend>>n A shared pointer to the schedule of dividends.n

get_event_free_composite_stochastic_process_volatility_grid((UnderlyingDataset)arg1, (int)arg2) object :

Gets the volatility grid for the event free version of the specified composite stochastic process.nnParametersn———-nid : size_tn The ID of the stochastic process.nnReturnsn——-nstd::vector<std::vector<double>>n A 2D vector containing the volatility grid values.n

get_event_free_composite_stochastic_process_volatility_grids((UnderlyingDataset)arg1) object :

Retrieves the event free version of composite stochastic process volatility grids.nnReturnsn——-nstd::vector<std::vector<std::vector<double>>>n A 3D vector containing volatility grids. The first dimension is in stochastic processes. The second dimension is in tenors. The third dimension is in deltas.n

get_expiration_volatility_model_dataframe((UnderlyingDataset)arg1) object :

Retrieves the expiration volatility model data.nnReturnsn——-nstd::tuple<std::vector<boost::posix_time::ptime>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of expiration dates, labels, and a 2D vector of volatility model values.n

get_expirations((UnderlyingDataset)arg1) object :

Retrieves the list of option expiration datetime.nnReturnsn——-nstd::vector<boost::posix_time::ptime>n A vector of expiration datetime.n

get_implied_event_schedule((UnderlyingDataset)arg1) EventBoundedSchedule :

Retrieves the implied event schedule.nnReturnsn——-nstd::shared_ptr<BoundedSchedule<Event>>n A shared pointer to the implied event schedule.n

get_jointly_implied_interest_borrow_forward_dataframe((UnderlyingDataset)arg1) object :

Retrieves the implied interest and borrow rate data.nnReturnsn——-nstd::tuple<std::vector<boost::posix_time::ptime>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of dates, labels, and a 2D vector of implied interest and borrow rate values.n

get_option_expiration((UnderlyingDataset)arg1, (object)arg2) OptionExpiration :

Retrieves the option expiration object for a given expiration datetime.nnParametersn———-nexpiration : const boost::posix_time::ptime &n The expiration datetime.nnReturnsn——-nstd::shared_ptr<OptionExpiration>n A shared pointer to the corresponding OptionExpiration object.n

get_option_expiration_dataframe((UnderlyingDataset)arg1) object :

Retrieves the option expiration data in a structured format.nnReturnsn——-nstd::tuple<std::vector<boost::posix_time::ptime>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of expiration dates, labels, and a 2D vector of expiration-related values.n

get_option_expirations((UnderlyingDataset)arg1[, (object)arg2]) object
get_option_implied_volatility_dataframe((UnderlyingDataset)arg1) object :

Retrieves the bid-ask implied volatility data for options.nnReturnsn——-nstd::tuple<std::vector<std::string>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of column names, row names, and a 2D vector of bid-ask implied volatilities.n

get_option_pricing_dataframe((UnderlyingDataset)arg1) object :

Retrieves the option pricing data in a structured format.nnReturnsn——-nstd::tuple<std::vector<std::string>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of column names, row names, and a 2D vector of option pricing values.n

get_option_strikes((UnderlyingDataset)arg1) object :

Retrieves all option strikes in the dataset.nnReturnsn——-nstd::vector<std::shared_ptr<OptionStrike>>n A vector of shared pointers to OptionStrike objects.n

get_options((UnderlyingDataset)arg1) object :

Retrieves all option contracts associated with the dataset.nnReturnsn——-nstd::vector<std::shared_ptr<Option>>n A vector of shared pointers to Option objects.n

get_stochastic_process_option_expiration_dataframe((UnderlyingDataset)arg1, (CompositeStochasticProcess)arg2) object :

Retrieves the option expiration data for a stochastic process.nnParametersn———-nstochastic_process : std::shared_ptr<const StochasticProcess>n A shared pointer to the stochastic process.nnReturnsn——-nstd::tuple<std::vector<boost::posix_time::ptime>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of expiration dates, labels, and a 2D vector of expiration-related values.n

get_stochastic_process_option_expiration_volatility_grid_dataframe((UnderlyingDataset)arg1, (CompositeStochasticProcess)arg2) object :

Retrieves the volatility grid for option expirations of a stochastic process.nnParametersn———-nstochastic_process : std::shared_ptr<const StochasticProcess>n A shared pointer to the stochastic process.nnReturnsn——-nstd::tuple<std::vector<boost::posix_time::ptime>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of expiration dates, labels, and a 2D vector of volatility values.n

get_stochastic_process_option_strike_volatilities((UnderlyingDataset)arg1, (StochasticProcess)arg2) object :

Retrieves option strike volatilities for a given stochastic process.nnParametersn———-nstochastic_process : const std::shared_ptr<StochasticProcess>n A shared pointer to the stochastic process.nnReturnsn——-nstd::map<std::shared_ptr<OptionStrike>, double>n A map associating option strikes with their corresponding volatilities.n

get_stochastic_process_volatility_grid_dataframe((UnderlyingDataset)arg1, (CompositeStochasticProcess)arg2) object :

Retrieves the stochastic process volatility grid for a given stochastic process.nnParametersn———-nstochastic_process : const std::shared_ptr<const StochasticProcess> &n A shared pointer to the stochastic process.nnReturnsn——-nstd::tuple<std::vector<std::string>, std::vector<std::string>, std::vector<std::vector<double>>>n A tuple containing vectors of column names, row names, and a 2D vector of volatility values.n

get_underlying((UnderlyingDataset)arg1) Security :

Gets the underlying security.nnReturnsn——-nstd::shared_ptr<Security>n A shared pointer to the underlying security.n

get_underlying_price((UnderlyingDataset)arg1) float :

Retrieves the price of the underlying asset.nnReturnsn——-ndoublen The underlying price.n

get_variance_schedule((UnderlyingDataset)arg1) EstimateSchedule :

Retrieves the variance schedule.nnReturnsn——-nstd::shared_ptr<Schedule<Estimate>>n A shared pointer to the variance schedule.n

get_variance_tenor_calculator((UnderlyingDataset)arg1) TenorCalculator :

Gets the variance tenor calculator.nnReturnsn——-nstd::shared_ptr<TenorCalculator>n A shared pointer to the TenorCalculator instance.n

get_variance_term_structure_model((UnderlyingDataset)arg1) object :

Retrieves the variance term structure model.nnReturnsn——-nstd::shared_ptr<BumpModel>n A shared pointer to the variance term structure model.n

get_yield_curve((UnderlyingDataset)arg1) PieceWiseYieldCurve :

Retrieves the yield curve.nnReturnsn——-nstd::shared_ptr<PieceWiseYieldCurve>n A shared pointer to the yield curve.n

set_borrow_curve((UnderlyingDataset)arg1, (PieceWiseYieldCurve)arg2) None :

Sets the borrow curve.nnParametersn———-nborrow_curve : std::shared_ptr<PieceWiseYieldCurve>n A shared pointer to the new borrow curve.

set_exercise_settlement_lag((UnderlyingDataset)arg1, (int)arg2) None :

Sets the exercise settlement lag.nnParametersn———-nlag : intn The exercise settlement lag in days.

set_option_settlement_lag((UnderlyingDataset)arg1, (int)arg2) None :

Sets the option settlement lag.nnParametersn———-noption_settlement_lag : intn The settlement lag in days.

set_option_style((UnderlyingDataset)arg1, (OptionStyle)arg2) None :

Sets the option style (e.g., European, American).nnParametersn———-nstyle : OptionStylen The option style to be set.

set_underlying((UnderlyingDataset)arg1, (Security)arg2) None :

Sets the underlying security.nnParametersn———-nund : const std::shared_ptr<Security> &n A shared pointer to the underlying security.

set_underlying_settlement_lag((UnderlyingDataset)arg1, (int)arg2) None :

Sets the underlying asset settlement lag.nnParametersn———-nunderlying_settlement_lag : intn The settlement lag in days.

set_valuation_time((UnderlyingDataset)arg1, (object)arg2) None :

Sets the valuation time. Change of valuation time does NOT automatically change the settlement lags.nnParametersn———-nvaluation_time : const boost::posix_time::ptime &n The new valuation time.

set_variance_tenor_calculator((UnderlyingDataset)arg1, (TenorCalculator)arg2) None :

Sets the variance tenor calculator.nnParametersn———-nvariance_tenor_calculator : std::shared_ptr<TenorCalculator>n A shared pointer to the TenorCalculator instance.

set_yield_curve((UnderlyingDataset)arg1, (PieceWiseYieldCurve)arg2) None :

Sets the yield curve.nnParametersn———-nyield_curve : std::shared_ptr<PieceWiseYieldCurve>n A shared pointer to the new yield curve.

setup((UnderlyingDataset)arg1) None :

Performs setup operations for the object. Need to be called after all setters and before all getters.

class otyca_cpp.VarianceGamma

Bases: LevyProcess

Represents the Variance Gamma (VG) stochastic process. The Variance Gamma process is a pure jump process with infinite activity and finite variation, used to model returns with heavy tails and skewness, beyond what standard Brownian motion allows. The VG process can be constructed by evaluating Brownian motion with drift at random times given by a Gamma process. The Variance Gamma process has no diffusion component; all randomness comes from jumps. The Variance Gamma Process and Option Pricing, Dilip B. Madan, Peter P. Carr, Eric C. Chang, 1998

property nu

variance rate of the gamma time change.

property sigma

brownian motion variance, controls the spread (scale) of returns.

property theta

brownian motion drift, controls the asymmetry (skewness) of the return distribution.

class otyca_cpp.VolatilitySmile

Bases: Model1

Base class for volatility smile models. Handle log relative strike to z2 conversion.

class otyca_cpp.VolatilityType

Bases: enum

FORWARD_VOLATILITY = otyca_cpp.VolatilityType.FORWARD_VOLATILITY
SPOT_VOLATILITY = otyca_cpp.VolatilityType.SPOT_VOLATILITY
names = {'FORWARD_VOLATILITY': otyca_cpp.VolatilityType.FORWARD_VOLATILITY, 'SPOT_VOLATILITY': otyca_cpp.VolatilityType.SPOT_VOLATILITY}
values = {0: otyca_cpp.VolatilityType.SPOT_VOLATILITY, 1: otyca_cpp.VolatilityType.FORWARD_VOLATILITY}
class otyca_cpp.YieldCurve

Bases: TermStructure

Represents a yield curve, modeling the relationship between term and interest rates. Inherits from the TermStructure base class and provides methods to compute discount and growth factors based on the term rate.

discount_factor((YieldCurve)arg1, (float)arg2) float :

Computes the discount factor for a given time to maturity. The discount factor is calculated using the formula: D(t) = exp(-r(t) * t) where r(t) is the term rate at time t.nnParametersn———-nt : doublen Time to maturity.nnReturnsn——-ndoublen The discount factor.n

growth_factor((YieldCurve)arg1, (float)arg2) float :

Computes the growth factor for a given time to maturity. The growth factor is calculated using the formula: G(t) = exp(r(t) * t) where r(t) is the term rate at time t.nnParametersn———-nt : doublen Time to maturity.nnReturnsn——-ndoublen The growth factor.n

otyca_cpp.from_iso_string((str)arg1) object :

From non delimited iso form string

otyca_cpp.from_simple_string((str)arg1) object :

from YYYY-mmm-DD string where mmm is a 3 char month name.

otyca_cpp.from_string((str)arg1) object :

From delimited date string where with order iso standard ordering: year-month-day (eg: 2002-1-25)

otyca_cpp.from_undelimited_string((str)arg1) object :

From iso type date string where with order year-month-day eg: 20020125

otyca_cpp.from_us_string((str)arg1) object :

A delimited date string where with order month-day-year eg: 1-25-2002

otyca_cpp.get_delta_grid() object :

Retrieves the delta grid used for volatility grid.nnReturnsn——-nstd::tuple<std::vector<std::string>, std::vector<double>>n A tuple containing a vector of delta labels (e.g., "10D", "20D") and a vector of corresponding numerical delta values.n

otyca_cpp.get_tenor_grid() object :

Retrieves the tenor grid used for volatility grid.nnReturnsn——-nstd::tuple<std::vector<std::string>, std::vector<double>>n A tuple containing a vector of tenor labels (e.g., "1w", "1m") and a vector of corresponding numerical tenor values in years.n

otyca_cpp.time_from_string((str)arg1) object :

From delimited string

otyca_cpp.version() str :

Retrieves the version of the library. This function returns a string representing the current version of the library in this format: "major.minor.patch"nnReturnsn——-nstd::stringn A string containing the version of the library.n