Hi Ade --

I may be misunderstanding, but I don't see that CBT will be involved.  I'm
thinking something like this may work -- all in pseudo-afl code.

///////////////////////
//  ConditionSwitch.afl
//
//  Determine the current condition
//
//  Use whatever foreign series and indicators you need
//  to set Condition to an integer value
//  Condition = xxxx;
//
//  Use the switch statement to set the parameter values
Switch (Condition)
{
Case 1:
V1 = xxx;
V2 = xxx;
Break;
Case 2:
V1 = yyy;
V2 = yyy;
Break;
}
// Proceed with your trading system
//  using values of V1 and V2 that depend on broad conditions.
Buy = something related to V1 and V2;
Sell = ;

/////////////////////

Or do you have something else in mind?

Thanks,
Howard


On Fri, Au
g 20, 2010 at 12:37 AM, adexie <[email protected]> wrote:

>
>
> thanks Howard for your suggestion. I guess the difficult part for me is how
> to code it up. I found this online,
>
> http://www.amibroker.com/kb/2008/05/19/historical-portfolio-backtest-metrics/
> but it's not very comprehensive on custom backtest. Do you know of any
> other documentation on this topic?
>
> Thanks very much. And btw, big fan of your trading system book!
>
> Ade
>
> --- In [email protected] <amibroker%40yahoogroups.com>, Howard B
> <howardba...@...> wrote:
> >
> > Hi Ade --
> >
> > You might add logic code to your afl that identifies the category of
> market
> > condition, then sets the parameters the way you want them for that
> > condition, and then continues on with the optimization.
> >
> > Perhaps using the Switch statement.
> >
> > Thanks,
> > Howard
> >
> > On Thu, Aug 19, 2010 at 9:20 AM, adexie <ade...@...> wrote:
> >
> > >
> > >
> > > Greetings all,
> > >
> > > I was wondering if anyone knows whether it is possible to do customized
> > > walk forward backtesting with afl code? So I have control over what
> > > parameter from IS to use in OS. For example, each time after a IS
> > > optimization, i would like to modify the parameter from the
> optimization
> > > based on current market condition and then use that in OS, Instead of
> > > directly use the best parameter in the OS test.
> > >
> > > Any input is greatly appreciated.
> > >
> > > Best,
> > > Ade
> > >
> > >
> > >
> >
>
>  
>

Reply via email to