FinancePy

FinancePy API Reference

Black Scholes

financepy.models.black_scholes

Classes

BlackScholes

BlackScholes(volatility: float | numpy.ndarray, bs_type: financepy.utils.global_types.BlackScholesTypes = <BlackScholesTypes.DEFAULT: 0>, num_steps_per_year: int = 52, num_paths: int = 10000, seed: int = 42, use_sobol: bool = False, params: dict | None = None)
Inherits from: Model
Black-Scholes model class supporting several pricing methods.

Methods

value

value(self, spot_price: float, time_to_expiry: float, strike_price: float, risk_free_rate: float, dividend_rate: float, opt_type: financepy.utils.global_types.OptionTypes) -> float
Compute the option value using the selected Black-Scholes method.
Generated automatically from the FinancePy source code. Do not edit this file manually.