Resolution of Performance Chart

37 views
Skip to first unread message

Klaus

unread,
Oct 8, 2011, 5:20:53 AM10/8/11
to jbook...@googlegroups.com
the performance chart is a great tool for understanding the way a tested strategy performs by seeing the various indicator values.
However, it is often cumbersome as all the bars are one minute bars, but JBT works on a one second basis.
Is there a way to change this parameter, so that for each second individually the values are plotted?
(I understand, this is also a memory and performance tradeoff, but in some cases this would just extremely helpful.)
This parameter is surely somewhere in the code, but I failed to find it. 

Ideally, of course, this would be a preference that can be set (either before the backtest is done or before the chart is plotted),
depending on how the aggregation works. However, if I would be able to find the code fragment and manipulate that, it 
would be fine for me as well. 

Thanks 
 Klaus

Jack Harvard

unread,
Oct 8, 2011, 9:00:50 AM10/8/11
to jbook...@googlegroups.com
Hi Klaus,

Look at the following two classes: PerformanceChartData and BarSize.

1. public PerformanceChartData(BarSize barSize, List<Indicator> indicators)
2. public enum BarSize extends Enum<BarSize>

The BarSize is defined in an Enum type, the smallest is 5 seconds, you need to add another Enum member 'second1'.

Hope this helps.

Jack

> --
> 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/-/JBTMC0y5FdEJ.
> 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.

Eugene Kononov

unread,
Oct 8, 2011, 9:07:09 AM10/8/11
to jbook...@googlegroups.com
The resolution of the performance chart is controlled with the "bar size for chart" parameter. Change it to the desired bar size, run backtest, and show the chart. The reason I didn't include the "1 sec" resolution is because on my system displaying 20 million 1-sec bars pushes the memory limits.
chart.png

Klaus

unread,
Oct 8, 2011, 9:35:32 AM10/8/11
to jbook...@googlegroups.com
Sorry. I am not sure, how I could miss this.
Having this it was also easy to find the corresponding code for the modification. 

Judson Wilson

unread,
Oct 9, 2011, 12:14:39 AM10/9/11
to jbook...@googlegroups.com
I recommend getting access to the fastest computer possible when you crank this up.  Otherwise it's as slow as a slug.

On Sat, Oct 8, 2011 at 6:35 AM, Klaus <klaus.s...@googlemail.com> wrote:
Sorry. I am not sure, how I could miss this.
Having this it was also easy to find the corresponding code for the modification. 

--
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/-/CF62BlBo6HYJ.

Klaus

unread,
Oct 9, 2011, 4:56:51 AM10/9/11
to jbook...@googlegroups.com
Thanks Judson, I typically use a machine with an I7 (laptop, though). 
It works, but I agree, it is slow. - On the other hand, I make these kind of analysis not with multi-month datasets, but with sets for a week or even a particular day, where I like to have a detailed view of something that is happening. 
I already put it to 1 second. While it is slow, it is ok.. - and I am happy, it now works.

BTW. The code is well done "nonlinear". It was simply adapting the single enumeration and the rest used 
this information transparently. Good programming style. 


Eugene Kononov

unread,
Oct 10, 2011, 6:47:16 PM10/10/11
to jbook...@googlegroups.com
I typically use a 1-min bar chart with the multi-month  data files. If I need higher resolution, I set it to a 5-second bar and specify a narrow date range in the backtest dialog.

--
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/-/hXht14oq5N8J.
Reply all
Reply to author
Forward
0 new messages