BaseTechnique#
Bases: ABC
Abstract base class for all pricing methodologies.
A technique defines the algorithm used to compute a price from the core 'atoms' (Option, Stock, Rate) and a given financial 'Model'.
Source code in src/quantfin/techniques/base/base_technique.py
price(option: Option | np.ndarray, stock: Stock, model: BaseModel, rate: Rate, **kwargs) -> PricingResult | np.ndarray
abstractmethod
#
Calculate the price of an option.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
option
|
Option | ndarray
|
The option contract(s) to be priced. |
required |
stock
|
Stock
|
The underlying asset's properties. |
required |
model
|
BaseModel
|
The financial model to use for the calculation. |
required |
rate
|
Rate
|
The risk-free rate structure. |
required |
**kwargs
|
Any
|
Additional keyword arguments required by specific techniques or models. |
{}
|
Returns:
Type | Description |
---|---|
PricingResult
|
An object containing the calculated price and potentially other metrics. |