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

Re: [amibroker] Difference betwee OOS and IS



PureBytes Links

Trading Reference Links

Louis,

> Hi Howard,
>
> Thanks for the code and the information.  What exactly is doing the
> CMO Oscillator?  I tried to look for information on the web but did
> not find anything convincing.  It sure looks interesting and I will
> try to find more about it, but right now this look like mystery to
> me.

The CMO is the Chande Momentum Oscillator which is actually a variation 
of the RSI - see, e.g., 
http://www.paritech.com/education/technical/indicators/momentum/chande.asp .

Greetings, 

Thomas

>
> Something I wasn't sure in your book, is what you mean by objective
> function.  Do you mean choosing between RAR, or CAR, or K-Ratio,
> etc.?  I know this sound like a stupid question after I've read 75%
> of the book, but... well...  I wasn't sure.
>
> I will try to follow the steps as you write them below.  However, I
> am still worried about MCS; I mean, in the steps you don't use any
> random optimization and you said not to worry about them.  I say that
> because it seems to me that in the walk-forward it can be easy to get
> lucky with some very good curve-fitting results.  And the more
> complex the rules, the more chances there is to get a very lucky
> result!  Well, this was my whole point: in the walk-forward I only
> get to see the absolute best return, and if there is no random
> optimization I can't rule out the luck factor!
>
> Thanks!
>
> Louis
>
> p.s. Mike, thanks for the suggestion.  Is Pardo's book really good
> and is using afl code or codes that can be implemented easily to
> Amibroker?
>
> 2008/4/22, Howard B <howardbandy@xxxxxxxxx>:
> >   Hi Louis --
> >
> > If the system you are working with is actually the crossover of two
> > simple moving averages, the results you get will probably not be
> > very good.  I often suggest a simple system when I am trying to
> > make a point that requires a system and I do not want the
> > definition of the system to confuse the other point.  You will need
> > a system that is more sophisticated to show good results.  Try the
> > CMO Oscillator in the code posted below.
> >
> > // CCT CMO Oscillator.afl
> > //
> > //    A CMO Oscillator
> > //
> > //
> >
> > //    Two variables are set up for optimizing
> > CMOPeriods=Optimize("pds",61,1,101,5);
> > AMAAvg=Optimize("AMAAvg",36,1,101,5);
> >
> > //    The change in the closing price is summed
> > //    into two variables -- up days and down days
> > SumUp = Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),CMOPeriods);
> > SumDown = Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),CMOPeriods);
> >
> > //    The CMO Oscillator calculation
> > CMO = 100 * (SumUp - SumDown) / (SumUp + SumDown);
> >
> > //Plot(CMO,"CMO",colorGreen,styleLine);
> >
> > //    Smooth the CMO Oscillator
> > CMOAvg = DEMA(CMO,AMAAvg);
> > //    And smooth it again to form a trigger line
> > Trigger = DEMA(CMOAvg,3);
> > //    Buy when the smoothed oscillator crosses
> > //    up through the trigger line
> > Buy = Cross(CMOAvg,Trigger);
> > //    Sell on a downward cross, or 6 days,
> > //    whichever comes first
> > Sell = Cross(Trigger,CMOAvg) OR BarsSince(Buy)>=6;
> >
> > Buy = ExRem(Buy,Sell);
> > Sell = ExRem(Sell,Buy);
> >
> > Plot(C,"C",colorBlack,styleCandle);
> >
> > PlotShapes(Buy*shapeUpArrow+Sell*shapeDownArrow,
> >     IIf(Buy,colorGreen,colorRed));
> > Plot (CMOAvg,"CMOAvg",colorGreen,
> >     style=styleLine|styleOwnScale|styleThick,-100,100);
> > //Figure 20.2 CMO Oscillator
> >
> > Now -- back to the issue of validating a trading system --
> >
> > Tomorrow is out-of-sample.  You want to increase your confidence
> > that your trading system will be profitable when you trade it
> > tomorrow.  In order to do this, observe what happens after you have
> > optimized a system over an in-sample period, then tested it on the
> > immediately following out-of-sample data.  The automated walk
> > forward process helps you do this.  Every step gives one more
> > observation of the in-sample to out-of-sample transition.  If the
> > cumulative out-of-sample results are satisfactory to you, then you
> > have increased confidence that your real trades are likely to be
> > profitable.  No guarantees.  The best we can hope for is a high
> > level of confidence.
> >
> > At this point, do not worry about Monte Carlo.
> >
> > Just concentrate on:
> >
> > 1.  Select the objective function that You feel most comfortable
> > with. 2.  Design and test the systems of interest to You.
> > 3.  Experiment to find the length of the in-sample period.
> > 4.  Perform the automated walk forward analysis.
> > 5.  Examine the out-of-sample results.
> > 6.  Decide whether or not to trade your system.
> >
> > Thanks for listening,
> > Howard
> > www.quantitativetradingsystems.com
> >
> >
> >
> > On Tue, Apr 15, 2008 at 7:03 PM, Louis Préfontaine
> > <rockprog80@xxxxxxxxx>
> >
> > wrote:
> > >   Hi,
> > >
> > > I've been experimenting with walking-forward, and I have some
> > > questions regarding how it works.
> > >
> > > I ran a complete random optimization or buying/selling using the
> > > variables I set (a MCS in fact), and systematically OOS results
> > > were worst than IS.  I don't understand how it works, because
> > > whatever if the sampling is IS or OOS it is always the same
> > > variables that are in place.
> > >
> > > Anyone could explain how this work?
> > >
> > > Thanks,
> > >
> > > Louis



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

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html
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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto: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/