diff --git a/invaas/poptions/CallCreditSpread.py b/invaas/poptions/CallCreditSpread.py index 8a00829..6883246 100644 --- a/invaas/poptions/CallCreditSpread.py +++ b/invaas/poptions/CallCreditSpread.py @@ -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") diff --git a/invaas/poptions/CallDebitSpread.py b/invaas/poptions/CallDebitSpread.py index a1933bc..355d5ca 100644 --- a/invaas/poptions/CallDebitSpread.py +++ b/invaas/poptions/CallDebitSpread.py @@ -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") diff --git a/invaas/poptions/CoveredCall.py b/invaas/poptions/CoveredCall.py index 274c36f..52fc328 100644 --- a/invaas/poptions/CoveredCall.py +++ b/invaas/poptions/CoveredCall.py @@ -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.") diff --git a/invaas/poptions/IronCondor.py b/invaas/poptions/IronCondor.py index 48ed389..200a26e 100644 --- a/invaas/poptions/IronCondor.py +++ b/invaas/poptions/IronCondor.py @@ -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") diff --git a/invaas/poptions/LongCall.py b/invaas/poptions/LongCall.py index 1c7a022..2f4f39f 100644 --- a/invaas/poptions/LongCall.py +++ b/invaas/poptions/LongCall.py @@ -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.") diff --git a/invaas/poptions/LongPut.py b/invaas/poptions/LongPut.py index 7a3ba4d..00e279e 100644 --- a/invaas/poptions/LongPut.py +++ b/invaas/poptions/LongPut.py @@ -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.") diff --git a/invaas/poptions/MonteCarlo.py b/invaas/poptions/MonteCarlo.py index 29d7075..36bf57e 100644 --- a/invaas/poptions/MonteCarlo.py +++ b/invaas/poptions/MonteCarlo.py @@ -24,7 +24,6 @@ def monteCarlo( strikes, bsm_func, ): - dt = 1 / 365 # 365 calendar days in a year length = len(closing_days_array) @@ -40,7 +39,6 @@ def monteCarlo( indices = [0] * length for c in range(trials): - epsilon_cum = 0 t_cum = 0 @@ -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 diff --git a/invaas/poptions/PutCreditSpread.py b/invaas/poptions/PutCreditSpread.py index 612a4b5..5fd0060 100644 --- a/invaas/poptions/PutCreditSpread.py +++ b/invaas/poptions/PutCreditSpread.py @@ -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") diff --git a/invaas/poptions/PutDebitSpread.py b/invaas/poptions/PutDebitSpread.py index c432212..a7ec3c1 100644 --- a/invaas/poptions/PutDebitSpread.py +++ b/invaas/poptions/PutDebitSpread.py @@ -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") diff --git a/invaas/poptions/ShortCall.py b/invaas/poptions/ShortCall.py index faf7fd9..a5900f1 100644 --- a/invaas/poptions/ShortCall.py +++ b/invaas/poptions/ShortCall.py @@ -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.") diff --git a/invaas/poptions/ShortPut.py b/invaas/poptions/ShortPut.py index 9f1e918..76d7a68 100644 --- a/invaas/poptions/ShortPut.py +++ b/invaas/poptions/ShortPut.py @@ -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.") diff --git a/invaas/poptions/ShortStrangle.py b/invaas/poptions/ShortStrangle.py index af9d2b4..edfe418 100644 --- a/invaas/poptions/ShortStrangle.py +++ b/invaas/poptions/ShortStrangle.py @@ -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") diff --git a/invaas/poptions/__init__.py b/invaas/poptions/__init__.py index 4e76ac1..d1eaa26 100644 --- a/invaas/poptions/__init__.py +++ b/invaas/poptions/__init__.py @@ -1 +1 @@ -# This is a modified version of https://github.com/Talha-Tariq/poptions \ No newline at end of file +# This is a modified version of https://github.com/Talha-Tariq/poptions