I had this idea to make a fortune on the stock market by looking for correlations between a given stock’s price over time and any number of other data, such as a second stock’s price, volume of news stories about the company (could get the info from Google Trends?), weather patterns, etc. I guess I didn’t really have an idea about how to do all that before starting with the project; I’m not a financial/math wizard guy. After working on it for a bit, I realized that huge banks must have armies of geniuses and programmers creating tools to do much the same thing as what I had invisioned…kind of lost hope that I could be able to do any better than that, so abandoned this project.
That said, I learned a few things with the project. First, it uses Python’s urllib to open an internet connection and download a stock’s history (or two) from Google Finance for a given date range. Also, it imports NumPy and uses it to get a correlation value between two stocks. There is also some commented out code where I experimented with Matplotlib to generate plots.
Download: stocktracker_v0.2.zip. Once unzipped, run StockTrackerMain.py with your favorite Python interpreter. This is a command line console program only. Use -h option to see all available command line options. Prerequisites are Python and NumPy. Tested with Python 2.6.