Skip to content

Commit

Permalink
Update support.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaveiga authored Jan 23, 2025
1 parent 1fa9168 commit 65598d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions optionlab/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def get_pl_profile(
x: float,
val: float,
n: int,
s: ndarray,
s: np.ndarray,
commission: float = 0.0,
) -> tuple[ndarray, float]:
) -> tuple[np.ndarray, float]:
"""
Returns the profit/loss profile and cost of an options trade at expiration.
Expand Down Expand Up @@ -71,11 +71,11 @@ def get_pl_profile(
)
else:
raise ValueError("Option type must be either 'call' or 'put'!")


def get_pl_profile_stock(
s0: float, action: Action, n: int, s: ndarray, commission: float = 0.0
) -> tuple[ndarray, float]:
s0: float, action: Action, n: int, s: np.ndarray, commission: float = 0.0
) -> tuple[np.ndarray, float]:
"""
Returns the profit/loss profile and cost of a stock position.
Expand Down Expand Up @@ -176,7 +176,7 @@ def get_pl_profile_bs(


@lru_cache
def create_price_seq(min_price: float, max_price: float) -> ndarray:
def create_price_seq(min_price: float, max_price: float) -> np.ndarray:
"""
Generates a sequence of stock prices from a minimum to a maximum price with
increment $0.01.
Expand Down

0 comments on commit 65598d0

Please sign in to comment.