Problem 7 – Using Python to analyze stocks
Time to play with some stocks. You can access a lot of data through Quandl, which allows for the use of a free API for educational uses. There are also premium datasets available. We're sticking to educational purposes, so that should be enough for our requirements.
In this problem, we're going to learn how to pull data from Quandl and look at the VZ stock prices. VZ is the code for Verizon stock prices. We're going to use them to predict the prices using quandl
, which is a package for Python in addition to being a website full of useful information. Let's take a look at how we grab the information we want. The full code, minus the API key, can be found in our repository under the ch16_stockAnalysis.py
file:
- Let's take a look at how we can import the data. You'll need your own API for this. If you want to check another stock, say for
AMZN
, you'd substitute'EOD/VZ'
with&apos...