bk tree
financepy.models.bk_tree
Class
BKTree
BKTree(
sigma: float,
a: float,
num_time_steps: int = 100,
shift: float = 0.0,
) -> None
No description available.
Methods
build_tree
build_tree(
self,
t_mat: float,
df_times: numpy.ndarray,
df_values: numpy.ndarray,
) -> None
No description available.
bond_option
bond_option(
self,
t_exp: float,
strike_price: float,
face_amount: float,
cpn_times: numpy.ndarray,
cpn_flows: numpy.ndarray,
exercise_type: ExerciseTypes,
)
Value a bond option that has European or American exercise using
the Black-Karasinski model. The model uses a trinomial tree.
bermudan_swaption
bermudan_swaption(
self,
t_exp: float,
t_mat: float,
strike_price: float,
face_amount: float,
cpn_times: numpy.ndarray,
cpn_flows: numpy.ndarray,
exercise_type: ExerciseTypes,
)
Swaption that can be exercised on specific dates over the exercise
period. Due to non-analytical bond price we need to extend tree out to
bond maturity and take into account cash flows through time.
callable_puttable_bond_tree
callable_puttable_bond_tree(
self,
cpn_times: numpy.ndarray,
cpn_flows: numpy.ndarray,
call_times: numpy.ndarray,
call_prices: numpy.ndarray,
put_times: numpy.ndarray,
put_prices: numpy.ndarray,
face: float,
)
Option that can be exercised at any time over the exercise period.
Due to non-analytical bond price we need to extend tree out to bond
maturity and take into account cash flows through time.
Functions
option_exercise_types_to_int
option_exercise_types_to_int(
option_exercise_type: ExerciseTypes,
) -> int
No description available.
Generated automatically from the FinancePy source code.
Do not edit this file manually.