Fixed polygon act issue (#2206)

This commit is contained in:
Colin Delahunty
2022-07-29 17:14:04 -04:00
committed by GitHub
parent 8eed33b62f
commit a1ee2bc0ba

View File

@@ -133,7 +133,11 @@ def insider_activity(
n_stock_price = 0
if interval == "1440min":
n_stock_price = stock["Adj Close"][ind_dt]
try:
n_stock_price = stock["Adj Close"][ind_dt]
except KeyError:
stock.index = stock.index.floor("d")
n_stock_price = stock["Adj Close"][ind_dt]
else:
n_stock_price = stock["Close"][ind_dt]