[ts-gen] Keeping TWS/shim up for an entire week?
R P Herrold
herrold at owlriver.com
Mon Aug 17 15:55:57 EDT 2009
On Tue, 18 Aug 2009, Ken Feng wrote:
> Here's a question - is it possible to restart TWS/Shim once every 24
> or 12 hours without any loss of incoming ticks? If so, how would you
> go about it?
I have a couple of thoughts:
Predicate matter:
1. Forex (via the TWS, or another couterparty's interface)
does not have a central 'exchange', and is different from
almost every other electronically tradeable symbol out there.
The couterparty is, at the end of the day: IB alone
2. As Bill has mentioned, and on good authority, the TWS is
not really designed for 24/7 no-outage operation and data
transfer; when I am told bu the couterparty, 'don't do that' I
believe them
3. MQ trading and one assumes market data feed implementations
to ensure a continuous ordered stream (as provided) transfer
exist, but are not what the TWS is
4. The shim will use up to 8 overlapping (as to
subscriptions) connections to a single TWS; A second ISP
connection, and second TWS account are not difficult to set
up. Call these TWS A and TWS B, and vary the restart time of
A and B daily, and re-establishing shim A (to TWS A), and shim
B (to TWS B) at will, but in a fashion that there is never
interval of a complete dropout of a shim talking to a live
TWS.
5. There is no problem running two TWS listening on two
different ports, on a single Linux box; similarly, there is no
problem running multiple shim's on a single Linux box
Result:
You have [re-]established that there is a middle of the night
temporary outage of the TWS being able to 'unreach' its next
hop at IB central; this comports with prior reports.
Suggestions exist on the Yahoo that the 'location' that an
account connects to may be varied on request to IB customer
service (US CT, Switzerland, and Hong Kong data ceners, as I
recall), for a second account
The obvious next step to experiment with is: connect TWS to
datacenter A, and TWS B to datacenter B
The shim is clearly out of the picture as a place for
improvement past its connection to the local TWS -- This is an
issue for the upstream alone to offer guidance, or for
experimentation to occur by an interested party, or both
------------------------
One assumes that the counterparty, whether IB or another
vendor, does not inadvertently expose arbitragable events
against itself, in this special case of non-exchange based
forex. [It may or may not be the case that IB as the next hop
broker does not take away all subsequent arbitragable events
(viz., follow, so as to functionally frontrun, after a 'first
trade' points out such an opportunity) -- one cannot watch
everywhere all the time with the same degree of intensity]
Assume for the sake of argument that the 'remote data reset
times' are sufficiently different that no overlapping outage
then exists. Problems to solve then become: synchronizing
the two data streams; when is the market so 'thin' as to be
untradeable, such that it does not matter that the stream has
a dropout; is the trading system so tightly tuned that a
dropout really matters (the suggestion being it is over-tuned,
of course).
good trading ;)
-- Russ herrold
More information about the ts-general
mailing list