bugfixing
This commit is contained in:
parent
cf81a91abb
commit
19c3ee4d06
@ -196,6 +196,7 @@ async def main():
|
|||||||
net_premium = 0
|
net_premium = 0
|
||||||
|
|
||||||
for item in data:
|
for item in data:
|
||||||
|
try:
|
||||||
if item['ticker'] == symbol:
|
if item['ticker'] == symbol:
|
||||||
if item['put_call'] == 'Calls':
|
if item['put_call'] == 'Calls':
|
||||||
call_premium += item['cost_basis']
|
call_premium += item['cost_basis']
|
||||||
@ -222,6 +223,8 @@ async def main():
|
|||||||
|
|
||||||
if item['sentiment'] == 'Neutral':
|
if item['sentiment'] == 'Neutral':
|
||||||
neutral_premium +=item['cost_basis']
|
neutral_premium +=item['cost_basis']
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
with open(f"json/options-historical-data/companies/{symbol}.json", "r") as file:
|
with open(f"json/options-historical-data/companies/{symbol}.json", "r") as file:
|
||||||
past_data = orjson.loads(file.read())[0]
|
past_data = orjson.loads(file.read())[0]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user