stefan-jansen / machine-learning-for-trading

Code for Machine Learning for Algorithmic Trading, 2nd edition.
https://ml4trading.io
12.87k stars 4.11k forks source link

Chapter 20. build_us_stock_dataset variable AttributeError #256

Closed Jano32 closed 1 year ago

Jano32 commented 2 years ago

Does anyone has an issue on chapter 20 "20_autoencoders_for_conditional_risk_factors/04_build_us_stock_dataset.ipynb" with the variable "yf-symbols = yf.Tickers(all_symbols) ?

I have got this error : AttributeError: 'float' object has no attribute 'upper'

image

stefan-jansen commented 1 year ago

The error suggests there was no value returned (float = np.nan), which can happen if the API doesn't deliver for a specific call. You may want to either handle the error using try..except or just retry later.