Is it possible to code a Fixed Time Period?
Forums › ProRealTime English forum › ProOrder support › Is it possible to code a Fixed Time Period?
- This topic has 24 replies, 3 voices, and was last updated 3 years ago by 8ficusst.
-
-
04/07/2021 at 3:48 PM #166420
I have found that the figures on backtests are incongruent when comparing different backtest quantities of units.
For example a backtest on 10,000 units may have no losses but a 100,000 backtest would show losses in the segment of time normally covered by a 10,000 backtest and not at the beginning of the 10,000 backtest time period which as overlap you could go some way to understanding. My logical mind says that even though I can appreciate a backtest is a rough approximation on each individual candle there should be a demarcation between each 24hr day this doesn’t seem to be whats happening when testing over a larger number of units. Maybe this has been fixed in v11, I cross my fingers and hope.
Multiple OOS backtests on a smaller amount of units may give a better representation and accuracy, just my own opinion before everyone shouts me down telling me I should be backtesting over a decade. 🙂
With 80% of JP Morgans transactions being automated trades we can’t assume that market conditions are the same 10 years ago as they are now, particularly with the amount of market manipulation I see happening on markets like the DJI. Is it crazy to think that maybe a backtest no longer than the last 2 years may give a more accurate understanding of the market conditions we are now working within ?
I’m opening this up for discussion please feel free to comment and add your views and my apologies if I’ve hijacked this thread but I do think it’s relevant.
04/07/2021 at 4:31 PM #166426Hi Kovit.
Of course I am only relating my opinions, research and findings to the types of models I use, which typically involve cross over types of models which surf the swings both long and short.
Backtest results had me fooled for ages until I finally realised that they are only really verifying that your model has the ability to yield points if configured in a certain manner on a particular instrument. I found that BT’s over longer periods are completely pointless, as all that they (mainly) do is find a certain setting in your variables that is common to similar price actions over time. But those price actions do not repeat themselves sufficiently in the future to make that same setting feasible for future use.
Therefore I only use BT’s with small fixed moving periods up to Real Time to enable me to follow each individual swing at a time. The big challenge doing it this way is finding which indicators to use and what ranges of variables to use in order to follow each swing optimally.
But if someone can come up with a moving-period that we could use with a BT, then it will make that work much easier and faster.
04/07/2021 at 5:02 PM #166433come up with a moving-period
You might be able to code something around … CurrentTime + 003000 (which would be read as, for example, 170000 + 003000) … for the scenario where you want a 30 minute backtest from 17:00.
04/07/2021 at 6:29 PM #16644104/08/2021 at 11:35 AM #166513Thanks, I’ve tried your suggestions, but no joy thus far. I think that one would need to have insider knowledge of the programming behind a Constant such as BarIndex in order to use it to provide a Walking Forward fixed-time period.
Yes, some sort of BarIndex coding seems the most promising idea of yours so far, as its key function involves the counting of bars. BarIndex seems to be mainly used in counting forwards from real time in order to act as a trigger after a certain condition occurs.
Maybe your coding colleagues might have some more clues for this Walking Forward fixed-time requirement – or maybe its not possible within the capabilities of the platform? What do you think?
04/10/2021 at 10:52 AM #16667804/10/2021 at 11:06 AM #16667904/10/2021 at 1:04 PM #166685Are you clever enough tto code / use this in some way?
https://www.prorealcode.com/documentation/datetobarindex/
Date can be in the form YYYYMMDDHHMM so from Current Time 202104100000 to 202104100030 … in some usable way for you?
04/12/2021 at 4:23 PM #16687404/12/2021 at 4:25 PM #166875 -
AuthorPosts
Find exclusive trading pro-tools on