Running multiple variations of the same strategy

Forums ProRealTime English forum General trading discussions Running multiple variations of the same strategy

  • This topic has 31 replies, 10 voices, and was last updated 6 years ago by avatarDerek.
Viewing 2 posts - 31 through 32 (of 32 total)
  • #55913

    I guess the big similarity is that we receive one initial signal (go long for example) and then increase the position size. We learn that not all trades up to the maximum position size must be taken since some strategy-indicator combinations will just not get to the point of entering the market

    It is exactly this that makes it quite difficult to backtest accurately. If you have a backtest bell curve and decide to enter at the top and two positions either side it is not always guaranteed that all five positions will open. You will also want to optimize again and if for example your first optimization says that a variable set at 1 2 3 4 and 5 straddles your bell curve and then a day or two later 3 4 5 6 and 7 straddle the bell curve then if you are still opening bets on 1 and 2 you are well off the mark with those bets – but just imagine if you were only allowed to place one bet and then you would find that it is still on 3 which used to be the best place but is now on the edge of being the worst place. For me this is why I feel that diversification of a key variable in a strategy is probably a benefit – an unproven theory thus far by myself but one worth continuing with I think. 

    Thanks for everyone’s input so far. I believe that discussions on the theory of position sizing, diversification and methodology are as important as finding that winning combination that gives a strategy an edge.

    #56178

    Since I don’t know if a picture of my notebook is really helpfull for anybody, here is a little guide and toolkit to test the method we are discussing. This way everybody can check for themselves.

    We can backtest a different set of indicator values with PRT. Run a simple backtest with the respective range for the indicator value. Sort the results according to the indicator you are testing. Don’t close the result list! Prorealtime provides a reasonably good result table IMO.

    Here is the position sizing function:

    Time dependent entry and exit variables can also be tested with adapting values.

    In this example the system initiates the sequence of trades with a time lag:

    This will help to calculate returns for a long term etf strategy buying regularly like Casper’s great piece. https://www.prorealcode.com/topic/vusa-daily-buy-and-hold-v2-0/
    If we buy a real etf and not a cfd on a etf the cost calculation is a lot more easy.

    Another possibility is to wait for better prices before adding more positions:

    Maybe somebody else provides the code to withhold the first trade before the price drops. In the example above, at least we don’t miss any big move completely. A more classic trendfollowing approach is waiting for the price to actually go up first. I added the example because it’s also included in the book chapter mentioned in my last post.

    Of course a time based exit with adapting values can also be implemented. For every new trade, the exit is delayed.

    As usual more complex functions can be applied to change the indicator values. This way we can test different distributions other than linearity. In the examples above X marks the indicator which is tested. An example for an exponential distribution:

    For full enjoynment, here is a helpful formula collection:
    http://www.itl.nist.gov/div898/handbook/eda/section3/eda366.htm

    I hope this helps for testing this method in Proorder. Improvements and necessary corrections to the code snippets are welcome.

Viewing 2 posts - 31 through 32 (of 32 total)

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