Question

Having issues with Python, codes not working. stocker error message (ModuleNotFoundError: No module named 'stocker'). Need...

Having issues with Python, codes not working. stocker error message (ModuleNotFoundError: No module named 'stocker'). Need help printing graphs and data as well why stocker won't work.

import matplotlib.pyplot as plt
from stocker import Stocker
amazon = Stocker('AMZN')
amazon.plot_stock()
model, model_data = amazon.create_prophet_model(days=90)
amazon.evaluate_prediction()
amazon.changepoint_prior_analysis(changepoint_priors=[0.001, 0.05, 0.1, 0.2])
amazon.changepoint_prior_validation(start_date='2018-01-04', end_date='2019-01-03', changepoint_priors=[0.001, 0.05, 0.1, 0.2])
amazon.changepoint_prior_validation(start_date='2018-01-04', end_date='2019-01-03', changepoint_priors=[0.15, 0.2, 0.25,0.4, 0.5, 0.6])
amazon.changepoint_prior_scale = 0.5
amazon.evaluate_prediction()
amazon.evaluate_prediction(nshares=1000)
amazon.predict_future(days=10)
amazon.predict_future(days=100)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Your code is perfect. I am guessing your stocker installation was incorrect, as the code is running fine in my system.

If you are using Anaconda distribution you can follow these commands:

conda install quandl numpy pandas matplotlib pystan

conda update quandl numpy pandas matplotlib pystan

Or else:

pip install -U quandl numpy pandas fbprophet matplotlib pytrends pystan

This is the output of your code:

Add a comment
Know the answer?
Add Answer to:
Having issues with Python, codes not working. stocker error message (ModuleNotFoundError: No module named 'stocker'). Need...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT