In order to compare the price action of 2 different stocks, we “normalise” them, i.e. use the percent change and then plot them. Quandl provides the option to do this when pulling in data. The notebook is available on my Public Dropbox Folder with a few other notebooks.
In this R Notebook, we import the stock price of Lupin from 1 November 2010 till 12 October 2018 and plot the 50 & 200 day simple moving averages using the TTR function.
Check out the notebook for more!
Previously we have seen how we can import quotes into R & use it to plot stock prices.
Now we go one step forward & import multiple stock quotes & plot them along in different combinations.
In this file, I show how to pull Quandl data into Python notebooks without downloading the files on our own systems. The iPython notebook & HTML version of the files are available to download. I recommend that you get Anaconda as it also has a whole host of other features and programmes that make using Python & R easier.
As always, for any feedback, contact “me“.