Back to Community
Trading 'WEAT' Based on Wheat Futures Commitment of Money Managers

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.

Clone Algorithm
Backtest from to with initial capital
Total Returns
Max Drawdown
Benchmark Returns
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 55cd72050dff430c64ccef90
There was a runtime error.
3 responses

Hey Jonathan, nice work! This is a very solid first algorithm. I looked through your code, and you paid excellent attention to detail.

I concur that WEAT poses some issues -- it's not been trading long, and notably, it has only been trading during an exceptional bull market. It'd be nice to see a more liquid ETF that's been trading for longer. Is there any reason why you picked WEAT in particular? I think there might be better commodities you can try trading -- surely the crucial 'Money Manager' data would exist for those, as well?

@jonathan what does this algo do.. when short interest spikes you sell the stocks? and why use leverage ?

Jonathan, we just added futures to the platform, including Wheat futures. If you're interested, the announcement post has the details on what we added.


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.