stock-prediction-deep-neural-learning
stock-prediction-deep-neural-learning copied to clipboard
something about yfinance and stock prediction
Even if I update yfinance, it also shows error:
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I tried using the following code, but it didn't work :
pip install yfinance --upgrade --no-cache-dir
And I uninstall and reinstall, but still filed. I will appreciate it if you have some ideas to solve this problem. And If the yfinance can't be used, how do I refactor the methods or classes related to yf?
As for the stock forecast, I notice that the stock data you downloaded includes closing price, opening price, highest and lowest price, etc. But you only use the closing price as the feature for model training and stock prediction. I think that multiple features can be used to predict stock prices, which can improve the accuracy of the forecast.
I try to change from these two directions, change the download, and change the feature number:
stock_prediction_numpy.py:
data = yf.download([self._stock.get_ticker()], start=self._stock.get_start_date(), end=end_date)[['Close'],['Start'], ... ]
stock_prediction_numpy.py:
model.add(LSTM(units=100, return_sequences=True, input_shape=(x_train.shape[1], featuresNum)))
I have no idea if it can work. Do you have any good ideas?
Thanks.
Hi @Moenya1030,
sorry for my late response. I'm running the project with Python 3.8 and everything seems to work correctly. Maybe you have some other issue that might help me identify what's wrong?
In terms of using multiple features, yes, there is a way but I haven't published anything yet. I might do later.
Cheers, Jordi