Is it possible to code a Fixed Time Period?

Forums ProRealTime English forum ProOrder support Is it possible to code a Fixed Time Period?

Viewing 10 posts - 16 through 25 (of 25 total)
  • #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.

     

     

     

    #166426

    Hi 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.

    #166433

    come 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.

    #166441

    Thanks, I’ll give it a try.

    #166513

    Thanks, 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?

    #166678

    Graha, is the code behind the Walk Forward BT function available?

    #166679

    I would say not as this would be PRT proprietary information.

    #166685

    Are 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?

    #166874

    Fair enough. I was just hinting that maybe the underlying code could point to what could be used by us, the users.

    #166875

    Many thanks for the suggestion Gra…… I’ll give this a play, but I am useless at coding, so don’t hold your breath!! 🙂

Viewing 10 posts - 16 through 25 (of 25 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login