Charts

61 views
Skip to first unread message

Klaus

unread,
Dec 2, 2012, 8:19:53 PM12/2/12
to jbook...@googlegroups.com
It seems that 
a) if I start a back test of a different strategy, I can no longer display an earlier chart. 
    (says: run the strategy first)
b) on the other hand, it seems that if I run a number of different strategy, the memory
is later on not (completely) freed. - I thought this would be the charting data. 

While both make from their respective point of view sense, both at the same time do not 
make much sense. - Or is the loss of memory s.th. different?

Klaus

Eugene Kononov

unread,
Dec 3, 2012, 9:27:58 AM12/3/12
to jbook...@googlegroups.com
Charts can (potentially) use enormous amounts of memory, because all of the historical data with regards to prices and indicators is preserved. For that reason, in JBT, you can show charts only one at a time. That is, the chart becomes available after you run a backtest for a given strategy A. If subsequently you run a backtest for strategy B, the chart for B becomes available, and the chart for A is no longer in memory.


Klaus

--
You received this message because you are subscribed to the Google Groups "JBookTrader" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jbooktrader/-/_UDw8OUOQLQJ.
To post to this group, send email to jbook...@googlegroups.com.
To unsubscribe from this group, send email to jbooktrader...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jbooktrader?hl=en.

Klaus

unread,
Dec 8, 2012, 9:55:22 PM12/8/12
to jbook...@googlegroups.com
Well, what I observe is that when I run a strategy with JBT, it (of course allocates memory), when next thing I run a different strategy more memory is allocated. 
I just tried it with the sample data and the distribution JBT. Only change was to create 20 copies of the Sample strategy.  It rapidly builds up from 250 to about 350 MB when more strategies are run. 
There the curve flattens at some point. 
However it is a small data set. I have the problem that if I do the same with my installation and my dataset  I see a much larger initial 
memory allocation and actually a similar build up of memory allocation. Thus, at some point it hits the wall and I have to restart JBT to run more strategies. This seems to be in line with the aymptotic build up of memory use.

Klaus

Eugene Kononov

unread,
Dec 9, 2012, 1:18:58 PM12/9/12
to jbook...@googlegroups.com
The default starting option for JBT is "aggressive heap": -XX:+AggressiveHeap
This is meant for the use when you are optimizing. When backtesting, forward-testing, and trading, you may want to use a less aggressive option, for example:
-Xmx=256M

Can you try that and see if you still observe the same issue as you reported? Thanks.

To view this discussion on the web visit https://groups.google.com/d/msg/jbooktrader/-/BrvC38YGFrkJ.

Klaus

unread,
Dec 15, 2012, 5:47:55 PM12/15/12
to jbook...@googlegroups.com
I did it with Xmx256M and it does indeed seem to flatten (at about 300 MB). Also with Xmx150M 
it flattened at about 260M.
So, I will try to investigate further, why and under what conditions it does fail..

Klaus

Judson Wilson

unread,
Dec 15, 2012, 7:52:30 PM12/15/12
to jbook...@googlegroups.com
Just thinking out loud here.... maybe you need to force garbage collection?
> https://groups.google.com/d/msg/jbooktrader/-/H6rI2sRGd_wJ.

Eugene Kononov

unread,
Dec 15, 2012, 8:06:24 PM12/15/12
to jbook...@googlegroups.com
The most significant factor is the "bar size" setting for chart. At the "1-hour" setting, the memory usage would be 720 times less compared to the "5-second" setting. So, set this judiciously. For the long term performance charts (such as 1-year), I set it to 1-hour bar. If I want to focus on a particular day, select the "start/end dates" in the backtester, and then you can go as low s 5-seconds.
Reply all
Reply to author
Forward
0 new messages