Thank you for explaining that, I was wondering what these parameters mean
too.

So, would the back testing mode close all opened positions when a GAP is
detected? In other words, does it avoid overnight positions?

Thank you,
Victor



On Tue, Jan 11, 2011 at 3:58 AM, Eugene Kononov <[email protected]>wrote:

> I guess I should have documented this better, since you are not the first
> one who is asking about. GAP_SIZE and MIN_SAMPLE_SIZE control how JBT
> handles data gaps. Let's say your trading schedule is 10am to 3pm, and you
> have recorded two days worth of data. Your recording session covered the
> data from 7am to 4pm on day one, and 7am to 4pm on day two. When you
> backtest and optimize this data set, what happens after you go from 4pm on
> day one to 7am on day two? Your indicators still have the values as of 4pm
> from the previous day, and although there was an overnight trading session,
> they will continue to update as if nothing happened since 4pm yesterday.
> Effectively, the indicators will reflect the state of the market as of the
> end of the last recorded day, and that state may, of course, be irrelevant.
> It will also produce different results in real trading, compared to your
> results in backtesting. To prevent this situation, JBT resets all the
> indicators when a data gap of larger than GAP_SIZE is encountered.
> Subsequently, the indicators are allowed to "settle" to their values for the
> amount of time which corresponds to the MIN_SAMPLE_SIZE period of time, and
> no trading is allowed even if trading signals are generated . With this
> handling of data gaps, your back tests, forward tests, optimization, and
> trading will produce the same results.
>
> Does this make sense?
>
>
>
> On Mon, Jan 10, 2011 at 7:54 AM, aqc <[email protected]> wrote:
>
>> Hi Eugene,
>>
>> In IndicatorManager.java, there are following codes:
>>
>> private static final long GAP_SIZE = 60 * 60 * 1000;// 1 hour
>> private static final long MIN_SAMPLE_SIZE = 60 * 60;// 1 hour worth of
>> samples
>>
>> What are the definitions of GAP SIZE AND MIN SAMPLE SIZE? I played
>> around with min sample size by changing it to 60*45 and 60*30. I
>> noticed that the smaller the min sample size, the more trade signals
>> generated by defender strategies. Can I know how GAP SIZE and MIN
>> SAMPLE SIZE got used by the indicator?
>> Thank you for your help.
>>
>> --
>> 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]<jbooktrader%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/jbooktrader?hl=en.
>>
>>
>  --
> 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]<jbooktrader%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jbooktrader?hl=en.
>

-- 
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