Perfect synchronisation is of course, not possible, but right now we have arbitrarily defined second boundaries and I would expect a significant improvement if we all had at least the same yard stick.
On Thu, Aug 20, 2009 at 8:08 PM, ecthx <[email protected]> wrote: > > I completely forgot that we had a few of these discussions in the past > and the general consensus was that it would not work. Even if our > clocks are in perfect > sync it still takes different amount of time for data packets to reach > every user > and therefore perfect synchronization is not possible. > > > On Aug 20, 1:07 pm, MKoistinen <[email protected]> wrote: > > Sounds like we need a 'reliable' source of time that all JBT users > > could 'sync' to. Why not use IB here? > > > > JBT could request a 15 minute or 1-hour bar on the XYZ, for example. > > And, on each received bar, JBT would re-sync its 1-sec interval for > > market book data. Certainly IB guarantees that everyone subscribing > > to a 1 hour bar on XYZ receives the same bar (although there will be > > slight variances in how quickly it is sent). If I understand > > correctly, at the moment, JBT relies on the system clock of the host > > computer, this should certainly get us all much more in sync. > > > > On 20 Aug, 03:53, nonlinear5 <[email protected]> wrote: > > > > > The long time JBTers are aware of this problem: when multiple people > > > run the same strategy in the same time frame, their results may be > > > different. For the benefit of everyone, I'd like to explain why this > > > happens, and perhaps someone would come up with an idea to improve the > > > consistency. > > > > > When JBT runs in the "trade" and "forward test" mode, it's driven by a > > > timer which fires 1 time per second. Every time the timer fires, JBT > > > calculates the depth balance as the midpoint between the lowest and > > > the highest depth balance observed during that second. This midpoint > > > balance is what gets fed to the indicators, which ultimately generate > > > trading signals. This approach works fairly well. We've run multiple > > > multi-user tests in the past, and I am also regularly checking my > > > results with another JBTer who runs the same strategies. Most of the > > > time, the results match well, with occasional exceptions. Here is why > > > these exceptions occur: > > > > > The timer uses the computer clock, and obviously, everyone's clock is > > > different. When user A samples 1-second interval, it may be, say, > > > 10:00:05.200 to 10:00:06.200 real time period. By "real time", I mean > > > the most precise, atomic time, which is the same for everyone. At the > > > same time, user B sample could be 10:00:05.900 to 10:00:06.900, > > > measured by the same atomic clock. So, users A and B are "out of > > > phase" by about 700 milliseconds. As a consequence, their min/max > > > depth balance observations would differ by small amount. Now, imagine > > > that some strategy triggers a long trade when the indicator value > > > exceeds 100. Because of the small differences, the indicator for user > > > A may reach 100.01 and trigger a trade, while the same indicator for > > > user B may reach 99.99 and drop off, never triggering a trade. An > > > additional source of the differences is the PC clock drift, which may > > > cause JBT to sample overlapping periods, or to have gaps in the > > > samples. > > > > > Here are a couple of ideas that I have to improve the multi-user > > > consistency: > > > > > 1. Instead of the midpoint depth balance, use a 1-second average (or > > > an exponential average) of the depth balance. > > > > > 2. Instead of using the PC clock, obtain the atomic time from a time > > > server (such as the US Naval Observatory time server), and trigger > > > depth balance sampling based on the changes in that atomic clock. This > > > would involve continuous polling of the time server, multiple times > > > per second. This is easy to do in Java, but it may not be reliable, as > > > the server may go down. The server may also deny service, if the > > > requests are deemed to be too frequent. > > > > > If you have any other ideas, feel free to share with the group. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
