Download Futures EOD with Zorro

Posted By: Eugeniu

Download Futures EOD with Zorro - 11/16/22 00:05

Hi,

I'm struggling for some time trying to download futures EOD data with the Download.c script. I'd appreciate any pointers with what I'm doing wrong here.

When running the Download.c script I get this error:
Quote

!No security definition has been found for the request GBP-STK--0.00--SMART/ISLAND--USD
!GBP 01-01 00:00:00 to 11-16 00:03:41 failed


So basically it tries to download a stock named "GBP" instead of using the symbol.


Input data:

- I'm trying to download 6BZ2 EOD prices using Download.c script. In the Window I input these params:
Quote
- GBP
- 2022-2022
- EOD
- Trades
- Broker

- My AssetsIB contains these lines:
Quote
"Name","Price","Spread","RollLong","RollShort","PIP","PipCost","MarginCost","Market","Multiplier","Commission","Symbol","Centage","Description"
"GBP",0,0.0002,0,0,0.0001,0.0001,4667,0,62500,8,"GBP-FUT-20221219-6B-CME-USD",0,"Great Britain Pound"

- To come up with the symbol name I've tried using the TWS API directly from a Jupyter Notebook and was able to get the data with the following contract spec.
Quote

c = Contract()
c.symbol = "GBP"
c.secType = "FUT"
c.exchange = "CME"
c.currency = "USD"
c.lastTradeDateOrContractMonth = "20221219"

The full contract details look like this:
Quote

Contract(secType='FUT', conId=299701782, symbol='GBP', lastTradeDateOrContractMonth='20221219', multiplier='62500', exchange='CME', currency='USD', localSymbol='6BZ2', tradingClass='6B')
Posted By: jcl

Re: Download Futures EOD with Zorro - 11/16/22 09:31

You attempted to download not a future, but a stock named "GPB", which of course does not exist. Make sure that the download is using the symbol in your asset list.
Posted By: Eugeniu

Re: Download Futures EOD with Zorro - 11/16/22 12:51

That is the problem indeed.
I was under the impression that if I specify the asset name from the assets file (GBP), the script will search by symbol that I specify in Symbol column.
If I enter the symbol directly in the panel it works indeed.
Thanks.

Attached picture Screenshot from 2022-11-16 13-49-58.png
Posted By: Eugeniu

Re: Download Futures EOD with Zorro - 11/16/22 13:06

btw, now that I downloaded the data I noticed it is in .t6 format. Shouldn't it be in .t8 format? What do columns 5, 6 mean for futures in this case? If column 6 is volume, why is it fractional?

Quote

2022-11-15T23:59:59 1.1966 1.1976 1.1801 1.1885 0 47.70278
2022-11-14T23:59:59 1.1745 1.1813 1.172 1.1791 0 28.38681
2022-11-11T23:59:59 1.1758 1.1867 1.172 1.1846 0 33.11597
2022-11-10T23:59:59 1.1638 1.1743 1.1632 1.1708 0 47.85209


Attached File
GBPt6.csv  (26 downloads)
Posted By: AndrewAMD

Re: Download Futures EOD with Zorro - 11/16/22 13:54

Originally Posted by Eugeniu
btw, now that I downloaded the data I noticed it is in .t6 format. Shouldn't it be in .t8 format?
No, because you only downloaded data for a single contract. Now, you can write a script that merges t6 contracts together into a single t8 file. (Maybe someone already wrote one? I know I have, but I did it with Sierra Chart.)
Posted By: Eugeniu

Re: Download Futures EOD with Zorro - 11/16/22 20:09

Any idea what the last columns are supposed to be? First 4 are OHLC.

I've downloaded the same data from IBKR directly. First 4 columns coincide but neither of the remaining columns match.

Quote

2022-11-10 1.1638 1.1743 1.1632 1.1708 68907 1.16796 20001
2022-11-11 1.1758 1.1867 1.172 1.1846 47687 1.17956 13825
2022-11-14 1.1745 1.1813 1.172 1.1791 40877 1.17604 11625
2022-11-15 1.1966 1.1976 1.1801 1.1885 68692 1.1889 21926
Posted By: Eugeniu

Re: Download Futures EOD with Zorro - 11/16/22 20:46

Note sure what happened when I downloaded the data first time but now I get different results (last column seems to be volume this time).

Quote

2022-11-15T23:59:59 1.1965 1.1977 1.1801 1.1877 0 104.42361
2022-11-14T23:59:59 1.1745 1.1814 1.1721 1.177 0 184473
2022-11-11T23:59:59 1.1758 1.1867 1.1721 1.1855 0 126128
2022-11-10T23:59:59 1.1638 1.1743 1.1633 1.1726 0 101271
© 2024 lite-C Forums