Hi All!
This is the first algorithm I have written here and thought it would be fun to share. Since joining, I have really enjoyed reading all of the great posts and the resources shared in the community and I look forward to continuing to learn! If you happen to take a look at this post and notice anything, I would really appreciate any feedback, tips, etc.
What I tried to do was fetch in CFTC data from Quandl, strip the 'Money Manager Long' and 'Money Manager Short' interest columns and calculate the long/short ratio. I then compared this with a rolling average of the ratio calculated over a 56 week period. I had the algorithm trade long/short depending on whether or not the ratio was above/below the longer-term average.
What I had the algorithm trade is the ETF WEAT. It is the only equity security I know of that "directly tracks" wheat future prices. However, It poses a few issues - it has only been trading since 9/19/2011 and it is relatively illiquid. Nonetheless, I thought this would be fun to code and to incorporate some different data.