3rd Party Function slowing backtest in Portfolio Backtest?
3rd Party Function slowing backtest in Portfolio Backtest?
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?
- ABC
- Posts: 718
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 408 times
- Contact:
Re: 3rd Party Function slowing backtest in Portfolio Backtes
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
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
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.
41575.56 & 41575.56
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;
- ABC
- Posts: 718
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 408 times
- Contact:
Re: 3rd Party Function slowing backtest in Portfolio Backtes
Aston1,
you are welcome. DateTimeToString_Ms might help you. MilliSecondsFromDateTime and SecondsFromDateTime should also work.
Regards,
ABC
you are welcome. DateTimeToString_Ms might help you. MilliSecondsFromDateTime and SecondsFromDateTime should also work.
Regards,
ABC