Howard, I would love to have access to OS trade list and stats too. I was going through the customized backtest doc, I might be able to achieve what I was hoping to do -- manipulating the parameter from optimization in WF backtest, but it's very difficult to implement. Thanks for all your advices.
Best, Ade --- In [email protected], Howard B <howardba...@...> wrote: > > Hi Ade -- > > It looks like you want the trade list and statistics from all of the > out-of-sample runs from a walk forward test. Is this correct? If so, > several of us have been asking to have this functionality provided as a > feature of AmiBroker. > > Thanks, > Howard > > > On Fri, Aug 20, 2010 at 2:37 PM, adexie <ade...@...> wrote: > > > > > > > Howard, > > > > Thank you for put the pseudo code together. It will be much easier to show > > what I meant. Please see in the code. > > > > > > > /////////////////////// > > > // ConditionSwitch.afl > > > // > > > // Determine the current condition > > > // > > > // Use whatever foreign series and indicators you need > > > // to set Condition to an integer value > > > // Condition = 1 or 2; > > > // > > > // Use the switch statement to set the parameter values > > > Switch (Condition) > > > { > > > Case 1: > > > V1 = 1 * V1(Optimization results from 1/1/ 2010 to 1/31/2010); > > > V2 = 1 * V2(Optimization results from 1/1/ 2010 to 1/31/2010); > > > Break; > > > Case 2: > > > V1 = 2 * V1(Optimization results from 1/1/ 2010 to 1/30/2010); > > > V2 = 2 * V2(Optimization results from 1/1/ 2010 to 1/30/2010); > > > Break; > > > } > > > // Proceed with your trading system to use on Out of Sample trading on > > 2/1/2010 > > > // using values of V1 and V2 that depend on broad conditions. > > > > > Buy = something related to V1 and V2; > > > Sell = ; > > > > and then repeat with V1 and V2 from Optimization results from 1/2/ 2010 to > > 2/1/2010, using the same logic to alter V1 and V2 and apply them on OS > > trading on 2/2/2010 > > > > repeat again with IS 1/3/2010 to 2/2/2010 and OS 2/3/2010... > > > > Not sure if writing the whole walk forward backtest part using CBT is the > > only way to do it. Since there's already automatic WF Backtest functionality > > in AB, it would be great if automatic WF BT can be controlled and > > manipulated in afl code. > > > > I appreciate your input. Have a great weekend! > > > > > > Ade > > > > --- In [email protected] <amibroker%40yahoogroups.com>, Howard B > > <howardbandy@> wrote: > > > > > > 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. > > > > > > > > > > > Or do you have something else in mind? > > > > > > Thanks, > > > Howard > > > > > > > > > On Fri, Au > > > g 20, 2010 at 12:37 AM, adexie <adexie@> 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><amibroker% > > 40yahoogroups.com>, Howard B > > > > > > <howardbandy@> 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 <adexie@> 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
