[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: I optimize, reset defaults, run backtest and can't duplicate results


  • Date: Fri, 05 Mar 2010 00:09:07 -0000
  • From: "Mike" <sfclimbers@xxxxxxxxx>
  • Subject: [amibroker] Re: I optimize, reset defaults, run backtest and can't duplicate results

PureBytes Links

Trading Reference Links

I believe that the results should always be the same. What you are seeing is likely not related to your strategy logic, but rather your manual updates to reflect the Optimization parameters. 

Next time it happens, triple check that you have:

- Adjusted the default for *all* Optimization statements (I see 6 of them in your code).

- Are using all the same settings as the original optimization, in particular: ApplyTo, Range, Long vs. Short, Trade Delays, Pad and Align, etc.

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "graphman27" <steve@xxx> wrote:
>
> Greetings:  I've only had this happen a few times, but I run an optimization, choose the best parameters, insert them as the new default values and run another backtest.  98% of the time, with all my different strategies, I can duplicate the optimized results, which is obviously what should happen.  However, on a few occasions, I follow those steps and get results not even close to the optimized values.
> 
> I'm assuming there is something wrong with the simple code I use in this strategy.  Maybe something with the "Buy" or "SELL" segment and not properly using "CROSS."  Being a newbie to AmiBroker, I can't see the problem, but I'm sure someone with good afl skills will probably immediately spot it:
> 
> EMAShortBuy=Optimize("EMAShortBuy",10,4,10,2);
> EMALongBuy=Optimize("EMALongBuy",50,20,60,10);
> StochRange1=Optimize("StochK1",20,10,40,10);
> StochRange2=Optimize("StochK2",2,1,3,1);
> 
> Buy = 	Cross(EMA( Close,EMAShortBuy ),EMA( Close,EMALongBuy ));
> 
> Sell = StochK(StochRange1,StochRange2)>75;
> 
> Short = 0;
> 
> Cover = 0;
> 
> Plot( EMA ( Close,10 ),"Short EMA", colorGreen, styleThick ); 
> Plot( EMA ( Close,50 ),"Long EMA", colorRed, styleThick );
> Plot( StochK ( 25,2 ),"stochk", colorBlue, styleThick ); 
> 
> /* max loss stop optimization */
> 
> ApplyStop(stopTypeLoss, 
>          stopModePercent, 
>          Optimize( "max. loss stop level", 0, 2, 10, 2 ), 
>          True ); 
> 
> ApplyStop(stopTypeTrailing, 
>          stopModeRisk, 
>          Optimize( "trailing loss stop level", 0, 10, 90, 10 ), 
>          True ); 
> 
> Any ideas are welcomed.
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/