[ts-gen] Adding new symbols [Was: Syntax error due to unknown symbol]

Bill Pippin pippin at owlriver.net
Mon Aug 24 18:42:36 EDT 2009


Nils,

About adding newer GBL contracts, thanks much for your trying out this
approach as an alternative to reusing IB contract ids.

> ... still having problems. ...
> Any idea what's going wrong here? 

The error message makes it clear that the contract description being
sent by the shim lacks the expiry, most likely because the shim has
not obtained such from the database.

> 12668|74118| 106277590|3|	\
> 4| 2|    2| 321|Error validating request:-'zb' : cause - Please
>                  enter a local symbol or an expiry|

And you already realize this, since you diagnosed the original problem
by checking the database:

>  echo "select * from Future where ibc = 56441308;" |\
>  mysql -u code testing  
>  uid  tid  eid       ibc     lsym        netexp  expiry  src
> 3642    5  322  56441308  FGBL SEP 09  20090908    NULL 6434

I realize that you "fixed" the database, presumably via an update
statement:

> The NULL value for the expiry field seems to be wrong.
> Fixing it manually doesn't change the error message above. 

However, that doesn't mean that the fix is fully propagated through
the database.  Best is probably to find out what's wrong with LocalFut.
In my earlier post, I wrote:

> C: update mod/LocalFut.sql
> --------------------------

>> I use sql/mod/LocalFut.sql, set the appropriate expiry date ...

> As you suggest above, here again some text editing of a sql script
> is needed.  Again, the previous entries similar to the ones to be
> added are at the end, so again, dup lines and edit, again with the
> ibc and expiry values.  Since these are distinct update statements,
> each one has its own semicolon.

I may need to clarify some of the above; feel free to ask questions.
In any case, something is still wrong with the database definitions
for the new symbol, and trying to debug past that point is a recipe
for frustration, and we can be sure something has already gone wrong
when LocalFut.sql is loaded via the source statement in sql/more.sql.

The version of sql/mod/LocalFut.sql currently delivered with the shim
includes at its end text three lines similar (up to added line breaks
and commenting) to the following:

-- FUT:DTB:GBL

-- ate Future set expiry = '20090908' where ibc = ........;
-- ate Future set expiry = '20091208' where ibc = ........;
-- ate Future set expiry = '20100308' where ibc = ........;

You need to determine the ibc values for those FUT:DTB:GBL symbols
from contract data queries, include them in place of the extended
elipsis just prior to each semicolon, and uncomment out the commands
by changing the initial six characters to be "update".  If you've
already done this, my apologies, still there is clearly some kind of
problem with the LocalFut.sql step, either because of something going
wrong right here, or due to something going wrong at an earlier step.

Thanks,

Bill





> thanks for the detailed explanation. 

> > Once all this is done, the current front month for FUT:DTB:GBL is
> > recognized; the following script, given the appropriate setting of
> > the .shimrc Locality to DE, would serve just fine to collect two
> > seconds of GBL tick data, except that my account lacks the proper
> > permissions:
> > 
> >     #!./shim -f
> > 
> >     select tick  FUT:DTB:GBL:EUR:20091208 1;	wait 2;
> >     cancel tick  FUT:DTB:GBL:EUR:20091208;	wait 1;
> >     exit;
> > 
> > >From the log, I see "354|Requested market data is not subscribed ... "
> > The shim read the contract value expressions just fine, however.
> > 
> > --------------------------


> I am still having problems. Now it looks like

> select tick FUT:DTB:GBL:EUR:20090908 1;
> Process rule: InAction (ConA)
> Process rule: Compound (FUT)
> Syntax error:
> Grammar rule: Compound FUT     
> Cursor state: match; text is:
> select tick FUT:DTB:GBL:EUR:20090908 1;
> ------------------------------------^--
> Process rule: MetaData (Expr)
> Process rule: Compound (MdiC)
> Syntax error:
> Grammar rule: Compound MdiC    
> Cursor state: match; text is:
> select tick FUT:DTB:GBL:EUR:20090908 1;
> ------------------------------------^--
> Process rule: Compound (tick)
> Syntax error:
> Grammar rule: Compound tick    
> Cursor state: match; text is:
> select tick FUT:DTB:GBL:EUR:20090908 1;
> ------------------------------------^--
> Drop:  1;

> Del;


> The same with 


> select tick ibc:56441308 at DTB 1;
> 12668|74118| 106269064|4|11| 0|# select tick ibc:56441308 at DTB 1;|
> 12668|74118| 106269291|1| 9| 0|select tick ibc:56441308 at DTB 1;|
> 12668|74118| 106269443|2| 1| 5|1|5|2|GBL|FUT||0.0000||1|DTB||EUR||||||
> 12668|74118| 106277590|3| 4| 2|    2| 321|Error validating
> request:-'zb' : cause - Please enter a local symbol or an expiry|



> Validating the contract in the database yields

>  echo "select * from Future where ibc = 56441308;" | mysql -u code
> testing  
> uid	tid	eid	ibc	lsym	netexp	expiry	src
> 3642	5	322	56441308	FGBL SEP 09	20090908	NULL
> 	6434


> The NULL value for the expiry field seems to be wrong. Fixing it
> manually 

> echo "update Future set expiry = '20090908' where ibc = 56441308;" |
> mysql -u code testing 

> doesn't change the error message above. 
> Any idea what's going wrong here? 



More information about the ts-general mailing list