I don't believe that any time server would allow you to check the time
that often, it would probably consider it as a  DoS attack or some
sort of abuse.
We could try to use NTP to synchronize our clocks and then record
snapshots based not on regular interval but on PC clock.
This may not be perfect solution but I use NTP and it keeps my
computers
clocks synchronized to few hundred microseconds. It can supposedly
maintain
time to within 10 milliseconds over the internet and it takes care of
the clock drift too.
We might do a multi-user test since all it requires is NTP client and
small change to the code.
NTP client for windows:
http://www.meinberg.de/english/sw/ntp.htm#ntp_nt_stable

On Aug 19, 9:53 pm, 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to