Back testing theories

Optuma Forums Optuma Scripting Back testing theories

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #44487
    • Topics: 35
    • Replies: 55
    • Posts: 90


    I am wondering how I backtest 2 theories at the same time. 

    I could not work it out so I started to play with the following:

    As a simple (not recommended) example, in the backtest manager I select All Time Low + DOW THEORY Long. 

    So in my mind, this is what I am looking for: When the stock hits an ATL, look for next event to trigger a buy. Once DOW THEORY Long (buy) has been triggered than 2 (or more) of my rules have been met and buy on next open.

    <hr />

    This is what I find happens – Nothing

    Once the stock has hit an ALL TIME LOW, DOW THEORY cannot be triggered as it will no longer be at an ATL.

    <hr />

    I found the same to occur when I wanted to have the backtest trigger when I am using MA. It will only trigger if the 2 events occur at the exact same time, not if one happens and the next event is then waited for.

    • Topics: 29
    • Replies: 1,494
    • Posts: 1,523

    Hi Jonathan,

    The approach I will always take with this is to test my logic on a chart first. Put the script in a “Show Bar” tool and see if you get any results. If not, then start breaking up the script into components and see what is going on.

    What I suspect is that the ATL and the Dow Long will never happen at the same time since there needs to be a confirmed up move for the Dow to be consider in an up trend (unless there is a different rule that I am not aware of). Nevertheless, the show bar exercise will show you that. You could also put the two components in separate show bars and see if there is ever an overlap of signals.

    If you do find that there is not an overlap but taking a Dow Long within 10 days of an ATL, then you can use the TimeSinceSignal() function. You can see the lesson on that here:

    Hope that helps


    • Topics: 4
    • Replies: 6
    • Posts: 10

    Hi Guys,

    I am also trying some back testing part of which isn’t going as I would expect.  I am using the ranking functionality in Version 1.2 and would like to rank stocks and rebalance the portfolio on a weekly basis based on the Hull ROAR function, this seems ok.  However I also have a daily moving average crossover of the XJO as a market filter.  ie If MA1 is greater than MA2 I can buy, from the ranking list, otherwise I can only sell.  In the back test I am using the MA cross as entry criteria and the Hull ROAR function as the ranking function.  I have noticed from the test results that the MA function is ignored and buying and selling occurs during periods when MA1 is less than MA2.

    Any advice on how to conditionally buy from the ranking list?


    cheers  Evan

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.