Skip to content

Commit

Permalink
fix: schwab task owned call option purchase price variable initializa…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
daneisburgh committed Apr 1, 2024
1 parent ade95e2 commit 0e84ab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invaas/schwab/schwab_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def get_sell_dte(current_dte, expire_date, owned_option_transaction):
owned_option_transaction=owned_call_option_transaction,
)
self.logger.info(f"Sell option based on DTE: {call_sell_dte}")
call_purchase_price = float(owned_call_option["executionPrice"].replace("$", "")) * 100
call_purchase_price = float(owned_call_option_transaction["executionPrice"].replace("$", "")) * 100
call_bid_price = row.C_BID * 100
call_price_pct_diff = (call_bid_price - call_purchase_price) / call_purchase_price
self.logger.info(f"Option price diff: {call_price_pct_diff*100:.2f}%")
Expand Down

0 comments on commit 0e84ab0

Please sign in to comment.