Page 1 of 1

3rd Party Function slowing backtest in Portfolio Backtest?

Posted: Oct 25 2013
by Aston01
I have been using the tradition average function in a strategy during back testing and recently opted for a Jurik MA to calculate that single value. With just that one change alone my back testing times went from 15-20sec to 6-8min. Is there something going on here that I am not aware of that would cause such a disparity?

Re: 3rd Party Function slowing backtest in Portfolio Backtes

Posted: Oct 27 2013
by ABC
Aston01,

in my opinion this can be caused various reasons, in your example it's probably the time it takes the DLL to receive the values, calculatate the result and for MC to get the result that simply adds up.
You can do a quick check with an indicator. Call the simple average function and stop the time it needs to calculate (using ComputerDateTime once at the beginning at when the calculation is done and then build the difference). Then do the same with the JMA.
If there already is a noticeable difference this will add up with every optimization iteration.

Regards,
ABC

Re: 3rd Party Function slowing backtest in Portfolio Backtes

Posted: Oct 28 2013
by Aston01
Thanks ABC,

Any idea how I can get the output value down to micro seconds? Currently just using ComputerDateTime I receive the same values in the print statement.

Code: Select all

If Condition1 then begin
Value25= ComputerDateTime();
JMA = JRC.JMA.reset.2k( Close of Data2, length, phase, condition1);
Value26= ComputerDateTime();
end;
41575.56 & 41575.56

Re: 3rd Party Function slowing backtest in Portfolio Backtes

Posted: Oct 28 2013
by ABC
Aston1,

you are welcome. DateTimeToString_Ms might help you. MilliSecondsFromDateTime and SecondsFromDateTime should also work.

Regards,
ABC