Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update historical_model.py #127

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update historical_model.py
Handle empty tickers from FMP
  • Loading branch information
sword134 committed Mar 26, 2024
commit e061b578dc15083f5e997186580d0ce1b7900356
4 changes: 2 additions & 2 deletions financetoolkit/historical_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def worker(ticker, historical_data_dict):
sleep_timer=sleep_timer,
)

if not historical_data.empty:
if not historical_data.empty and not historical_data.isnull().all().all():
fmp_tickers.append(ticker)

if source == "YahooFinance" or historical_data.empty:
Expand All @@ -169,7 +169,7 @@ def worker(ticker, historical_data_dict):
if not historical_data.empty:
yf_tickers.append(ticker)

if historical_data.empty:
if historical_data.empty and not historical_data.isnull().all().all():
no_data.append(ticker)
historical_data_dict[ticker] = empty_historical_data
if not historical_data.empty:
Expand Down
Loading