I am programming a stock tracker application with Yahoo's finance API. At the beginning of this month I noticed that the information provided by Yahoo on the commodities were wrong. So I looked up the symbols on Yahoo's finance website and realized, that the symbols for the upcoming futures changed.

Due to the fact that I'am not a finance guy, I have no idea what the pattern might be behind the changing commodity symbols. I'am pretty sure that there is a pattern, because the symbols for September are all ending with a U (GCU16.CMX, SIU16.CMX, HGU16.CMX etc.).

So we have a monthly changing symbol pattern similar to:

XX + Single letter for the month + Year + . + Exchange

Does anyone have an idea, in which way the "Single letter for the month"-part is changing in the symbol, so that I can automate those one letter changes in my programm?

  • Okay, I got it by simply looking up futures from past years.
    – user47136
    Aug 7 '16 at 16:37
  • 2
    Jan = F, Feb = G, Mar = H, Apr = J, May = K, Jun = M, Jul = N, Aug = Q, Sep = U, Oct = V, Nov = X, Dec = Z
    – user47136
    Aug 7 '16 at 16:38
  • from CME group cmegroup.com/month-codes.html also note that options month codes are different and depend on put/call type.
    – MD-Tech
    Aug 8 '16 at 15:49
  • You should post the information you learned as an actual answer. That is both acceptable and encouraged on StackExchange.
    – dg99
    Aug 9 '16 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy