Performance Module:Live Data:Futures
From ExtractValue Wiki
The Futures function of the Performance Module is designed to retrieve frequent quotes on futures markets.
Xignite is a provider of financial data via XML-SOAP APIs. Xignite will be the provider of live data feeds, starting with commodity futures and possibly expanding to other markets. They may also provide news feeds.
Objectives
To mimic the functionality of Futuresource:
- Listings and search: http://futuresource.quote.com/quotes/index.jsp
- Market category: http://futuresource.quote.com/markets/market.jsp?id=energy
- Futures price list: http://futuresource.quote.com/quotes/quotes.jsp?s=CL
- Charting: http://futuresource.quote.com/charts/charts.jsp?s=CL%20X8
Quotes & Charts
- Save historical data on markets in the Product:Finance database
Database Specs
- Group type
- Commodity Exchange
- Product
- Product Types
- Future
- Spot market
Additional Xignite Data
- Symbol
- Month
- Year
- ExchangeSymbol
- Open
- High
- Low
- Last
- Settle
- Volume
- OpenInterest
- PreviousClose
- Change
- PercentageChange <-- this is Daily RoR
- Currency
Functional Specs
Background
Unlike stocks, futures symbols change with the passing of time because of expiration/delivery dates. Thus, Correlo must check for which symbol to retrieve on a daily basis.
Contract months:
- January - F
- February - G
- March - H
- April - J
- May - K
- June - M
- July - N
- August - Q
- September - U
- October - V
- November - X
- December - Z
Historical Yahoo Finance Futures Retrieval
Download Historical Quotes in batch for the Yahoo Finance markets
In order to download historical quotes in a batch, we need to understand and study the URL parameters provided by Yahoo Finance. Let's take a look at the URL string below:
http://ichart.finance.yahoo.com/table.csv?s=INTC&a=06&b=9&c=1986&d=2&e=5&f=2008&g=d
The URL string above will download daily historical data for INTC (Intel) from 6th of July 1986 (Intel went IPO) until 5th March 2008 into a file call table.csv.
Let's break down the URL string and take a look of the parameter one by one.
http://ichart.finance.yahoo.com/table.csv - The default URL to download historical stock quotes, it won't work if you change the 'table.csv' to something else.
s - This is where you can specify your stock quote, if you want to download stock quote for Microsoft, just enter it as 's=MSFT'
a - This parameter is to get the input for the start month. '00' is for January, '01' is for February and so on.
b - This parameter is to get the input for the start day, this one quite straight forward, '1' is for day one of the month, '2' is for second day of the month and so on.
c - This parameter is to get the input for the start year
d - This parameter is to get the input for end month, and again '00' is for January, '02' is for February and so on.
e - This parameter is to get the input for the end day
f - This parameter is to get the input for the end year
g - This parameter is to specify the interval of the data you want to download. 'd' is for daily, 'w' is for weekly and 'm' is for monthly prices. The default is 'daily' if you ignore this parameter.
Historical Xignite Futures Retrieval
This operation will happen ONE TIME to populate the database with historical information.
- Retrieve daily performance data ONLY ONCE from Xignite using GetHistoricalCommodityRange from 2000 to present. This will produce an archive of futures data for all front-months.
- The product name is <ExchangeSymbol>
- For example, in the Xignite sample productname = CLX8
- The product name is <ExchangeSymbol>
Historical Xignite Spot Retrieval
This operation will happen ONE TIME to populate the database with historical information.
- Retrieve daily performance data ONLY ONCE from Xignite using GetHistoricalSpotRange from 2000 to present. This will produce an archive of futures data.
- The product name is <Symbol>
- For example, in the Xignite sample productname = CL
- The product name is <Symbol>
Daily Xignite Front-month Check
- Use ListFutures once per day at the beginning of each day to retrieve the most up to date futures symbols (ticker, month, year) for all futures markets supported by Xignite
Live Yahoo Retrieval
Since Yahoo's Finance CSV service is free, Correlo will be pulling data from it once per 10 seconds.
- Use the <ExchangeSymbol> from Xignite's ListFutures for the Yahoo Finance markets
- Per the specifications in Performance Module#Yahoo Finance, retrieve the futures data from Yahoo Finance for the front month and the next two months.
- For example, if the front month is V8 (Nov 08) then also retrieve Z8 (Dec 08) and F9 (Jan 09)
- Make sure to add .NYM, .CMX, .CBT, .NYB or .CME at the end. The conversion table of Xignite Values and Yahoo Values are as follows:
| Long Group Name | Short Group Name | Xignite value | Yahoo value |
| Chicago Mercantile Exchange | CME | CME | CME |
| Chicago Board of Trade | CBOT | CBOT | CBT |
| New York Commodity Exchange | COMEX | COMEX | CMX |
| New York Board of Trade | NYBOT | NYBOT | NYB |
| New York Mercantile Exchange | NYMEX | NYMEX | NYM |
| Kansas City Board of Trade | KCBT | KCBT | |
| London Metal Exchange | LME | LME | |
| Minneapolis Grain Exchange | MGEX | MGEX | |
| Singapore Commodity Exchange | SICOM | SICOM | |
| Winnipeg Commodity Exchange | WPG | WPG |
Live Xignite Retrieval
- Only the following intraday symbols will be retrieved from Xignite
- Use GetTicks every ten minutes to retrieve ticks in ten minute intervals
- Hits per day: 144 hits per day x 31 symbols = 4,464 hits per day
End-of-day Xignite Futures Retrieval
- Retrieve tick data at the end of each day using GetTicks for all remaining Xignite markets
End-of-day Xignite Spot Retrieval
- Retrieve tick data at the end of each day using GetTicks for all remaining Xignite markets
Related Links
- XigniteFutures
- Development Tips
- List of Futures Markets (username austin@extractvalue.com)
Category Tree
Categories: API | Database | Sub-modules | Finance
