Finite Difference
financepy.models.finite_difference
Functions
black_scholes_fd
black_scholes_fd(spot_price, volatility, time_to_expiry, strike_price, risk_free_rate, dividend_yield, opt_type, num_steps_per_year=None, num_samples=2000, num_std=5, theta=0.5, wind=0, digital=False, smooth=False, update=False, return_grid=False)
No description available.
calculate_fd_matrix
calculate_fd_matrix(x, r, mu, var, dt, theta, wind=0)
1d finite difference solution for pdes of the form
0 = dV/dt + a V
a = -risk_free_rate + mu d/dx + 1/2 var d2/dx2
using the theta scheme
[1-theta dt a] V(t) = [1 + (1-theta) dt a] V(t+dt)
digital
digital(x, strike)
No description available.
fd_roll_backwards
fd_roll_backwards(res, theta, ai=None, ae=None)
No description available.
fd_roll_forwards
fd_roll_forwards(res, theta, ai=None, ae=None)
No description available.
fn_dx
fn_dx(x, wind=0)
No description available.
fn_dxx
fn_dxx(x)
No description available.
option_payoff
option_payoff(s, strike, smooth, dig, opt_type_int)
No description available.
smooth_call
smooth_call(xl, xu, strike)
No description available.
smooth_digital
smooth_digital(xl, xu, strike)
No description available.
validate_black_scholes_fd_inputs
validate_black_scholes_fd_inputs(spot_price, volatility, time_to_expiry, strike_price, risk_free_rate, dividend_yield, opt_type, num_steps_per_year, num_samples, num_std, theta, wind)
No description available.
Generated automatically from the FinancePy source code.
Do not edit this file manually.