Announcement

Collapse
No announcement yet.

Backtest Results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Backtest Results

    I just tried to backtest using an EFS. For all last month it has worked great, but now when I backtest with it the monthly results are wrong for October and are zero for November even though there are completed trades for November. In the monthly column I get two months of 10/02. I think there is something wrong with E Signal strategy testing.

    Bert

  • #2
    Hi Bert,

    I'd like to try and recreate that here in house. Is the backtesting formula that you used one provided from us? Did you adjust at all? If it's one you created or adjusted could you email me the efs file? Also, let me know which symbol, interval, bars, etc. you used & I'll try to recreate & we'll take a look at.

    Another way you might want to try, is post all that information here and if the efs file is different than what comes with the system, upload it to my file share accout (Andys Group) and perhaps a number of us on this board could take a look and play around with it to recreate.

    Either way, I'd be happy to take a look at it.

    Have a great weekend, all!

    Andy S.
    eSignal Support

    Comment


    • #3
      Backtest EFS

      Here is the backtest formula. It was built by E signal. I modified it to do nextbar, changed time frame on MACD to 12,26,9 and changed the color. I will try to e mail as well.


      Bert

      Code:
      var study = new MACDStudy(12,26, 9, "Close", false);
      
      function preMain() {
          setPriceStudy(false);
          setColorPriceBars(true);
          setDefaultPriceBarColor(Color.grey);
          setStudyTitle("MACD Strategy");
          setCursorLabelName("MACD", 0);
          setCursorLabelName("SIGNAL", 1);
          setDefaultBarFgColor(Color.blue, 0);
          setDefaultBarFgColor(Color.RGB(192,75,0), 1);
      }
      
      function main() {
      	var MACD = study.getValue(MACDStudy.MACD);
      	var Signal = study.getValue(MACDStudy.SIGNAL);
      
      	if(Signal < MACD && !Strategy.isLong())
      		Strategy.doLong("Long", Strategy.MARKET, Strategy.NEXTBAR);
      	if(Signal > MACD && !Strategy.isShort())
      		Strategy.doShort("Short", Strategy.MARKET, Strategy.NEXTBAR);
      
      	if(Strategy.isLong())
      		setPriceBarColor(Color.blue);
      	else if(Strategy.isShort())
      		setPriceBarColor(Color.RGB(192,75,0) );
      		    	
      	return new Array(MACD,Signal);
      }

      Comment


      • #4
        Hi Bert,

        Thanks for the formula. What was the symbol and time frame, or where you finding this problem on any symbol / time frame?

        Andy

        Comment


        • #5
          EFS Symbol

          I was trying it on NVLS 15 minute chart.

          But it is wrong on all the symbols.

          In the Monthly summary it should show an amount for November since there was a completed trade in November. Also a littler further down it shows two 10/02 month instead of a 11/02.

          Bert

          Comment


          • #6
            This does look like a bug. After running the .efs you provided, and some of the backtests provided by eSignal and ones created by myself - they all show the same problems.

            No Nov. trades listed on daily.
            Number of trades (and $ and % values) wrong for Oct. for Monthly.
            Number of trades for Nov. listed as 0.

            Garth
            Garth

            Comment


            • #7
              I took a look at the EFS snippet that was included and it did this:

              Code:
              if(Strategy.isLong())
                  setPriceBarColor(Color.blue);
              else if(Strategy.isShort())
                  setPriceBarColor(Color.RGB(192,75,0) );
              Is the chart coloring at the proper places?

              Just trying to figure out if the backtesting engine is the issue or the
              reporting engine.

              m.


              --- eSignal Forums Mailer <[email protected]> wrote:
              > Hello mattgundersen,
              >
              > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              >
              Matt Gundersen

              Comment


              • #8
                Colors

                Matt,

                Here are how the colors work. If you have the chart in view when the strategy for example changes from a sell to a buy, the color does not change. If you leave that chart in view and do not change anything, it will never change colors.

                On the otherhand if you change symbols and then go back to the previous one, it changes colors, but it is at the previous bar not where the nextbar should be. Hope this helps. If you need any more info let me know.

                Bert

                Comment


                • #9
                  Bert, what you describe with the colors sounds like something that happens in
                  realtime? For instance, if I do that now while the market is closed I will not
                  see that behavior?

                  This sounds like something different than what was originally reported in the
                  beginning of this thread?

                  Before I dig into this color issue, I first want to understand the reporting
                  issue. Going back to the original question with a slight modification, Is the
                  chart coloring at the proper places (when it's not realtime -- ie: the market
                  is closed)?

                  thx.m.



                  --- eSignal Forums Mailer <[email protected]> wrote:
                  > Hello mattgundersen,
                  >
                  > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  >
                  Matt Gundersen

                  Comment


                  • #10
                    A little more to add on that last question. The original issue posted to the
                    forum said "for all last month, it has worked great. Now when I backtest the
                    monthly results are wrong for October and zero for November even though there
                    are completed trades in November."

                    It sounds like there may be an issue with the strategy being off by a bar or so
                    - we'll dig into that after resolving this first issue.

                    The reason why I'm asking if the bars color (in about the right place) is
                    because the original post talks about monthly results being entirely wrong.
                    That could be due to trades occurring in the wrong place. It could also be due
                    to improper totalling of the trade results.

                    If you think the bars are coloring in about the right place then that tells me
                    the strategy worked ok and we need to look at the totalling side.

                    m.

                    --- eSignal Forums Mailer <[email protected]> wrote:
                    > Hello mattgundersen,
                    >
                    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    >
                    Matt Gundersen

                    Comment


                    • #11
                      Colors &amp; backtest

                      Matt,

                      What is happening to the colors and what is happening to the backtest results are two different problems.

                      First , the colors. Yes what I described on what happens to the colors was in real time. You will not see it on historical data.

                      Yes it was different than what was reported in the original thread.
                      The colors are always one bar before it should be. The strategy states that if the MACD line is grater than signal line go long.

                      But it says to do it at the market at nextbar. The color is occuring when the strategy goes long not where the execution happens.

                      Bert

                      Another post shortly on the reporting. Be right back

                      Comment


                      • #12
                        Reporting of backtest

                        Ok now to the reporting. Here are the parameters that I am using.

                        Stock NLVS, 15 minute ,intraday default, dynamic mode.


                        Once you backtest, Under the eSignal strategy analyzer, under the trades folder it shows 20 trades. These trades are occuring at the proper time. If you scroll down to the bottom there are trades completed on 11-1-2002.

                        Now move to the periodic analysis. Under the daily trading summary there are no trades for 11/1/02. That is a problem.

                        Under the Monthly Trading Summary, It shows 10 trades for Oct where there should be 18, and the amount should be higher.

                        If you move down a little under monthly period analysis, there are two 10/02, 10/02. The monthly period analysis also has two 10/02's as well.

                        The backtesting under trades are performing the trades at the proper time. I think it may be how it is moving it to the summary.


                        Bert

                        Comment


                        • #13
                          Matt,

                          The bars do change color at the right places. More to the point, run the MA cross over backtest supplied with eSignal and do it on a interval chart (use 15 minutes since this is what I did all my tests on - but I suspect it will be there for all).

                          Then go to the periodic analysis section in the analyzer and you will see the problem with that study also.

                          G
                          Garth

                          Comment


                          • #14
                            Any update on Backtest ???

                            Just wanted to know what was found or when the backtest is going to be updated.



                            Bert

                            Comment

                            Working...
                            X