> a) How do you trade an instrument around the clock without making any manual
> adjustments to the code?
Your strategy should have all the intelligence needed to trade under
various market conditions. In turn, JBT has the intelligence to
faithfully execute your strategy in a robust way under various
conditions, including the temporary loss of the network connection.
Does this answer your question?
> How do you modify the
> program to run continuously without missing any trades (on a dedicated
> server perhaps?)
>
Some people do run it on a dedicated server. My personal view is that
if you can't tolerate a loss which would occur if you lost the
connection to TWS, you are probably overleveraged (i.e, trading too
much in size).
> b) does a single JBT session allows for using multiple instruments to be
> traded with the same underlying strategy? if my strategy requires to trade
> spot Euro with two nearest month futures contract, is that possible
>
There is only one instrument allowed per strategy. However, you can
run arbitrarily many strategies at the same time. So, yes, it's
entirely possible (and very easy) to set up two strategies which would
trade spot Euro, and two Euro future contracts with different
expiration.
> c) what if the strategy requires to address two different accounts? let's
> say I have some trades to be placed on a primary account and some offsetting
> trades on a hedge-account, is that something do-able with JBT
>
Yes, this is certainly possible. JBT has a mechanism to prevent from
launching more than one instance of itself, but it's straightforward
to override this mechanism. This will enable you to run two instances
of JBT, each connecting to two different ports opened in TWS. Some
people have already tried it, and I know this works.
> d) latency and delay. assuming you wanted to implement a strategy that aims
> for speed of execution, how close can you get to a real-time performance
> with IB's platform. From what I have been told and observed, the market
> snapshot operates at an interval of 1 second aggregating smaller data
> intervals. what can be realistically done to improve on this performance in
> terms of hardware or software.
>
>From the hundred of trades that I've placed and executed, I can see
that the average time to execute a trade is about 300ms. That is, from
the moment JBT submits a trade and the moment the confirmation is sent
from TWS, the average time is about 300ms. That's plenty fast for me,
but perhaps you are looking at something ultra-fast, in which case I
think you can ask IB to host your app on their servers.
The above applies to executions. In regards to market data itself, IB
servers send market depth updates to TWS approximately 3 to 4 times
per second. Each update contains a set of of market depth changes. For
example: {level 1 changed from 100 size to 200 size, level2 changed
from 1024.00 price to 1024.25 price, and so on). Typically, each
update has 10 to 50 changes in it. These updates are in turn
transmitted to JBT via the IB API. As you noted, JBT consolidates
these intra-second updates and records the snapshot every second. It's
certainly possible to give it higher resolution in JBT. That is, the
updates don't have to be consolidated. The consequence is that your
recorded data size will increase by the factor of about 100 to 200,
and so will the backtesting and optimization time.
--
You received this message because you are subscribed to the Google Groups
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jbooktrader?hl=en.