Pricing
- rivapy.pricing.analytics.compute_european_price_Buehler(strike: float, maturity: float, volatility: float, is_call: bool = True) float [source]
Compute a call/put option price for the Buehler model (w.r.t. x-process), i.e. no dividends, rates etc. :param strike: strike :type strike: float :param maturity: maturity :type maturity: float :param volatility: volatility :type volatility: float :param is_call: if option is call or put :type is_call: bool
- Returns:
Black-Scholes call price
- Return type:
float
- rivapy.pricing.analytics.compute_implied_vol_Buehler(strike: float, maturity: float, price: float, min_vol=0.05, max_vol=2.0, is_call=True, **kwargs) float [source]
Computes the implied volatility for a given cal/putl price using brentq from scipy. It throws an exception if no implied vol can be determined.
- Parameters:
strike (float) – [description]
maturity (float) – [description]
price (float) – [description]
min_vol (float, optional) – [description]. Defaults to 0.05.
max_vol (float, optional) – [description]. Defaults to 2.0. is_call (bool): if option is call or put
- Returns:
[description]
- Return type:
float
- class rivapy.pricing.pricing_data.AmericanPdePricingData(val_date: datetime, spec, discount_curve, vol_surface, pricing_request: Iterable[ResultType], time_steps_year: int = 60, spot_steps: int = 200)[source]
Bases:
object
Constructor for AmericanPdePricingDate
- Parameters:
val_date ([datetime]) – Valuation date.
spec ([type]) – Specification
discount_curve ([type]) – Discount curve.
vol_surface ([type]) – Volatility surface.
pricing_request (Iterable[ResultType]) – Pricing request. Can be selected from rivapy.pricing.ResultType.
time_steps_year (int, optional) – [description]. Defaults to 60.
spot_steps (int, optional) – [description]. Defaults to 200.
- class rivapy.pricing.pricing_data.BasePricingData(pricer: str, pricing_request: PricingRequest)[source]
Bases:
object
- property pricer: str
Getter for configured pricer.
- Returns:
Configured pricer.
- Return type:
str
- property pricing_request
Getter for configured pricing request.
- Returns:
Configured pricing request.
- Return type:
PricingRequest
- class rivapy.pricing.pricing_data.Black76PricingData(val_date: datetime, spec, discount_curve, vol_surface, pricing_request: Iterable[ResultType])[source]
Bases:
object
Constructor for Black76PricingDate
- Parameters:
val_date ([datetime]) – Valuation date.
spec ([type]) – Specification.
discount_curve ([type]) – Discount curve.
vol_surface ([type]) – Volatility surface.
pricing_request (Iterable[ResultType]) – Pricing request. Can be selected from rivapy.pricing.ResultType.
- class rivapy.pricing.pricing_data.BondPricingData(bond: BondBaseSpecification, valuation_date: date | datetime, discount_curve: DiscountCurve, fixing_curve: DiscountCurve, parameters: BondPricingParameter, pricing_request: BondPricingRequest, pricer: str = 'BondPricer', past_fixing: float = None, survival_curve: SurvivalCurve = None, recovery_curve: BaseDatedCurve = None)[source]
Bases:
BasePricingData
- property bond
- property discount_curve
- property fixing_curve
- property parameters
- property past_fixing
- property recovery_curve
- property survival_curve
- property valuation_date
- class rivapy.pricing.pricing_data.CDSPricingData(spec: CDSSpecification, val_date, discount_curve, survival_curve, recovery_curve=None, integration_step=relativedelta(days=+30))[source]
Bases:
object