66
77import numpy as np
88from numpy import abs , round , arange , sum , exp
9+
910from numpy .lib .scimath import log , sqrt
1011from scipy import stats
1112
@@ -27,9 +28,9 @@ def get_pl_profile(
2728 x : float ,
2829 val : float ,
2930 n : int ,
30- s : np . ndarray ,
31+ s : ndarray ,
3132 commission : float = 0.0 ,
32- ) -> tuple [np . ndarray , float ]:
33+ ) -> tuple [ndarray , float ]:
3334 """
3435 Returns the profit/loss profile and cost of an options trade at expiration.
3536
@@ -73,8 +74,8 @@ def get_pl_profile(
7374
7475
7576def get_pl_profile_stock (
76- s0 : float , action : Action , n : int , s : np . ndarray , commission : float = 0.0
77- ) -> tuple [np . ndarray , float ]:
77+ s0 : float , action : Action , n : int , s : ndarray , commission : float = 0.0
78+ ) -> tuple [ndarray , float ]:
7879 """
7980 Returns the profit/loss profile and cost of a stock position.
8081
@@ -116,7 +117,7 @@ def get_pl_profile_bs(
116117 target_to_maturity_years : float ,
117118 volatility : float ,
118119 n : int ,
119- s : np . ndarray ,
120+ s : ndarray ,
120121 y : float = 0.0 ,
121122 commission : float = 0.0 ,
122123) -> tuple [FloatOrNdarray , float ]:
@@ -175,7 +176,7 @@ def get_pl_profile_bs(
175176
176177
177178@lru_cache
178- def create_price_seq (min_price : float , max_price : float ) -> np . ndarray :
179+ def create_price_seq (min_price : float , max_price : float ) -> ndarray :
179180 """
180181 Generates a sequence of stock prices from a minimum to a maximum price with
181182 increment $0.01.
0 commit comments