Monday, September 2, 2013

Week 2 of Computational Investing Part 1.

I guess I did the hard part of the week 2 homework by installing the software on Saturday.  Again, much of the territory isn't new to me.  It was nice to review since I'm going to put some of this into practice, or so I hope.

Today I learned a bit more about the QSTK software and the Matplotlib tool.  I just copied and pasted the text from The Quant Soft Took Kit Tutorial and could rapidly rebuild the graphs in the demo.  Normalizing returns and producing scatter plots are very easy.  Since the data is retrieved from Yahoo Finance I'll not give it here.  Review the tool if interested.  Be polite and save data locally after retrieving it once if you intend to work with it often.

Normalized returns look at the price and change relative to some point in time, that is Price(t)/Price(i) where i is a constant.  Most of the time the price is normalized to i=0 and t ranges from 0 to some larger value but one can normalize to a time in the middle of the graph if one likes.

A scatter graph plots the change of two items relative to each other based upon some interval.  It shows how correlated the two items are and whether the are positively or negatively correlated.  The greater the deviation from the norm the less correlated they are.

Since I'm learning, I won't put in my own thoughts.  It's hard enough to suppress them while learning.  Once I have a good grasp of the subject matter I'll put my own stamp on it.

Even if you aren't interested in the stock market the NumPy and SciPy pages as well as Matplotlib if you are interested in doing scientific computation and plotting.  I wish the "Computing the Matrix" instructor had used Matplotlib rather than his home grown plotting tool.  Matplotlib can show a plot in it own window or produce a PDF.  It may be able to produce files in other formats, I haven't taken the time to look.