black scholes hedging sim
financepy.models.black_scholes_hedging_sim
Classes
HedgePathResult
HedgePathResult(
history: pandas.core.frame.DataFrame | None,
hedging_error: float,
terminal_stock_price: float,
option_payoff: float,
initial_option_value: float,
total_transaction_costs: float,
) -> None
Results from one delta-hedged European option path.
HedgeSimulationResult
HedgeSimulationResult(
hedging_errors: numpy.ndarray,
terminal_stock_prices: numpy.ndarray,
option_payoffs: numpy.ndarray,
transaction_costs: numpy.ndarray,
initial_option_value: float,
) -> None
Results from a multi-path delta-hedging simulation.
Methods
num_paths
No description available.
mean_hedging_error
No description available.
std_hedging_error
No description available.
rmse
No description available.
mean_transaction_cost
No description available.
summary
summary(
self,
) -> pandas.core.series.Series
No description available.
plot_hedging_error_vs_terminal_stock_price
plot_hedging_error_vs_terminal_stock_price(
self,
)
Plot terminal stock price against terminal hedging error.
Functions
simulate_hedge_paths
simulate_hedge_paths(
num_paths: int,
num_options: int,
option_type_int: int,
stock_price: float,
strike_price: float,
risk_free_rate: float,
dividend_yield: float,
implied_volatility: float,
realized_volatility: float,
time_to_expiry: float,
num_steps: int = 252,
stock_drift: float | None = None,
transaction_cost_rate: float = 0.0,
seed: int | None = None,
) -> HedgeSimulationResult
No description available.
simulate_single_hedge_path
simulate_single_hedge_path(
num_options: int,
option_type_int: int,
stock_price: float,
strike_price: float,
risk_free_rate: float,
dividend_yield: float,
implied_volatility: float,
realized_volatility: float,
time_to_expiry: float,
num_steps: int = 252,
stock_drift: float | None = None,
transaction_cost_rate: float = 0.0,
rng: numpy.random._generator.Generator | None = None,
store_history: bool = True,
) -> HedgePathResult
Simulate one delta-hedged European option path.
The hedge calculation itself is performed entirely by
_simulate_single_path_kernel().
Generated automatically from the FinancePy source code.
Do not edit this file manually.