IBrokers and timezone

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

IBrokers and timezone

Dzidas-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: IBrokers and timezone

soren wilkening
I havent had this problem, but my best guess is that it could have something to do with the way you specify your  contract for IBM

since your locale seems to be in Europe, defining a contract like this

twsSTK('IBM')

and without specifying a US exchange explicitly with the exch=... argument, the IB system may default to assigning the exchange that is geographically closest to you, means a european exchange where you can trade IBM. When you then submit a 'US Eastern Standard Time' timestamp

'20110417 00:00:26 EST'

the european exchange will likely not know what to do with that timezone and return its own default 'CET' instead.

So to cut it short:

try

twsSTK('IBM', exch=...SOME US ECHANGE..)

instead.

Would be interested to see if this works.

Cheers

Soren
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: IBrokers and timezone

Jeffrey Ryan-2
In reply to this post by Dzidas-2
Hi Dzidas,

This is a bug in the construction of the xts object.  Well, more like a
missing feature.  I will work on adding in the ability to specify the
timezone.

Thanks,
Jeff

On Mon, Apr 18, 2011 at 3:52 PM, Dzidas <[hidden email]> wrote:

> How can I specify the timezone in reqHistoricalData method? I tried this
> way:
> reqHistoricalData(tws,twsSTK('IBM'),'20110417 00:00:26 EST',"5 mins","5
> D","1")
> but it returns based on my locale or tws.
> For an example:
>
> 2011-04-11  21:55:00,163.76,163.95,163.69,163.89,1361,163.8,0,949 <-end of
> trading session, CET time
> 2011-04-12  15:30:00,163.49,163.57,163.2,163.41,1331,163.37,0,418 <-start
> of
> trading session, CET time
>
> I can convert it later on, but it is very difficult, because I use CET by
> default and there is a lag in summer time between CET and EST. And it gets
> very messy.
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/IBrokers-and-timezone-tp3458674p3458674.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>



--
Jeffrey Ryan
[hidden email]

www.lemnica.com

R/Finance 2011 April 29th and 30th in Chicago | www.RinFinance.com

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Loading...