<kiyosi/instruments/asian.hpp>
#include <kiyosi/instruments/asian.hpp>GeometricAveragePriceOption
using kiyosi::GeometricAveragePriceOption = AveragePriceOption<GeometricAveraging>Average-price option using geometric averaging.
ArithmeticAveragePriceOption
using kiyosi::ArithmeticAveragePriceOption = AveragePriceOption<ArithmeticAveraging>Average-price option using arithmetic averaging.
default_realized_average
double kiyosi::default_realized_averageDefault realized average for a contract whose averaging has not begun.
make_average_option
template <AveragingConvention Averaging>
Result<AveragePriceOption<Averaging>> kiyosi::make_average_option(OptionType option_type, double strike, Date effective_date, Date averaging_start_date, Date expiry_date, double realized_average)Date arguments are ordered effective_date, averaging_start_date, expiry_date; valid terms satisfy effective_date <= averaging_start_date <= expiry_date. Equal averaging start and expiry dates denote a single fixing at expiry. 模板参数
Averaging—GeometricAveragingorArithmeticAveraging.
返回值: The option, or an input-validation error.
make_geometric_average_option
Result<GeometricAveragePriceOption> kiyosi::make_geometric_average_option(OptionType option_type, double strike, Date effective_date, Date averaging_start_date, Date expiry_date, double realized_average=default_realized_average)Creates a geometric-average option; dates follow make_average_option ordering. 返回值: The option, or an input-validation error.
make_arithmetic_average_option
Result<ArithmeticAveragePriceOption> kiyosi::make_arithmetic_average_option(OptionType option_type, double strike, Date effective_date, Date averaging_start_date, Date expiry_date, double realized_average=default_realized_average)Creates an arithmetic-average option; dates follow make_average_option ordering. 返回值: The option, or an input-validation error.
kiyosi::ArithmeticAveraging
struct kiyosi::ArithmeticAveragingTag selecting arithmetic averaging.
kiyosi::AveragePriceOption
template <AveragingConvention Averaging>
class kiyosi::AveragePriceOptionAverage-rate option; Averaging distinguishes the geometric and arithmetic conventions.
成员
replace
Result<AveragePriceOption> kiyosi::AveragePriceOption<Averaging>::replace(double realized_average) constReturns a validated owning copy with only the supplied history replaced. Preserves all contract terms and never changes this object, including on failure. History is caller-supplied; time consistency is checked during pricing. Concurrent calls and reads are safe without concurrent assignment or mutation. Uses constructor validation and error categories; zero is a known value, not unknown history.
option_type
OptionType kiyosi::AveragePriceOption<Averaging>::option_type() const noexceptReturns the call-or-put direction.
strike
double kiyosi::AveragePriceOption<Averaging>::strike() const noexceptReturns the positive strike price.
averaging_start_date
Date kiyosi::AveragePriceOption<Averaging>::averaging_start_date() const noexceptReturns the first date included in the average.
effective_date
Date kiyosi::AveragePriceOption<Averaging>::effective_date() const noexceptReturns the first date of the contract life.
realized_average
double kiyosi::AveragePriceOption<Averaging>::realized_average() const noexceptReturns the non-negative average realized before valuation.
expiry_date
Date kiyosi::AveragePriceOption<Averaging>::expiry_date() const noexceptReturns the final date of the contract life and averaging window.
kiyosi::GeometricAveraging
struct kiyosi::GeometricAveragingAveraging conventions; the tag selects the pricing engine overload.
kiyosi::AveragingConvention
template <typename Value>
concept kiyosi::AveragingConventionAveraging conventions whose semantics are defined by the core.