Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Idea for a Natural Gas trading algo

So I have been wanting to write an algo for trading natural gas for a while. I trade natural gas quite a bit on my own accounts and am pretty familiar with industry workings. Essentially what I have in mind is a algo that pulls years of historical data (more for back testing reasons) out to a 2 week forecast (to then take positions using) of average daily temperature information from WSI trader (a temperature forecasting service) into a excel file for several regional interconnections using fetch_csv. Using that data I want to assign a weighting to each based on estimated future usage (for instance PJM would be 15.34%). Then add all these regional loads to give one total US estimated load. Then basically if the number is above or below a certain level (hot or cold) then it would take a bullish position. On the other hand if it was at a certain range with mild temperatures it would take a bearish stance as load usage would be low. I personally have what I would call a low to working knowledge of python I have been trying to figure out how to use the fetcher function with no success. I feel like this could work, but for me to spend to time to learn how to get the skill to get this working would take a lot of work and time. Basically I was hoping someone (with a better knowledge of python) would help me to work on this. I don't know if anyone would be willing to, but I figured I wouldn't hurt to ask if anyone has a bit of time and would be interested in working with me to see my brainchild to realization. Also if anyone sees any obvious flaws with my idea I welcome constructive criticism.

-Spencer

2 responses

@Spencer S., And your target security here is UNG? UGAZ? DGAZ? Or are you thinking of building a driller/extractor/fracker/pumper/refiner group? There's no futures trading here and I doubt whether is actually makes it onto the docket. Futures vs equity trading, the difference is considerable.

It sounds like you should be trading on CQG which will give you all the contracts and data you need. Yeah their analysis platform sucks, but you can work around it. Most of the retail level futures traders I'm aware of use CQG. But IB works too. I just bought (paper) 1 contract of Sept15 NG @ 2.688, commission: $2.31. If it lifts to 2.698 I'll make $100; or to $2.788 I'll clear $1k.

To build what you want, are you sure you want to trade ETFs? If your idea has legs, trade futures.

I planned to run it on UNG as a kind of intial backtest I find that it UNG mirrors the natural gas market pretty closely. The only wrench I am foreseeing is it doesn't take into account potential injection numbers which once a week is a potentially HUGE market mover. I figure though there is easily some way to incorporate it in without to much difficulty I have a few ideas, but I'm open to ideas. If it works I figure I could throw in a few thousand to let it live trade in the meantime. Obviously if it works there could be quite a few potential applications better than just trading UNG I just don't want to spend to time to get this thing running and have no way to know if it would work. I love the ability to easily back test based on small chances to your code. This would take some tweaking, but i think there may be some potential running it overnight on NYMEX so when WSI changes forcast at night most people are not up and trading based off that information but using a algo you could take positions based on this week data without having being up at 12:00 at night. That were I see this being used eventually, but for now I just would be content with running it on UNG.