New Forum

Visit the new forum at http://godelsmarket.com/bb

Tuesday, February 5, 2013

EURUSD Average Monthly Gain

I've been a little interested in foreign exchange pairs recently. They have a different flavor of trading from equities or derivatives. In any case, I ran the following test on data going back to 1990 November 1998. It looks at the opening of the month compared to the month's close (log changes).

I highlighted some of the more interesting months. Looks like December has a nice strong long bias to it; much more consistent direction than any of the other months at 80% positive. Of course, I wouldn't trade any of this by itself.

EDIT: (new chart using IMF.org's data found here. Assumes purchase at first day of listed month and sale at first day of following month. This data goes back to November 1998 rather than 1990. Many thanks to Sanz Prophet for pointing at the mistake! Currently getting my hands on some better forex data! :D)

The above is not meant to be trading advice. Furthermore, past results are not necessarily indicative of future returns. And, as seen in the earlier version of this post, there is no guarantee that the data is accurate.

Tuesday, January 29, 2013

Weather's Effect on Stock Prices: Part One

Yesterday, I thought it would be neat to check out weather's affect on stock prices. So, I looked around for some historical temperature data and found Weather Underground, Inc. Despite their name, they do provide weather information for above ground locations. They also, luckily for us, provide historical data in easy to download CSV format.

So, I wrote this nifty Python script to help us download them.
import urllib

month = 1
year = 2000

while year < 2013:
    while month < 13:
        urllib.urlretrieve("http://www.wunderground.com/history/airport/KNYC/" + str(year) + "/" + str(month) + "/1/MonthlyHistory.html?req_city=NA&req_state=NA&req_statename=NA&format=1", "csvfiles/" + str(year) + "-" + str(month) + ".csv")
        month = month + 1
    month = 1
    year = year + 1

That should download data back to 2000. I checked on their data for 1990 and they didn't seem to have it. Furthermore, I'm not entirely sure of the accuracy of this data.

This concludes Part 1. Yes, no analysis yet; but, half the fun of analyzing data is getting your hands on it in a format that you can process. Feel free to upload this data into a SQL database. I'll provide some data on the market's tendencies before and after snow, rain, temperature correlation, etc, in a few days.