bugfixing
This commit is contained in:
parent
868b029b55
commit
4491fc836f
@ -185,7 +185,7 @@ try:
|
|||||||
cursor.execute("PRAGMA journal_mode = wal")
|
cursor.execute("PRAGMA journal_mode = wal")
|
||||||
cursor.execute("SELECT DISTINCT symbol FROM stocks WHERE symbol NOT LIKE '%.%'")
|
cursor.execute("SELECT DISTINCT symbol FROM stocks WHERE symbol NOT LIKE '%.%'")
|
||||||
stock_symbols = [row[0] for row in cursor.fetchall()]
|
stock_symbols = [row[0] for row in cursor.fetchall()]
|
||||||
stock_symbols = ['AMD']
|
#stock_symbols = ['AMD']
|
||||||
|
|
||||||
asyncio.run(run(stock_symbols, con))
|
asyncio.run(run(stock_symbols, con))
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,6 @@ def get_iv_data():
|
|||||||
total_symbols = stocks_symbols+etf_symbols
|
total_symbols = stocks_symbols+etf_symbols
|
||||||
|
|
||||||
counter = 0
|
counter = 0
|
||||||
total_symbols = ['AMZN']
|
|
||||||
for symbol in tqdm(total_symbols):
|
for symbol in tqdm(total_symbols):
|
||||||
try:
|
try:
|
||||||
url = f"https://api.unusualwhales.com/api/stock/{symbol}/volatility/realized"
|
url = f"https://api.unusualwhales.com/api/stock/{symbol}/volatility/realized"
|
||||||
@ -137,4 +136,24 @@ def get_iv_data():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
get_iv_data()
|
get_iv_data()
|
||||||
|
|
||||||
|
'''
|
||||||
|
directory_path = "json/implied-volatility"
|
||||||
|
total_symbols = get_tickers_from_directory(directory_path)
|
||||||
|
if len(total_symbols) < 100:
|
||||||
|
total_symbols = stocks_symbols+etf_symbols
|
||||||
|
|
||||||
|
for symbol in tqdm(total_symbols):
|
||||||
|
try:
|
||||||
|
with open(f"json/options-historical-data/companies/{symbol}.json", "r") as file:
|
||||||
|
historical_data = orjson.loads(file.read())
|
||||||
|
|
||||||
|
with open(f"json/implied-volatility/{symbol}.json", "r") as file:
|
||||||
|
data = orjson.loads(file.read())
|
||||||
|
|
||||||
|
res_list = add_data(data,historical_data)
|
||||||
|
|
||||||
|
save_json(res_list, symbol, directory_path)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
'''
|
||||||
Loading…
x
Reference in New Issue
Block a user