Looking over the formulas for technical indicators, I decided I would use an R package called quantmod to create the historical data set for Yahoo.  Why recreate the wheel?  The technical indicators of interest for this project were RSI, Bollinger Bands, Stochastics, and MACD.  I won’t define these technical indicator terms here.  I used these technical indicators for no particular reason other than for demonstration purposes.  I do not intend to go into detail about the formulas for these indicators.  Plenty of information is available on the internet for anyone that would like additional information about how to calculate these indicators from the raw data.  I do not recommend anyone using the model that will eventually be built to guide them in making trading decisions.  If you do decide to create your own model or recreate the model created for this blog, you are responsible for any stock market trading losses you might experience.  Use of the information on this blog will be at your own risk.  If you would like to eventually do some real trading, I would encourage you to first do some paper trading.

The assumption will be that all readers have some background in using R.  If this is not the case, don’t despair.  The R code included below should get you started.  Note that R can be integrated into STATISTICA, but I chose not to demonstrate this capability in this blog post.  The historical stock quote data and the technical indicators were saved to a text file which was imported into STATISTICA.  You will need to have R installed on your computer along with the packages TTR and quantmod.  Once R is installed, at the command prompt in R, you could enter install.packages(“TTR”, dependencies=TRUE) to install the TTR package and any supporting packages to TTR.  Once quantmod and TTR are installed, cut and paste the following code into R:

getSymbols(“YHOO”, from=”2010-06-01″, to=”2013-09-09″)
write.table(YHOOcomb, file=’C:/Temp/YAHOO.csv’)


Once the csv file is created, import it into Microsoft Excel and ensure the formatting is correct.  Modify as needed and save an Excel file of the data.  This Excel file can now be imported into STATISTICA.  I have run out of time to produce the video demonstrating how to take this data and make a forecast using neural networks.  I hope to have the video produced by Monday evening.  I would encourage you in the meantime to get a copy of the Yahoo data along with the technical indicators calculated by R.