Skip to content

Commit

Permalink
style: format files
Browse files Browse the repository at this point in the history
  • Loading branch information
daneisburgh committed Jun 28, 2024
1 parent 90b2e27 commit 7741c83
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion invaas/poptions/CallCreditSpread.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def callCreditSpread(
long_strike,
long_price,
):

# Data Verification
if long_price >= short_price:
raise ValueError("Long price cannot be greater than or equal to Short price")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/CallDebitSpread.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def callDebitSpread(
long_strike,
long_price,
):

# Data Verification
if long_price <= short_price:
raise ValueError("Long price cannot be less than or equal to Short price")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/CoveredCall.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def bsm_debit(sim_price, strikes, rate, time_fraction, sigma):
def coveredCall(
underlying, sigma, rate, trials, days_to_expiration, closing_days_array, percentage_array, short_strike, short_price
):

for closing_days in closing_days_array:
if closing_days > days_to_expiration:
raise ValueError("Closing days cannot be beyond Days To Expiration.")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/IronCondor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def ironCondor(
call_long_strike,
call_long_price,
):

# Data Verification
if call_long_price >= call_short_price:
raise ValueError("Long call price cannot be greater than or " "equal to Short call price")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/LongCall.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def bsm_debit(sim_price, strikes, rate, time_fraction, sigma):
def longCall(
underlying, sigma, rate, trials, days_to_expiration, closing_days_array, multiple_array, long_strike, long_price
):

for closing_days in closing_days_array:
if closing_days > days_to_expiration:
raise ValueError("Closing days cannot be beyond Days To Expiration.")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/LongPut.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def bsm_debit(sim_price, strikes, rate, time_fraction, sigma):
def longPut(
underlying, sigma, rate, trials, days_to_expiration, closing_days_array, multiple_array, long_strike, long_price
):

for closing_days in closing_days_array:
if closing_days > days_to_expiration:
raise ValueError("Closing days cannot be beyond Days To Expiration.")
Expand Down
3 changes: 0 additions & 3 deletions invaas/poptions/MonteCarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def monteCarlo(
strikes,
bsm_func,
):

dt = 1 / 365 # 365 calendar days in a year

length = len(closing_days_array)
Expand All @@ -40,7 +39,6 @@ def monteCarlo(
indices = [0] * length

for c in range(trials):

epsilon_cum = 0
t_cum = 0

Expand All @@ -49,7 +47,6 @@ def monteCarlo(

# +1 added to account for first day. sim_prices[0,...] = underlying price.
for r in range(max_closing_days + 1):

# Brownian Motion
W = (dt ** (1 / 2)) * epsilon_cum

Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/PutCreditSpread.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def putCreditSpread(
long_strike,
long_price,
):

# Data Verification
if long_price >= short_price:
raise ValueError("Long price cannot be greater than or equal to Short price")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/PutDebitSpread.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def putDebitSpread(
long_strike,
long_price,
):

# Data Verification
if long_price <= short_price:
raise ValueError("Long price cannot be less than or equal to Short price")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/ShortCall.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def bsm_debit(sim_price, strikes, rate, time_fraction, sigma):
def shortCall(
underlying, sigma, rate, trials, days_to_expiration, closing_days_array, percentage_array, short_strike, short_price
):

for closing_days in closing_days_array:
if closing_days > days_to_expiration:
raise ValueError("Closing days cannot be beyond Days To Expiration.")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/ShortPut.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def bsm_debit(sim_price, strikes, rate, time_fraction, sigma):
def shortPut(
underlying, sigma, rate, trials, days_to_expiration, closing_days_array, percentage_array, short_strike, short_price
):

for closing_days in closing_days_array:
if closing_days > days_to_expiration:
raise ValueError("Closing days cannot be beyond Days To Expiration.")
Expand Down
1 change: 0 additions & 1 deletion invaas/poptions/ShortStrangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def shortStrangle(
put_short_strike,
put_short_price,
):

# Data Verification
if call_short_strike < put_short_strike:
raise ValueError("Call Strike cannot be less than Put Strike")
Expand Down
2 changes: 1 addition & 1 deletion invaas/poptions/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# This is a modified version of https://github.com/Talha-Tariq/poptions
# This is a modified version of https://github.com/Talha-Tariq/poptions

0 comments on commit 7741c83

Please sign in to comment.