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

[amibroker] Free RT seminars to learn indicators



PureBytes Links

Trading Reference Links



The folks at traders world are nice enough to be putting on 40 expert speakers this week that show how the various indicators in Amibroker work and how to best use them. The seminar I am most interested in will show how to find the end of short and long term moves in order to know when to take profits. By going to the tradersworld site or the andrewscourse site you can find the links you need to enjoy this.
 
Regards
Ron
 
 
-------Original Message-------
 
Date: 10/20/2009 10:16:49 AM
Subject: [amibroker] Digest Number 8921
 

Messages In This Digest (24 Messages)

1a.
Re: activeX ..how to perform EXPLORE() on "current symbol" only usin From: Steve Dugas
1b.
Re: activeX ..how to perform EXPLORE() on "current symbol" only usin From: Mark Hike
2.1.
Re: Is the Walk forward study useful? From: zozuzoza
2.2.
Re: Is the Walk forward study useful? From: Tomasz Janeczko
2.3.
Re: Is the Walk forward study useful? From: Mike
2.4.
Re: Is the Walk forward study useful? From: Mike
2.5.
Re: Is the Walk forward study useful? From: Mike
2.6.
Re: Is the Walk forward study useful? From: aarbee60
2.7.
Re: Is the Walk forward study useful? From: Steve Dugas
2.8.
Re: Is the Walk forward study useful? From: Mike
3a.
Re: MA cross with %filter From: Steve Dugas
4a.
Re: Some Yahoo tickers fail to download data From: TomB
4b.
Re: Some Yahoo tickers fail to download data From: TomB
4c.
Re: Some Yahoo tickers fail to download data From: Richard
4d.
Re: Some Yahoo tickers fail to download data From: J Paul Buffon
5a.
AmiBroker 5.2 & AmiQuote from USB drive From: jamesfarrow2003
5b.
Re: AmiBroker 5.2 & AmiQuote from USB drive From: Tomasz Janeczko
6a.
Re: Making and Index representative of the cash position in a system From: Mike
6b.
Re: Making and Index representative of the cash position in a system From: Mike
7a.
Re: Difference between templates and layouts From: Keith McCombs
8a.
Re: Exit on different time frame From: bartlettbm
8b.
Re: Exit on different time frame From: grahamj42
9.
Problem with importing Data from Yahoo historical files From: hackl_elisabeth
10.
Time frame change Q From: rffpgadsp

Messages

1a.

Re: activeX ..how to perform EXPLORE() on "current symbol" only usin

Posted by: "Steve Dugas" sjdugas@xxxxxxxxxxx   djs44us

Mon Oct 19, 2009 10:32 am (PDT)



Hi - Actually I haven't done any of this OLE stuff in years and I was never
too good at it anyway, but after a quick look at the Object Model I might
try something like this. I really don't know if it is correct or not without
trying it, there are others here who know this OLE stuff much better than me
so perhaps someone else can comment...

AB.Stock.Ticker = "MSFT"

----- Original Message -----
From: "gajanan" <gajananl@xxxxxxcom>
To: <amibroker@xxxxxxxxxps.com>
Sent: Monday, October 19, 2009 2:49 AM
Subject: [amibroker] Re: activeX ..how to perform EXPLORE() on "current
symbol" only using ActiveX`

> HI,
> Thanks a lotsteve.. that helped partially ...
>
> I'm having problem setting the "current symbol" through VB.
>
> AOneStk = AStks.Item(stkPosition) 'only1 added
> ADocs.Open(symbol) 'SHUD THIS SET THE CURRENT SYMBOL?
> AOneDoc = ADocs.Item(0)
> tempName = AOneDoc.Name
> ' add to watchllist 9
> 'AOneStk.WatchListBits = AOneStk.WatchListBits + (1 << 9)
> AB.RefreshAll()
> ' use watchlist 9
> AA.Filter(0, "watchlist") = 9 ' /* watch list number */;
> 'set explore prams
> AA.ApplyTo = 1 ' current stock..but how is this selected.
> AA.RangeMode = RngMode.RngMode_ALL ' all quotes
> AA.LoadFormula(AflFile)
> AA.LoadSettings(AbSettings)
> AA.Explore() '
>
> Any advice is immensely appreciated.
>
> Gajanan
>
>
> --- In amibroker@xxxxxxxxxps.com, "Steve Dugas" <sjdugas@xxx> wrote:
>>
>> Hi - I think this will do it...
>>
>> Steve
>>
>>
>> AA.ApplyTo = 1; // 0=all symbols, 1=current symbol, 2=use filter
>>
>>
>>
>> ----- Original Message -----
>> From: "gajanan" <gajananl@xx.>
>> To: <amibroker@xxxxxxxxxps.com>
>> Sent: Saturday, October 17, 2009 10:30 PM
>> Subject: [amibroker] activeX ..how to perform EXPLORE() on "current
>> symbol"
>> only using ActiveX`
>>
>>
>> > HI,
>> > I wanted to automate Explore() in VB for Amibroker. I was able to do so
>> > for a watchlist. how do I do it for the "current symbol" or for only 1
>> > symbol.
>> >
>> > e.g. Code below..
>> > AB = CreateObject("Broker.Application")
>> > AA = AB.Analysis
>> > AA.ClearFilters()
>> > AA.Filter(0, "watchlist") = 6 ' /* watch list number */;
>> > AA.ApplyTo = 2 ' use filter
>> >
>> > ' set range
>> > AA.RangeMode = RngMode.RngMode_LastNDays ' all quotes
>> > AA.RangeN = AbLastNDays '- defines N (number of bars/days to
>> > backtest)
>> > 'AA.RangeFromDate() '- defines "From" date
>> > 'AA.RangeToDate() '- defines "To" date
>> >
>> > AA.LoadFormula(AflFile)
>> > AA.LoadSettings(AbSettings)
>> > AA.Explore()
>> >
>> > will perform Explore on Watchlist 6 for last N days.
>> > now
>> > instead of performing on watchlist 6 i just want to perform it on one
>> > stock symbol. How do I do that..
>> > I see 2 possible solutions
>> > 1) set current symbol only property somewhere ?
>> > 2) clear a watchlist, set it to have only one symbol..use it..
>> >
>> > Can any one plz suggest, how can i do either of the two?
>> >
>> > Thank You,
>> > Gajanan
>> >
>> >
>> >
>> >
>> >
>> > ------------------------------------
>> >
>> > **** 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
>> >
>> >
>> >
>> >
>>
>
>
>
>
> ------------------------------------
>
> **** 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
>
>
>
>

1b.

Re: activeX ..how to perform EXPLORE() on "current symbol" only usin

Posted by: "Mark Hike" markhike@xxxxxxxxx   sdkingman

Mon Oct 19, 2009 10:41 am (PDT)



Use this code to load current symbol (for example !COMP)

Docs = AB.Documents
Docs.Open("!COMP")

On Mon, Oct 19, 2009 at 2:49 AM, gajanan <gajananl@xxxxxxcom> wrote:

>
>
> HI,
> Thanks a lotsteve.. that helped partially ...
>
> I'm having problem setting the "current symbol" through VB.
>
> AOneStk = AStks.Item(stkPosition) 'only1 added
> ADocs.Open(symbol) 'SHUD THIS SET THE CURRENT SYMBOL?
> AOneDoc = ADocs.Item(0)
> tempName = AOneDoc.Name
> ' add to watchllist 9
> 'AOneStk.WatchListBits = AOneStk.WatchListBits + (1 << 9)
> AB.RefreshAll()
> ' use watchlist 9
> AA.Filter(0, "watchlist") = 9 ' /* watch list number */;
> 'set explore prams
> AA.ApplyTo = 1 ' current stock..but how is this selected.
> AA.RangeMode = RngMode.RngMode_ALL ' all quotes
> AA.LoadFormula(AflFile)
> AA.LoadSettings(AbSettings)
> AA.Explore() '
>
> Any advice is immensely appreciated.
>
> Gajanan
>
> --- In amibroker@xxxxxxxxxps.com <amibroker%40yahoogroups.com>, "Steve
> Dugas" <sjdugas@xxx> wrote:
> >
> > Hi - I think this will do it...
> >
> > Steve
> >
> >
> > AA.ApplyTo = 1; // 0=all symbols, 1=current symbol, 2=use filter
> >
> >
> >
> > ----- Original Message -----
> > From: "gajanan" <gajananl@xx.>
> > To: <amibroker@xxxxxxxxxps.com <amibroker%40yahoogroups.com>>
> > Sent: Saturday, October 17, 2009 10:30 PM
> > Subject: [amibroker] activeX ..how to perform EXPLORE() on "current
> symbol"
> > only using ActiveX`
> >
> >
> > > HI,
> > > I wanted to automate Explore() in VB for Amibroker. I was able to do so
>
> > > for a watchlist. how do I do it for the "current symbol" or for only 1
> > > symbol.
> > >
> > > e.g. Code below..
> > > AB = CreateObject("Broker.Application")
> > > AA = AB.Analysis
> > > AA.ClearFilters()
> > > AA.Filter(0, "watchlist") = 6 ' /* watch list number */;
> > > AA.ApplyTo = 2 ' use filter
> > >
> > > ' set range
> > > AA.RangeMode = RngMode.RngMode_LastNDays ' all quotes
> > > AA.RangeN = AbLastNDays '- defines N (number of bars/days to
> > > backtest)
> > > 'AA.RangeFromDate() '- defines "From" date
> > > 'AA.RangeToDate() '- defines "To" date
> > >
> > > AA.LoadFormula(AflFile)
> > > AA.LoadSettings(AbSettings)
> > > AA.Explore()
> > >
> > > will perform Explore on Watchlist 6 for last N days.
> > > now
> > > instead of performing on watchlist 6 i just want to perform it on one
> > > stock symbol. How do I do that..
> > > I see 2 possible solutions
> > > 1) set current symbol only property somewhere ?
> > > 2) clear a watchlist, set it to have only one symbol..use it..
> > >
> > > Can any one plz suggest, how can i do either of the two?
> > >
> > > Thank You,
> > > Gajanan
> > >
> > >
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > **** 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
> > >
> > >
> > >
> > >
> >
>
>
>
2.1.

Re: Is the Walk forward study useful?

Posted by: "zozuzoza" zozuka@xxxxxxxxx   zozuzoza

Mon Oct 19, 2009 11:01 am (PDT)



Hi,

I think Tomasz wrote about the nature of cmae, it seems that it worth running it more than once. I run exactly the same WF test twice and it produced completely different results but it happened once. Another time I got similar results but still significantly different. It seems it depends on the number of variables how many time it needs to be run. When you start WF test it writes how many steps it will use to calculate. I though that it would automatically calculate the necessary steps needed for correct results but it seems that you have to specify the runs as well.
I just run it twice for curiosity.

Br,
Zozu

--- In amibroker@xxxxxxxxxps.com, i cs <ics4mer@xxx> wrote:
>
>
> Hi Zozuzoza
>
>
> Thanks for posting your observations.
>
> I have used the WFA with exhaustive optimisations in the past and have found it flawless. But I've just started using the CMAE for some larger tests and I want to avoid any pitfalls which might occur.
>
> Without being too nosey, could you tell us about the nature of the optimisation? ( I am looking at long term stochastic momentum).
>
> Did anything else change between one execution and the next which might have impacted on the results?
> Why did you run it twice?
>
>
> Thanks
>
> Z
>
>
>
>
> ________________________________
> From: zozuzoza <zozuka@xxx>
> To: amibroker@xxxxxxxxxps.com
> Sent: Mon, 12 October, 2009 6:22:08 AM
> Subject: [amibroker] Re: Is the Walk forward study useful?
>
>
> I found an interesting behavior of WF testing in Amibroker. Using the same AFL code, same parameters, same environment, same fitness function, everything is the same, but the results are completely different when I run it second time. I say completely, i.e. good WF results turned weak when I run it the 2nd time the WF test. I did not expect to have the same results due to the nature of non exhaustive optimiser but the results I got eliminated my faith in Amibroker WF usefulness. I used cmae optimiser.
>
> Running 2 times the WF test turned the average CAR of 18% to 4% the second time I run. There were about 50 trades in the IS period.
>
> Try it yourself!
>
> --- In amibroker@xxxxxxxxx ps.com, "zozuzoza" <zozuka@> wrote:
> >
> > Aronson quote "Each strategy will have its own best values for IS/OOS periods". - and its own fitness function. For me, different systems perform different results based on different fitness function. I have developed 7 fitness functions and I test them on 4 systems in order to find the best fitness function but it seems mission impossible. All my fitness functions are profit/risk type ones like UPI, CAR/Mdd etc.
> >
> > I think you express too much weight on IS/OOS time period. I think the fitness function, the parameter range are much more important.
> >
> > So far, I must agree with Tony that he does not belive in WF. I only use it for verification, just to see another way of the results, nothing more, so far.
> >
> > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
> > >
> > > Thanks again Mike ... See also my previous answer. Just one more remark. Here you are suggesting to take 1 to 3 year for the OOS period. When using commodity time series, this is more or less what I am doing. Why ? Because a lot of commodities coming from the agricultural sector have these typical yearly cycles. But when using time series based upon stocks ( S&P500 etc. ), I am using a 5 to 7 year OOS period. Simply because of the economic cycle. I am telling you this because it shows how I am thinking. Just taking a period because somebody gave me a rule of thumb is rather tricky in my eyes. For me there must be a good explanation for the length of that period ...
> > >
> > > Regards, Ton.
> > >
> > >
> > > ----- Original Message -----
> > > From: Mike
> > > To: amibroker@xxxxxxxxx ps.com
> > > Sent: Monday, October 05, 2009 11:32 AM
> > > Subject: [amibroker] Re: Is the Walk forward study useful?
> > >
> > >
> > > Ton,
> > >
> > > You said "If you can help me to get things done in an objective way then I will be delighted to know how you want to do that"
> > >
> > > What I was suggesting was:
> > >
> > > 1. Identify what measure you will use to judge the IS/OOS period sizes (i.e. in my case I used consistency of CAR).
> > >
> > > 2. Run walk forward with IS ranging from 1 year to 3 years and OOS ranging from 1/8 to 1/3 of the IS period.
> > >
> > > 3. Calculate summary statistics for each IS/OOS combination for the measure that you decided upon in step 1 (i.e. in my case I calculated the average CAR and the standard deviation of CAR from the OOS samples). It may help to plot a distribution to visualize the data.
> > >
> > > 4. Observe whether one IS/OOS combination stands out as having the most normally distributed values.
> > >
> > > Naturally, there is a limit to how many IS/OOS combinations we can try before we have curve fit our results. This is where I find Pardo's ratios to be helpful. By keeping within the suggested range, we are leaving untested many alternative combinations.
> > >
> > > Mike
> > >
> > > --- In amibroker@xxxxxxxxx ps.com, "Mike" <sfclimbers@ > wrote:
> > > >
> > > > Ton,
> > > >
> > > > 1. Pardo disagrees with Aronson (and Bandy). Pardo suggests that a OOS to IS ration of 25% - 35% is best, but that a good rule of thumb for empirical testing is 1/8 to 1/3.
> > > >
> > > > 2. Yes, I suspect that each strategy will have its own best values for IS/OOS and that other values will appear as useless. It is up to us to try and find the best values.
> > > >
> > > > With respect to your comment: "I am getting results that show a random pattern", my question remains; What are you measuring? In other words, what values appear random - your fitness value? CAR? Something else?
> > > >
> > > > 3. I have done very much as you ask, except that I also varied my IS period. I mostly kept my ratios within Pardo's suggested 1/8 to 1/3, but went as low as 1/12 and as high as 1/2 just to be sure.
> > > >
> > > > For example IS=1 year, IS=2 years, IS=3 years giving
> > > >
> > > > IS1yr+OOS6mth, IS1yr+OOS3mth, IS1yr+OOS1mth
> > > > IS2yr+OOS12mth, IS2yr+OOS6mth, IS2yr+OOS3mth
> > > > IS3yr+OOS18mth, IS3yr+OOS12mth, IS3yr+OOS6mth
> > > >
> > > > IS2yr+OOS6mth produced the most consistent CAR, even though a weighted UPI was used as the fitness function for the actual walk forward.
> > > >
> > > > I do not have a strong opinion as to whether or not there really is a relationship between IS and OOS sizes. I found that Pardo's rule of thumb was as good a starting place as any. I was happy that my values (25%) coincided with what he advised. But, had my studies suggested a ratio outside of Pardo's range, I would have still gone with what my results suggested, despite Pardo's advice.
> > > >
> > > > Mike
> > > >
> > > > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
> > > > >
> > > > > Hi Mike,
> > > > >
> > > > > What I am saying is :
> > > > >
> > > > > 1. That according to David Aronson "There is no theory that suggests what fraction of the data should be assigned to training ( IS ) and testing ( OOS )." and that "Results can be very sensitive to these choices ... ". I assume that he knows where he is talking about ...
> > > > >
> > > > > 2. That when I am doing WalkFoward tests following the advice of Howard Bandy, Robert Pardo AND Van Tharp, I am getting results that show a random patron when changing the OOS en IS periods. So my conclusion is that WalkFoward is a subjective test ...
> > > > >
> > > > > Therefore I have serious problems using WalkFoward tests. If you can help me to get things done in an objective way then I will be delighted to know how you want to do that. But for sure Van Tharp did not help me ...
> > > > >
> > > > > Please do a simple WF test with OOS=1year and IS=1month... 12months. So creating WF results for OOS1y+IS1m, OOS1y+IS2m etc. And see what you are getting. This is purely random. The result says nothing to me ...
> > > > >
> > > > > Regards, Ton.
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: Mike
> > > > > To: amibroker@xxxxxxxxx ps.com
> > > > > Sent: Monday, October 05, 2009 9:29 AM
> > > > > Subject: [amibroker] Re: Is the Walk forward study useful?
> > > > >
> > > > >
> > > > > Ton,
> > > > >
> > > > > Are you saying that you have not found an IS/OOS pair that works well? What measure are you using to judge "stability" of the walk forward process (i.e. what measure are you using to judge the process as random)?
> > > > >
> > > > > After testing with multiple IS periods, and with multiple OOS periods, I was able to identify "fixed" window lengths that proved more consistent than the others tested.
> > > > >
> > > > > I reached this conclusion by charting a distribution curve of CAR for the OOS results. My fitness function is currently based on UPI, and thus my walk forward is driven by that value. However, ultimately my interest is in how consistent CAR would be which is why I used that for evaluating the goodness of fit for the IS/OOS period lengths.
> > > > >
> > > > > In my case, over a 13 year period, a 2 year IS and 6 month OOS (for a total of 26 OOS data points) produced the most normal looking distribution of CAR results (i.e. central peak, smallest standard deviation). Excluding the results from all of 1999 and the first half of 2000 (during which results were abnormally strong), the distribution curve looks even better.
> > > > >
> > > > > Also, have you tried working with different fitness functions? Perhaps your fitness function doesn't adequately identify the "signal" and thus misguides the walk forward, regardless of IS/OOS window lengths.
> > > > >
> > > > > I am in the process of running a new walk forward over the last 7.5 years using Van Tharp's System Quality Number (SQN) as my fitness function. I have kept the same 2 year IS/6 months OOS for a total of 15 OOS data points. My system strives to generate a minimum average of 2 trades per day, so each IS period generally has 1000 or more trades from which to calculate the fitness.
> > > > >
> > > > > It has not run to completion yet. But, for the periods that have produced results, the results look promising (at least with respect to the SQN of the OOS relative to the SQN of the IS, I have not yet created the distribution of CAR for OOS).
> > > > >
> > > > > Assuming that the remainder of the results are equally strong, I will walk forward further back in history to get the full 26 data points to compare against the results produced using my UPI fitness. If the CAR distribution is more normal using SQN as fitness, then I will officially start using SQN for generating optimal values for my next live OOS.
> > > > >
> > > > > If you are willing to share, I would be curious to hear if SQN as a fitness function was able to produce a more stable walk forward for you, and what measure you are using to judge "stable".
> > > > >
> > > > > Mike
> > > > >
> > > > > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
> > > > > >
> > > > > > Hi Howard,
> > > > > >
> > > > > > I still am struggling with the following sentence from David Aronson : "The decision about how to apportion the data between the IS and OOS subsets is arbitrary. There is no theory that suggests what fraction of the data should be assigned to training ( IS ) and testing ( OOS ). Results can be very sensitive to these choices ... ". Because this is exactly what I am seeing. WalkFoward results are more then sensitive to the IS/OOS relation and in many cases a pure random story. I am getting more and more the feeling that WalkForward is not the correct or better objective way to test trading systems. With all respect to Robert Pardo's idea's about this topic and what you are writing in QTS ...
> > > > > >
> > > > > > Regards, Ton.
> > > > > >
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: Howard B
> > > > > > To: amibroker@xxxxxxxxx ps.com
> > > > > > Sent: Monday, October 05, 2009 12:48 AM
> > > > > > Subject: Re: [amibroker] Re: Is the Walk forward study useful?
> > > > > >
> > > > > >
> > > > > > Greetings all --
> > > > > >
> > > > > > My point of view on the length of the in-sample and out-of-sample may be a little different.
> > > > > >
> > > > > > The logic of the code has been designed to recognize some pattern or characteristic of the data. The length of the in-sample period is however long it takes to keep the model (the logic) in synchronization with the data. There is no one answer to what that length is. When the pattern changes, the model fits it less well. When the pattern changes significantly, the model must be re-synchronized. The only person who can say whether the length is correct or should be longer or shorter is the person running the tests.
> > > > > >
> > > > > > The length of the out-of-sample period is however long the model and the data remain in sync. That must be some length of time beyond the in-sample period in order to make profitable trades. It could be a long time, in which case there is no need to modify the model at all during that period. There is no general relationship between the length of the in-sample period and the length of the out-of-sample period -- none. There is no general relationship between the performance in-sample and the performance out-of-sample. The greater the difference between the two, the better the system has been fit to the data over the in-sample period. But that does not necessarily mean that the out-of-sample results are less meaningful.
> > > > > >
> > > > > > You can perform some experiments to see what the best in-sample length is. And then to see what the typical out-of-sample length is. Knowing these two, set up a walk forward run using those lengths. After the run is over, ignore the in-sample results. They have no value in estimating the future performance of the system. It is the out-of-sample results that can give you some idea of how the system might act when traded with real money.
> > > > > >
> > > > > > It is nice to have a lot of closed traded in the out-of-sample period, but you can run statistics on as few as 5 or 6. Having fewer trades means that it will be more difficult to achieve statistical significance. The number 30 is not magic -- it is just conventional.
> > > > > >
> > > > > > I think it helps to distinguish between the in-sample and out-of-sample periods this way -- in-sample is seeing how well the model can be made to fit the older data, out-of-sample is seeing how well it might fit future data.
> > > > > >
> > > > > > Ignore the television ads where person after person exclaims "backtesting! " as though that is the key to system development. It is not. Backtesting by itself, without going on to walk forward testing, will give the trading system developer the impression that the system is good. In-sample results are always good. We do not stop fooling with the system until they are good. But in-sample results have no value in predicting future performance -- none.
> > > > > >
> > > > > > There are some general characteristics of trading systems that make them easier to validate. Those begin with having a positive expectancy -- no system can be profitable in the long term unless it has a positive expectancy. Then going on to include trade frequently, hold a short time, minimize losses. Of course, there have been profitable systems that trade infrequently, hold a long time, and suffer deep drawdowns. It is much harder to show that those were profitable because they were good rather than lucky.
> > > > > >
> > > > > > There is more information about in-sample, out-of-sample, walk forward testing, statistical validation, objective functions, and so forth in my book, "Quantitative Trading Systems."
> > > > > > http://www.quantita tivetradingsyste ms.com/
> > > > > >
> > > > > > Thanks for listening,
> > > > > > Howard
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Sun, Oct 4, 2009 at 10:56 AM, Bisto <bistoman73@ > wrote:
> > > > > >
> > > > > >
> > > > > > Yes, I believe that you should increase the IS period
> > > > > >
> > > > > > as general rule is not true "the shortest the best" trying to catch every market change because it's possible that a too short IS period produces a too low number of trades with no statistical robustness --> you will find parameters that are more likely candidated to fail in OS
> > > > > >
> > > > > > try a longer IS period and let's see what will happen
> > > > > >
> > > > > > I read an interesting book on this issue: "The evaluation and optimization of trading strategies" by Pardo. Maybe he repeated too much times the same concepts nevertheless I liked it
> > > > > >
> > > > > > if anyone could suggest a better book about this issue it would be very appreciated
> > > > > >
> > > > > >
> > > > > >
> > > > > > Bisto
> > > > > >
> > > > > > --- In amibroker@xxxxxxxxx ps.com, "Gonzaga" <gonzagags@> wrote:
> > > > > > >
> > > > > > > Oh, sorry, I am lost in translation ... ;-)
> > > > > > > Yes I meant trades of my IS period.
> > > > > > > I've got about 70 trades in my IS period, three months.
> > > > > > > BUT, I buy stocks in a multiposition way.This means, that my hole capital divides among several stocks purchased simultaneously.
> > > > > > > So, in my statistics, I use to average my trades. When I use maxopenpositions= 7, I use to average my results every 7 trades.
> > > > > > > Considering that, my trades in three months are not 70, but less ( not exactly 70/7, but less than 70)
> > > > > > >
> > > > > > > If I use maxopenposition= 1, which is, invest all my capital every trade, in three months I would have about 29 trades.
> > > > > > > So I suppose I have to increase the IS period.. isn`t it?
> > > > > > >
> > > > > > >
> > > > > > > --- In amibroker@xxxxxxxxx ps.com, "Bisto" <bistoman73@ > wrote:
> > > > > > > >
> > > > > > > > What do you mean with "I don't have many buyings and sellings"?
> > > > > > > >
> > > > > > > > If you have less than 30 trades in an IS period, IMHO, you are using a too short period due to not statistical robustness --> WFA is misleading, try a longer IS period
> > > > > > > >
> > > > > > > > Bisto
> > > > > > > >
> > > > > > > > --- In amibroker@xxxxxxxxx ps.com, "Gonzaga" <gonzagags@> wrote:
> > > > > > > > >
> > > > > > > > > Thanks for the answers
> > > > > > > > > To Keith McCombs :
> > > > > > > > >
> > > > > > > > > I use 3 months IS test and 1 month step, this is, 1 month OS test. My system is an end-of day-system, so I don't have many buyings and sellings..
> > > > > > > > > Perhaps I should make bigger the IS period?
> > > > > > > > >
> > > > > > > > > anyway, my parameter behaves well in any period. Of course it is an optimized variable, but it doesn't fail in ten years, in none of those ten years, over 500 stocks.. a very long period..
> > > > > > > > > So, couldn't it be better, on the long run, than the parameters optimized with the WF study?
> > > > > > > > > (In fact, I am using it now, the optimized variable)
> > > > > > > > > That's my real question..
> > > > > > > > >
> > > > > > > > > To dloyer123:
> > > > > > > > > I haven't understood the meaning of the Walk Forward Efficency, and seems interesting.
> > > > > > > > > can you explain it better, please..?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --- In amibroker@xxxxxxxxx ps.com, "dloyer123" <dloyer123@> wrote:
> > > > > > > > > >
> > > > > > > > > > I have had similar experiences. I like to use WFT to estimate what Pardo call's his "Walk Forward Efficency", or the ratio of the out of sample WF profits to just optimizing over the entire time period.
> > > > > > > > > >
> > > > > > > > > > A good system should have as high a WFE as posible. Systems with a poor WFE tend to do poorly in live trading.
> > > > > > > > > >
> > > > > > > > > > If you have a parm set that works well over a long period of live trading, then you are doing well!
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
>
>
>
>
> __________________________________________________________
> Get more done like never before with Yahoo!7 Mail.
> Learn more: http://au.overview.mail.yahoo.com/
>

2.2.

Re: Is the Walk forward study useful?

Posted by: "Tomasz Janeczko" groups@xxxxxxxxxxxxx   amibroker

Mon Oct 19, 2009 12:00 pm (PDT)



It is advisable to set Runs parameter to 5 or more.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "zozuzoza" <zozuka@xxxxxxcom>
To: <amibroker@xxxxxxxxxps.com>
Sent: Monday, October 19, 2009 8:01 PM
Subject: [amibroker] Re: Is the Walk forward study useful?

> Hi,
>
> I think Tomasz wrote about the nature of cmae, it seems that it worth running it more than once. I run exactly the same WF test
> twice and it produced completely different results but it happened once. Another time I got similar results but still
> significantly different. It seems it depends on the number of variables how many time it needs to be run. When you start WF test
> it writes how many steps it will use to calculate. I though that it would automatically calculate the necessary steps needed for
> correct results but it seems that you have to specify the runs as well.
> I just run it twice for curiosity.
>
> Br,
> Zozu
>
>
> --- In amibroker@xxxxxxxxxps.com, i cs <ics4mer@xxx> wrote:
>>
>>
>> Hi Zozuzoza
>>
>>
>> Thanks for posting your observations.
>>
>> I have used the WFA with exhaustive optimisations in the past and have found it flawless. But I've just started using the CMAE
>> for some larger tests and I want to avoid any pitfalls which might occur.
>>
>> Without being too nosey, could you tell us about the nature of the optimisation? ( I am looking at long term stochastic
>> momentum).
>>
>> Did anything else change between one execution and the next which might have impacted on the results?
>> Why did you run it twice?
>>
>>
>> Thanks
>>
>> Z
>>
>>
>>
>>
>> ________________________________
>> From: zozuzoza <zozuka@xxx>
>> To: amibroker@xxxxxxxxxps.com
>> Sent: Mon, 12 October, 2009 6:22:08 AM
>> Subject: [amibroker] Re: Is the Walk forward study useful?
>>
>>
>> I found an interesting behavior of WF testing in Amibroker. Using the same AFL code, same parameters, same environment, same
>> fitness function, everything is the same, but the results are completely different when I run it second time. I say completely,
>> i.e. good WF results turned weak when I run it the 2nd time the WF test. I did not expect to have the same results due to the
>> nature of non exhaustive optimiser but the results I got eliminated my faith in Amibroker WF usefulness. I used cmae optimiser.
>>
>> Running 2 times the WF test turned the average CAR of 18% to 4% the second time I run. There were about 50 trades in the IS
>> period.
>>
>> Try it yourself!
>>
>> --- In amibroker@xxxxxxxxx ps.com, "zozuzoza" <zozuka@> wrote:
>> >
>> > Aronson quote "Each strategy will have its own best values for IS/OOS periods". - and its own fitness function. For me,
>> > different systems perform different results based on different fitness function. I have developed 7 fitness functions and I
>> > test them on 4 systems in order to find the best fitness function but it seems mission impossible. All my fitness functions are
>> > profit/risk type ones like UPI, CAR/Mdd etc.
>> >
>> > I think you express too much weight on IS/OOS time period. I think the fitness function, the parameter range are much more
>> > important.
>> >
>> > So far, I must agree with Tony that he does not belive in WF. I only use it for verification, just to see another way of the
>> > results, nothing more, so far.
>> >
>> > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
>> > >
>> > > Thanks again Mike ... See also my previous answer. Just one more remark. Here you are suggesting to take 1 to 3 year for the
>> > > OOS period. When using commodity time series, this is more or less what I am doing. Why ? Because a lot of commodities coming
>> > > from the agricultural sector have these typical yearly cycles. But when using time series based upon stocks ( S&P500 etc. ),
>> > > I am using a 5 to 7 year OOS period. Simply because of the economic cycle. I am telling you this because it shows how I am
>> > > thinking. Just taking a period because somebody gave me a rule of thumb is rather tricky in my eyes. For me there must be a
>> > > good explanation for the length of that period ...
>> > >
>> > > Regards, Ton.
>> > >
>> > >
>> > > ----- Original Message -----
>> > > From: Mike
>> > > To: amibroker@xxxxxxxxx ps.com
>> > > Sent: Monday, October 05, 2009 11:32 AM
>> > > Subject: [amibroker] Re: Is the Walk forward study useful?
>> > >
>> > >
>> > > Ton,
>> > >
>> > > You said "If you can help me to get things done in an objective way then I will be delighted to know how you want to do
>> > > that"
>> > >
>> > > What I was suggesting was:
>> > >
>> > > 1. Identify what measure you will use to judge the IS/OOS period sizes (i.e. in my case I used consistency of CAR).
>> > >
>> > > 2. Run walk forward with IS ranging from 1 year to 3 years and OOS ranging from 1/8 to 1/3 of the IS period.
>> > >
>> > > 3. Calculate summary statistics for each IS/OOS combination for the measure that you decided upon in step 1 (i.e. in my
>> > > case I calculated the average CAR and the standard deviation of CAR from the OOS samples). It may help to plot a distribution
>> > > to visualize the data.
>> > >
>> > > 4. Observe whether one IS/OOS combination stands out as having the most normally distributed values.
>> > >
>> > > Naturally, there is a limit to how many IS/OOS combinations we can try before we have curve fit our results. This is where
>> > > I find Pardo's ratios to be helpful. By keeping within the suggested range, we are leaving untested many alternative
>> > > combinations.
>> > >
>> > > Mike
>> > >
>> > > --- In amibroker@xxxxxxxxx ps.com, "Mike" <sfclimbers@ > wrote:
>> > > >
>> > > > Ton,
>> > > >
>> > > > 1. Pardo disagrees with Aronson (and Bandy). Pardo suggests that a OOS to IS ration of 25% - 35% is best, but that a good
>> > > rule of thumb for empirical testing is 1/8 to 1/3.
>> > > >
>> > > > 2. Yes, I suspect that each strategy will have its own best values for IS/OOS and that other values will appear as
>> > > useless. It is up to us to try and find the best values.
>> > > >
>> > > > With respect to your comment: "I am getting results that show a random pattern", my question remains; What are you
>> > > measuring? In other words, what values appear random - your fitness value? CAR? Something else?
>> > > >
>> > > > 3. I have done very much as you ask, except that I also varied my IS period. I mostly kept my ratios within Pardo's
>> > > suggested 1/8 to 1/3, but went as low as 1/12 and as high as 1/2 just to be sure.
>> > > >
>> > > > For example IS=1 year, IS=2 years, IS=3 years giving
>> > > >
>> > > > IS1yr+OOS6mth, IS1yr+OOS3mth, IS1yr+OOS1mth
>> > > > IS2yr+OOS12mth, IS2yr+OOS6mth, IS2yr+OOS3mth
>> > > > IS3yr+OOS18mth, IS3yr+OOS12mth, IS3yr+OOS6mth
>> > > >
>> > > > IS2yr+OOS6mth produced the most consistent CAR, even though a weighted UPI was used as the fitness function for the
>> > > actual walk forward.
>> > > >
>> > > > I do not have a strong opinion as to whether or not there really is a relationship between IS and OOS sizes. I found that
>> > > Pardo's rule of thumb was as good a starting place as any. I was happy that my values (25%) coincided with what he advised.
>> > > But, had my studies suggested a ratio outside of Pardo's range, I would have still gone with what my results suggested,
>> > > despite Pardo's advice.
>> > > >
>> > > > Mike
>> > > >
>> > > > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
>> > > > >
>> > > > > Hi Mike,
>> > > > >
>> > > > > What I am saying is :
>> > > > >
>> > > > > 1. That according to David Aronson "There is no theory that suggests what fraction of the data should be assigned to
>> > > training ( IS ) and testing ( OOS )." and that "Results can be very sensitive to these choices ... ". I assume that he knows
>> > > where he is talking about ...
>> > > > >
>> > > > > 2. That when I am doing WalkFoward tests following the advice of Howard Bandy, Robert Pardo AND Van Tharp, I am getting
>> > > results that show a random patron when changing the OOS en IS periods. So my conclusion is that WalkFoward is a subjective
>> > > test ...
>> > > > >
>> > > > > Therefore I have serious problems using WalkFoward tests. If you can help me to get things done in an objective way
>> > > then I will be delighted to know how you want to do that. But for sure Van Tharp did not help me ...
>> > > > >
>> > > > > Please do a simple WF test with OOS=1year and IS=1month... 12months. So creating WF results for OOS1y+IS1m, OOS1y+IS2m
>> > > etc. And see what you are getting. This is purely random. The result says nothing to me ...
>> > > > >
>> > > > > Regards, Ton.
>> > > > >
>> > > > >
>> > > > >
>> > > > > ----- Original Message -----
>> > > > > From: Mike
>> > > > > To: amibroker@xxxxxxxxx ps.com
>> > > > > Sent: Monday, October 05, 2009 9:29 AM
>> > > > > Subject: [amibroker] Re: Is the Walk forward study useful?
>> > > > >
>> > > > >
>> > > > > Ton,
>> > > > >
>> > > > > Are you saying that you have not found an IS/OOS pair that works well? What measure are you using to judge "stability"
>> > > of the walk forward process (i.e. what measure are you using to judge the process as random)?
>> > > > >
>> > > > > After testing with multiple IS periods, and with multiple OOS periods, I was able to identify "fixed" window lengths
>> > > that proved more consistent than the others tested.
>> > > > >
>> > > > > I reached this conclusion by charting a distribution curve of CAR for the OOS results. My fitness function is currently
>> > > based on UPI, and thus my walk forward is driven by that value. However, ultimately my interest is in how consistent CAR
>> > > would be which is why I used that for evaluating the goodness of fit for the IS/OOS period lengths.
>> > > > >
>> > > > > In my case, over a 13 year period, a 2 year IS and 6 month OOS (for a total of 26 OOS data points) produced the most
>> > > normal looking distribution of CAR results (i.e. central peak, smallest standard deviation). Excluding the results from all
>> > > of 1999 and the first half of 2000 (during which results were abnormally strong), the distribution curve looks even better.
>> > > > >
>> > > > > Also, have you tried working with different fitness functions? Perhaps your fitness function doesn't adequately
>> > > identify the "signal" and thus misguides the walk forward, regardless of IS/OOS window lengths.
>> > > > >
>> > > > > I am in the process of running a new walk forward over the last 7.5 years using Van Tharp's System Quality Number (SQN)
>> > > as my fitness function. I have kept the same 2 year IS/6 months OOS for a total of 15 OOS data points. My system strives to
>> > > generate a minimum average of 2 trades per day, so each IS period generally has 1000 or more trades from which to calculate
>> > > the fitness.
>> > > > >
>> > > > > It has not run to completion yet. But, for the periods that have produced results, the results look promising (at least
>> > > with respect to the SQN of the OOS relative to the SQN of the IS, I have not yet created the distribution of CAR for OOS).
>> > > > >
>> > > > > Assuming that the remainder of the results are equally strong, I will walk forward further back in history to get the
>> > > full 26 data points to compare against the results produced using my UPI fitness. If the CAR distribution is more normal
>> > > using SQN as fitness, then I will officially start using SQN for generating optimal values for my next live OOS.
>> > > > >
>> > > > > If you are willing to share, I would be curious to hear if SQN as a fitness function was able to produce a more stable
>> > > walk forward for you, and what measure you are using to judge "stable".
>> > > > >
>> > > > > Mike
>> > > > >
>> > > > > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
>> > > > > >
>> > > > > > Hi Howard,
>> > > > > >
>> > > > > > I still am struggling with the following sentence from David Aronson : "The decision about how to apportion the data
>> > > between the IS and OOS subsets is arbitrary. There is no theory that suggests what fraction of the data should be assigned to
>> > > training ( IS ) and testing ( OOS ). Results can be very sensitive to these choices ... ". Because this is exactly what I am
>> > > seeing. WalkFoward results are more then sensitive to the IS/OOS relation and in many cases a pure random story. I am getting
>> > > more and more the feeling that WalkForward is not the correct or better objective way to test trading systems. With all
>> > > respect to Robert Pardo's idea's about this topic and what you are writing in QTS ...
>> > > > > >
>> > > > > > Regards, Ton.
>> > > > > >
>> > > > > >
>> > > > > > ----- Original Message -----
>> > > > > > From: Howard B
>> > > > > > To: amibroker@xxxxxxxxx ps.com
>> > > > > > Sent: Monday, October 05, 2009 12:48 AM
>> > > > > > Subject: Re: [amibroker] Re: Is the Walk forward study useful?
>> > > > > >
>> > > > > >
>> > > > > > Greetings all --
>> > > > > >
>> > > > > > My point of view on the length of the in-sample and out-of-sample may be a little different.
>> > > > > >
>> > > > > > The logic of the code has been designed to recognize some pattern or characteristic of the data. The length of the
>> > > in-sample period is however long it takes to keep the model (the logic) in synchronization with the data. There is no one
>> > > answer to what that length is. When the pattern changes, the model fits it less well. When the pattern changes significantly,
>> > > the model must be re-synchronized. The only person who can say whether the length is correct or should be longer or shorter
>> > > is the person running the tests.
>> > > > > >
>> > > > > > The length of the out-of-sample period is however long the model and the data remain in sync. That must be some
>> > > length of time beyond the in-sample period in order to make profitable trades. It could be a long time, in which case there
>> > > is no need to modify the model at all during that period. There is no general relationship between the length of the
>> > > in-sample period and the length of the out-of-sample period -- none. There is no general relationship between the performance
>> > > in-sample and the performance out-of-sample. The greater the difference between the two, the better the system has been fit
>> > > to the data over the in-sample period. But that does not necessarily mean that the out-of-sample results are less meaningful.
>> > > > > >
>> > > > > > You can perform some experiments to see what the best in-sample length is. And then to see what the typical
>> > > out-of-sample length is. Knowing these two, set up a walk forward run using those lengths. After the run is over, ignore the
>> > > in-sample results. They have no value in estimating the future performance of the system. It is the out-of-sample results
>> > > that can give you some idea of how the system might act when traded with real money.
>> > > > > >
>> > > > > > It is nice to have a lot of closed traded in the out-of-sample period, but you can run statistics on as few as 5 or
>> > > 6. Having fewer trades means that it will be more difficult to achieve statistical significance. The number 30 is not
>> > > magic -- it is just conventional.
>> > > > > >
>> > > > > > I think it helps to distinguish between the in-sample and out-of-sample periods this way -- in-sample is seeing how
>> > > well the model can be made to fit the older data, out-of-sample is seeing how well it might fit future data.
>> > > > > >
>> > > > > > Ignore the television ads where person after person exclaims "backtesting! " as though that is the key to system
>> > > development. It is not. Backtesting by itself, without going on to walk forward testing, will give the trading system
>> > > developer the impression that the system is good. In-sample results are always good. We do not stop fooling with the system
>> > > until they are good. But in-sample results have no value in predicting future performance -- none.
>> > > > > >
>> > > > > > There are some general characteristics of trading systems that make them easier to validate. Those begin with having
>> > > a positive expectancy -- no system can be profitable in the long term unless it has a positive expectancy. Then going on to
>> > > include trade frequently, hold a short time, minimize losses. Of course, there have been profitable systems that trade
>> > > infrequently, hold a long time, and suffer deep drawdowns. It is much harder to show that those were profitable because they
>> > > were good rather than lucky.
>> > > > > >
>> > > > > > There is more information about in-sample, out-of-sample, walk forward testing, statistical validation, objective
>> > > functions, and so forth in my book, "Quantitative Trading Systems."
>> > > > > > http://www.quantita tivetradingsyste ms.com/
>> > > > > >
>> > > > > > Thanks for listening,
>> > > > > > Howard
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > On Sun, Oct 4, 2009 at 10:56 AM, Bisto <bistoman73@ > wrote:
>> > > > > >
>> > > > > >
>> > > > > > Yes, I believe that you should increase the IS period
>> > > > > >
>> > > > > > as general rule is not true "the shortest the best" trying to catch every market change because it's possible that a
>> > > too short IS period produces a too low number of trades with no statistical robustness --> you will find parameters that are
>> > > more likely candidated to fail in OS
>> > > > > >
>> > > > > > try a longer IS period and let's see what will happen
>> > > > > >
>> > > > > > I read an interesting book on this issue: "The evaluation and optimization of trading strategies" by Pardo. Maybe he
>> > > repeated too much times the same concepts nevertheless I liked it
>> > > > > >
>> > > > > > if anyone could suggest a better book about this issue it would be very appreciated
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > Bisto
>> > > > > >
>> > > > > > --- In amibroker@xxxxxxxxx ps.com, "Gonzaga" <gonzagags@> wrote:
>> > > > > > >
>> > > > > > > Oh, sorry, I am lost in translation ... ;-)
>> > > > > > > Yes I meant trades of my IS period.
>> > > > > > > I've got about 70 trades in my IS period, three months.
>> > > > > > > BUT, I buy stocks in a multiposition way.This means, that my hole capital divides among several stocks purchased
>> > > simultaneously.
>> > > > > > > So, in my statistics, I use to average my trades. When I use maxopenpositions= 7, I use to average my results every
>> > > 7 trades.
>> > > > > > > Considering that, my trades in three months are not 70, but less ( not exactly 70/7, but less than 70)
>> > > > > > >
>> > > > > > > If I use maxopenposition= 1, which is, invest all my capital every trade, in three months I would have about 29
>> > > trades.
>> > > > > > > So I suppose I have to increase the IS period.. isn`t it?
>> > > > > > >
>> > > > > > >
>> > > > > > > --- In amibroker@xxxxxxxxx ps.com, "Bisto" <bistoman73@ > wrote:
>> > > > > > > >
>> > > > > > > > What do you mean with "I don't have many buyings and sellings"?
>> > > > > > > >
>> > > > > > > > If you have less than 30 trades in an IS period, IMHO, you are using a too short period due to not statistical
>> > > robustness --> WFA is misleading, try a longer IS period
>> > > > > > > >
>> > > > > > > > Bisto
>> > > > > > > >
>> > > > > > > > --- In amibroker@xxxxxxxxx ps.com, "Gonzaga" <gonzagags@> wrote:
>> > > > > > > > >
>> > > > > > > > > Thanks for the answers
>> > > > > > > > > To Keith McCombs :
>> > > > > > > > >
>> > > > > > > > > I use 3 months IS test and 1 month step, this is, 1 month OS test. My system is an end-of day-system, so I
>> > > don't have many buyings and sellings..
>> > > > > > > > > Perhaps I should make bigger the IS period?
>> > > > > > > > >
>> > > > > > > > > anyway, my parameter behaves well in any period. Of course it is an optimized variable, but it doesn't fail in
>> > > ten years, in none of those ten years, over 500 stocks.. a very long period..
>> > > > > > > > > So, couldn't it be better, on the long run, than the parameters optimized with the WF study?
>> > > > > > > > > (In fact, I am using it now, the optimized variable)
>> > > > > > > > > That's my real question.
>> > > > > > > > >
>> > > > > > > > > To dloyer123:
>> > > > > > > > > I haven't understood the meaning of the Walk Forward Efficency, and seems interesting.
>> > > > > > > > > can you explain it better, please..?
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > --- In amibroker@xxxxxxxxx ps.com, "dloyer123" <dloyer123@> wrote:
>> > > > > > > > > >
>> > > > > > > > > > I have had similar experiences. I like to use WFT to estimate what Pardo call's his "Walk Forward Efficency",
>> > > or the ratio of the out of sample WF profits to just optimizing over the entire time period.
>> > > > > > > > > >
>> > > > > > > > > > A good system should have as high a WFE as posible. Systems with a poor WFE tend to do poorly in live
>> > > trading.
>> > > > > > > > > >
>> > > > > > > > > > If you have a parm set that works well over a long period of live trading, then you are doing well!
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>>
>>
>>
>>
>> __________________________________________________________
>> Get more done like never before with Yahoo!7 Mail.
>> Learn more: http://au.overview.mail.yahoo.com/
>>
>
>
>
>
> ------------------------------------
>
> **** 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
>
>
>

2.3.

Re: Is the Walk forward study useful?

Posted by: "Mike" sfclimbers@xxxxxxxxx   sfclimbers

Mon Oct 19, 2009 1:46 pm (PDT)



Bing,

Howard answered your comments regarding using anything other than the true t-test formula.

Regarding your question of why "as N increases, expectancy/StdDevofR would tend to decrease". This is simply a comment based upon a number of prevailing theories and axioms such as:

1. No strategy will work forever, the market is always changing.
2. Efficient market hypothesis.
3. Random Walk theory.
4. etc.

All of the above suggest that there is no such thing as an everlasting edge, that over time (i.e. after many trades) the expectancy will approach zero and the standard deviation will grow larger.

The more trades you have, the more difficult it is to sustain a non zero return. A large sqrt(N) multiplied by zero is still zero ;)

The only value to Tharp's limitation is to have a consistent measure for comparison with his writings.

Mike

--- In amibroker@xxxxxxxxxps.com, "bingk66" <bing.kwok@x..> wrote:
>
> Hi Mike,
>
> I understand what you are saying. I agree that the more data points in the calculations the more confidence you are entitle to have in the results of the system, and hence the usage of the sqrt(N) portion of the equation to reflect that. The concept of it all is fine.
>
> However, where I am not entirely comfortable with the equation is the sqrt(N) part, as sqrt(N) can have way too much weighting in the overall t-test score once N gets too large. Perhaps using the cube root of N might be better as a means of allowing N to be fully factored into the equation ( as opposed to Van Tharp's proposal of limiting N to 100) without overbearing the other parts of the equation. It boils down to a personal choice, I guess, not unlike the calculation of the objective function that Howard describes in his books whereby you wish to calculate a single number, and that single number could be derived from a number of sources, each with their own weighting and you like some form of partitioning across these different sources so that no one source overbears the others, inorder to get a balanced calculation can be obtained.
>
> Finally, the last part of your post would seem to indicate that as N increases, expectancy/StdDevofR would tend to decrease. I can't see or understand why that would be the case. I would appreciate it if you could provide a brief explanation as to why that might be the case or at least provide a link whereby I can read up a little more on this.
>
> Bing
>
>
>
>
>
>
>
> --- In amibroker@xxxxxxxxxps.com, "Mike" <sfclimbers@> wrote:
> >
> > Bing,
> >
> > In this example, the t-test is calculated to give us a level of confidence that the average of the sample is different than zero.
> >
> > If a trade strategy had no predictive power, then its results would be purely random, producing a net gain (over the long run) of zero with an equal number of winners and losers.
> >
> > Actually, it would be a net gain of zero *over the prevailing trend*, where the trend itself might be greater than zero, as per Aronson. But, that is another conversation.
> >
> > The more trades taken, the more likely the true average would show. For example; Flip a coin 4 times. You might get 3 heads, 1 tail for an average of 0.75 heads. Flip a coin 1000 times and the average number of heads will be much much closer to 0.5.
> >
> > Going back to your trade example, if we are getting a non zero average after thousands of trades, then we are more and more confident that in fact the average is not zero. Thus, the larger t-test score is justified, and is in fact built into the equation.
> >
> > In other words, you don't have to worry about getting a SQN score of 7 after 5000 trades, because you will likely never find a trade strategy that is capable of producing an expectancy of 0.1 after that many trades!
> >
> > Mike
> >
> > --- In amibroker@xxxxxxxxxps.com, "bingk66" <bing.kwok@> wrote:
> > >
> > > Hi Howard,
> > >
> > > If there are no means to limit the number of transactions in the calcs, then one seriously runs the risk of challenging the mystical t-test score of 7 that you spoke about previously.
> > >
> > > As an example, if the OOS test was run over a 5 year period with 5000 transactions (a mere 1000 transaction/year, which is not excessive, especially for very short term trades), sqrt(5000) alone would yield in excess of 70 for the multiplier. This would leave expectancy/StdDev of R with just a target of 0.1, to reach the 7 t-tests score.
> > >
> > > Now, if you had 1,000,000 tranasctions in your OOS test....
> > >
> > > The concept of limiting the trade count does make sense to me. Maybe 100 is too low, and should be set higher. There does come a point whereby the sqrt(N) part of the equation will render the rest of the equation irrelevant once N gets too large.
> > >
> > > $0.02
> > >
> > > Bing
> > >
> > >
> > >
> > > --- In amibroker@xxxxxxxxxps.com, Howard B <howardbandy@> wrote:
> > > >
> > > > Hi Zozu --
> > > >
> > > > I must disagree with Van Tharp on this.
> > > >
> > > > If the runs are truly out-of-sample, then each and every one contributes to
> > > > the computation. It makes no sense to limit the count to 100. It is poor
> > > > procedure to limit the count. It is bad science to limit the count. Do not
> > > > limit the count.
> > > >
> > > > If the runs are in-sample, then the test has no meaning anyway. Computing
> > > > the t-test statistic using any N will be misleading. Do not even do the
> > > > computation. If a decision to trade a system is made after computing the
> > > > t-test statistic on trades that came solely from in-sample results, there is
> > > > an extremely high probability that a Type I error will be committed. That
> > > > is, the trader will believe that his system is better than random, when it
> > > > is in fact not better than random. Type I errors result in loss of money.
> > > >
> > > > Thanks,
> > > > Howard
> > > >
> > > >
> > > > On Tue, Oct 13, 2009 at 10:54 AM, zozuzoza <zozuka@> wrote:
> > > >
> > > > >
> > > > >
> > > > > Hi Howard,
> > > > >
> > > > > Limiting the number of N doesn't mean that you are not using all trades for
> > > > > the calculation of SQN. Only the sqrt(N) part of the formula is limited in
> > > > > order not to distort the results if there are many trades. It makes sense.
> > > > > The other part of the formula does count on all the trades.
> > > > >
> > > > > Zozu
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>

2.4.

Re: Is the Walk forward study useful?

Posted by: "Mike" sfclimbers@xxxxxxxxx   sfclimbers

Mon Oct 19, 2009 3:00 pm (PDT)



Howard,

"Does anyone have truly out-of-sample results where the t-test statistic is embarrassingly large?"

Embarrassing? No. But, maybe a little self conscious ;) I have run WFA optimizing on SQN.

After fifteen IS iterations (producing fourteen OOS values):

- Only one OOS value is below 2 (it came it at 1.77).
- Two others are between 2 and 3.
- The remaining 11 range from 3.09 - 5.69

The above are calculated using Tharp's formula and are based on OOS samples ranging in size from as few as 70 trades (SQN = 3.75) to as many as 466 trades (SQN = 5.04) over 6 month periods across all US stocks. The SQN = 5.69 was achieved with 189 OOS trades.

For reference, the IS calculations span a 2 year period and ranged from SQN = 3.2 to SQN = 6.17, each at a little over 1000 trades.

However, it is worth noting that when I ran my WFA, I separated strategy from position size. During the WFA process, I hard coded position size to $1,000 based on a $500,000 initial equity and allowed for a (never attained) maximum of 500 concurrent positions such that all trades were taken.

My intent was to optimize based on the consistency of the trade results. Once the WFA was complete, I updated the position sizing per the optimal percent risk for the resultant SQN, limited by the suitable portfolio heat for the same. I then ran by hand the backtest for each OOS to see what the actual equity and other summary statistics would be using a more realistic position sizing.

The nature of my strategy is such that when the market takes a dive, I enter many concurrent positions, sometimes reaching the portfolio heat limit. As such, the realistic position sizing could cause some trades found during the non sized OOS WFA to not be taken, thereby affecting the realistic SQN.

Missing out on some trades is consistent with Tharp's examples. But, I personally do not agree with that approach. In my view it can materially change the trade distribution. Sometimes significantly.

To counter this, I have calculated my R values based on the natural logarithm of the exit price relative to the entry price as per Ralph Vince in "Handbook of Portfolio Mathematics". This, as opposed to absolute dollar gains.

In so doing, I am able to add dynamic position sizing such that size is reduced below optimal (when necessary) in order to take *every* trade. This results in an identical sized SQN compared to the non sized WFA OOS results, albeit at non optimal leverage.

As a result of the non optimal leverage, the absolute returns are not as immense as what the high SQN would suggest. However, in test after test, it has been consistently shown that peak performance of my strategy is highly dependent upon taking all trades.

Mike

--- In amibroker@xxxxxxxxxps.com, Howard B <howardbandy@...> wrote:
>
> Hi Bing, and all --
>
> It really is Not a personal choice to decide whether to limit the number of
> data points counted, if you want the statistic to be a t-test. Mr Gossett
> (the actual name of the person who developed and published the t-test under
> the name "student") went to great lengths in detailing the behavior of
> empirical data and its agreement to statistical distributions. The t-test
> Always uses square root of number of observations.
>
> Of course, you are always permitted to develop your own test statistic. But
> unless you also do the research to determine critical values for various
> situations, you have no way of knowing the probability of the result that
> was observed.
>
> If you limit the number of observations that are considered, Do Not use the
> t-test tables to determine significance. At least, do not use them
> expecting that they accurately reflect your new test statistic -- I have no
> idea what modification would need to be made, and the statistical world
> would not publish my paper if I did the research and tried to get it
> accepted.
>
> I sincerely wish Van Tharp had not published that suggestion. It is just
> plain bad science. Do not use it.
>
> ....................................
>
> But back to the reality check as the t-test is being applied to metrics for
> trading systems.
>
> Does anyone have truly out-of-sample results where the t-test statistic is
> embarrassingly large?
>
> If so, I want your kind of problem. Contact me and we will deal with the
> t-test issue from the comfort of our yacht in the Bahamas. If not, what is
> the issue?
>
> Thanks,
> Howard
>
>
>
> On Sat, Oct 17, 2009 at 11:52 PM, bingk66 <bing.kwok@x..> wrote:
>
> >
> >
> > Hi Mike,
> >
> > I understand what you are saying. I agree that the more data points in the
> > calculations the more confidence you are entitle to have in the results of
> > the system, and hence the usage of the sqrt(N) portion of the equation to
> > reflect that. The concept of it all is fine.
> >
> > However, where I am not entirely comfortable with the equation is the
> > sqrt(N) part, as sqrt(N) can have way too much weighting in the overall
> > t-test score once N gets too large. Perhaps using the cube root of N might
> > be better as a means of allowing N to be fully factored into the equation (
> > as opposed to Van Tharp's proposal of limiting N to 100) without overbearing
> > the other parts of the equation. It boils down to a personal choice, I
> > guess, not unlike the calculation of the objective function that Howard
> > describes in his books whereby you wish to calculate a single number, and
> > that single number could be derived from a number of sources, each with
> > their own weighting and you like some form of partitioning across these
> > different sources so that no one source overbears the others, inorder to get
> > a balanced calculation can be obtained.
> >
> > Finally, the last part of your post would seem to indicate that as N
> > increases, expectancy/StdDevofR would tend to decrease. I can't see or
> > understand why that would be the case. I would appreciate it if you could
> > provide a brief explanation as to why that might be the case or at least
> > provide a link whereby I can read up a little more on this.
> >
> > Bing
> >
> >
> > --- In amibroker@xxxxxxxxxps.com <amibroker%40yahoogroups.com>, "Mike"
> > <sfclimbers@> wrote:
> > >
> > > Bing,
> > >
> > > In this example, the t-test is calculated to give us a level of
> > confidence that the average of the sample is different than zero.
> > >
> > > If a trade strategy had no predictive power, then its results would be
> > purely random, producing a net gain (over the long run) of zero with an
> > equal number of winners and losers.
> > >
> > > Actually, it would be a net gain of zero *over the prevailing trend*,
> > where the trend itself might be greater than zero, as per Aronson. But, that
> > is another conversation.
> > >
> > > The more trades taken, the more likely the true average would show. For
> > example; Flip a coin 4 times. You might get 3 heads, 1 tail for an average
> > of 0.75 heads. Flip a coin 1000 times and the average number of heads will
> > be much much closer to 0.5.
> > >
> > > Going back to your trade example, if we are getting a non zero average
> > after thousands of trades, then we are more and more confident that in fact
> > the average is not zero. Thus, the larger t-test score is justified, and is
> > in fact built into the equation.
> > >
> > > In other words, you don't have to worry about getting a SQN score of 7
> > after 5000 trades, because you will likely never find a trade strategy that
> > is capable of producing an expectancy of 0.1 after that many trades!
> > >
> > > Mike
> > >
> > > --- In amibroker@xxxxxxxxxps.com <amibroker%40yahoogroups.com>,
> > "bingk66" <bing.kwok@> wrote:
> > > >
> > > > Hi Howard,
> > > >
> > > > If there are no means to limit the number of transactions in the calcs,
> > then one seriously runs the risk of challenging the mystical t-test score of
> > 7 that you spoke about previously.
> > > >
> > > > As an example, if the OOS test was run over a 5 year period with 5000
> > transactions (a mere 1000 transaction/year, which is not excessive,
> > especially for very short term trades), sqrt(5000) alone would yield in
> > excess of 70 for the multiplier. This would leave expectancy/StdDev of R
> > with just a target of 0.1, to reach the 7 t-tests score.
> > > >
> > > > Now, if you had 1,000,000 tranasctions in your OOS test....
> > > >
> > > > The concept of limiting the trade count does make sense to me. Maybe
> > 100 is too low, and should be set higher. There does come a point whereby
> > the sqrt(N) part of the equation will render the rest of the equation
> > irrelevant once N gets too large.
> > > >
> > > > $0.02
> > > >
> > > > Bing
> > > >
> > > >
> > > >
> > > > --- In amibroker@xxxxxxxxxps.com <amibroker%40yahoogroups.com>, Howard
> > B <howardbandy@> wrote:
> > > > >
> > > > > Hi Zozu --
> > > > >
> > > > > I must disagree with Van Tharp on this.
> > > > >
> > > > > If the runs are truly out-of-sample, then each and every one
> > contributes to
> > > > > the computation. It makes no sense to limit the count to 100. It is
> > poor
> > > > > procedure to limit the count. It is bad science to limit the count.
> > Do not
> > > > > limit the count.
> > > > >
> > > > > If the runs are in-sample, then the test has no meaning anyway.
> > Computing
> > > > > the t-test statistic using any N will be misleading. Do not even do
> > the
> > > > > computation. If a decision to trade a system is made after computing
> > the
> > > > > t-test statistic on trades that came solely from in-sample results,
> > there is
> > > > > an extremely high probability that a Type I error will be committed.
> > That
> > > > > is, the trader will believe that his system is better than random,
> > when it
> > > > > is in fact not better than random. Type I errors result in loss of
> > money.
> > > > >
> > > > > Thanks,
> > > > > Howard
> > > > >
> > > > >
> > > > > On Tue, Oct 13, 2009 at 10:54 AM, zozuzoza <zozuka@> wrote:
> > > > >
> > > > > >
> > > > > >
> > > > > > Hi Howard,
> > > > > >
> > > > > > Limiting the number of N doesn't mean that you are not using all
> > trades for
> > > > > > the calculation of SQN. Only the sqrt(N) part of the formula is
> > limited in
> > > > > > order not to distort the results if there are many trades. It makes
> > sense.
> > > > > > The other part of the formula does count on all the trades.
> > > > > >
> > > > > > Zozu
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
> >
>

2.5.

Re: Is the Walk forward study useful?

Posted by: "Mike" sfclimbers@xxxxxxxxx   sfclimbers

Mon Oct 19, 2009 4:38 pm (PDT)



If the search space has many peaks (i.e. local maxima), then any non exhaustive optimizer may converge on a different peak each time. Two common ways to work around this are:

1. more tests per run
2. more runs

More tests gives more opportunity for the random elements of the algorithm to stumble upon a different peak, hopefully the global maxima.

More runs gives more starting points, thus better odds of starting near the global maxima to begin with.

While failure to get consistent results can be an indication of the quality of the search algorithm, it is perhaps more likely the nature of the fitness function (i.e. producing random, noisy search space) and insufficient settings passed to the optimizer algorithm.

Mike

--- In amibroker@xxxxxxxxxps.com, "zozuzoza" <zozuka@xxx> wrote:
>
> Hi,
>
> I think Tomasz wrote about the nature of cmae, it seems that it worth running it more than once. I run exactly the same WF test twice and it produced completely different results but it happened once. Another time I got similar results but still significantly different. It seems it depends on the number of variables how many time it needs to be run. When you start WF test it writes how many steps it will use to calculate. I though that it would automatically calculate the necessary steps needed for correct results but it seems that you have to specify the runs as well.
> I just run it twice for curiosity.
>
> Br,
> Zozu
>
>
> --- In amibroker@xxxxxxxxxps.com, i cs <ics4mer@> wrote:
> >
> >
> > Hi Zozuzoza
> >
> >
> > Thanks for posting your observations.
> >
> > I have used the WFA with exhaustive optimisations in the past and have found it flawless. But I've just started using the CMAE for some larger tests and I want to avoid any pitfalls which might occur.
> >
> > Without being too nosey, could you tell us about the nature of the optimisation? ( I am looking at long term stochastic momentum).
> >
> > Did anything else change between one execution and the next which might have impacted on the results?
> > Why did you run it twice?
> >
> >
> > Thanks
> >
> > Z
> >
> >
> >
> >
> > ________________________________
> > From: zozuzoza <zozuka@>
> > To: amibroker@xxxxxxxxxps.com
> > Sent: Mon, 12 October, 2009 6:22:08 AM
> > Subject: [amibroker] Re: Is the Walk forward study useful?
> >
> >
> > I found an interesting behavior of WF testing in Amibroker. Using the same AFL code, same parameters, same environment, same fitness function, everything is the same, but the results are completely different when I run it second time. I say completely, i.e. good WF results turned weak when I run it the 2nd time the WF test. I did not expect to have the same results due to the nature of non exhaustive optimiser but the results I got eliminated my faith in Amibroker WF usefulness. I used cmae optimiser.
> >
> > Running 2 times the WF test turned the average CAR of 18% to 4% the second time I run. There were about 50 trades in the IS period.
> >
> > Try it yourself!
> >
> > --- In amibroker@xxxxxxxxx ps.com, "zozuzoza" <zozuka@> wrote:
> > >
> > > Aronson quote "Each strategy will have its own best values for IS/OOS periods". - and its own fitness function. For me, different systems perform different results based on different fitness function. I have developed 7 fitness functions and I test them on 4 systems in order to find the best fitness function but it seems mission impossible. All my fitness functions are profit/risk type ones like UPI, CAR/Mdd etc.
> > >
> > > I think you express too much weight on IS/OOS time period. I think the fitness function, the parameter range are much more important.
> > >
> > > So far, I must agree with Tony that he does not belive in WF. I only use it for verification, just to see another way of the results, nothing more, so far.
> > >
> > > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
> > > >
> > > > Thanks again Mike ... See also my previous answer. Just one more remark. Here you are suggesting to take 1 to 3 year for the OOS period. When using commodity time series, this is more or less what I am doing. Why ? Because a lot of commodities coming from the agricultural sector have these typical yearly cycles. But when using time series based upon stocks ( S&P500 etc. ), I am using a 5 to 7 year OOS period. Simply because of the economic cycle. I am telling you this because it shows how I am thinking. Just taking a period because somebody gave me a rule of thumb is rather tricky in my eyes. For me there must be a good explanation for the length of that period ...
> > > >
> > > > Regards, Ton.
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Mike
> > > > To: amibroker@xxxxxxxxx ps.com
> > > > Sent: Monday, October 05, 2009 11:32 AM
> > > > Subject: [amibroker] Re: Is the Walk forward study useful?
> > > >
> > > >
> > > > Ton,
> > > >
> > > > You said "If you can help me to get things done in an objective way then I will be delighted to know how you want to do that"
> > > >
> > > > What I was suggesting was:
> > > >
> > > > 1. Identify what measure you will use to judge the IS/OOS period sizes (i.e. in my case I used consistency of CAR).
> > > >
> > > > 2. Run walk forward with IS ranging from 1 year to 3 years and OOS ranging from 1/8 to 1/3 of the IS period.
> > > >
> > > > 3. Calculate summary statistics for each IS/OOS combination for the measure that you decided upon in step 1 (i.e. in my case I calculated the average CAR and the standard deviation of CAR from the OOS samples). It may help to plot a distribution to visualize the data.
> > > >
> > > > 4. Observe whether one IS/OOS combination stands out as having the most normally distributed values.
> > > >
> > > > Naturally, there is a limit to how many IS/OOS combinations we can try before we have curve fit our results. This is where I find Pardo's ratios to be helpful. By keeping within the suggested range, we are leaving untested many alternative combinations.
> > > >
> > > > Mike
> > > >
> > > > --- In amibroker@xxxxxxxxx ps.com, "Mike" <sfclimbers@ > wrote:
> > > > >
> > > > > Ton,
> > > > >
> > > > > 1. Pardo disagrees with Aronson (and Bandy). Pardo suggests that a OOS to IS ration of 25% - 35% is best, but that a good rule of thumb for empirical testing is 1/8 to 1/3.
> > > > >
> > > > > 2. Yes, I suspect that each strategy will have its own best values for IS/OOS and that other values will appear as useless. It is up to us to try and find the best values.
> > > > >
> > > > > With respect to your comment: "I am getting results that show a random pattern", my question remains; What are you measuring? In other words, what values appear random - your fitness value? CAR? Something else?
> > > > >
> > > > > 3. I have done very much as you ask, except that I also varied my IS period. I mostly kept my ratios within Pardo's suggested 1/8 to 1/3, but went as low as 1/12 and as high as 1/2 just to be sure.
> > > > >
> > > > > For example IS=1 year, IS=2 years, IS=3 years giving
> > > > >
> > > > > IS1yr+OOS6mth, IS1yr+OOS3mth, IS1yr+OOS1mth
> > > > > IS2yr+OOS12mth, IS2yr+OOS6mth, IS2yr+OOS3mth
> > > > > IS3yr+OOS18mth, IS3yr+OOS12mth, IS3yr+OOS6mth
> > > > >
> > > > > IS2yr+OOS6mth produced the most consistent CAR, even though a weighted UPI was used as the fitness function for the actual walk forward.
> > > > >
> > > > > I do not have a strong opinion as to whether or not there really is a relationship between IS and OOS sizes. I found that Pardo's rule of thumb was as good a starting place as any. I was happy that my values (25%) coincided with what he advised. But, had my studies suggested a ratio outside of Pardo's range, I would have still gone with what my results suggested, despite Pardo's advice.
> > > > >
> > > > > Mike
> > > > >
> > > > > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
> > > > > >
> > > > > > Hi Mike,
> > > > > >
> > > > > > What I am saying is :
> > > > > >
> > > > > > 1. That according to David Aronson "There is no theory that suggests what fraction of the data should be assigned to training ( IS ) and testing ( OOS )." and that "Results can be very sensitive to these choices ... ". I assume that he knows where he is talking about ...
> > > > > >
> > > > > > 2. That when I am doing WalkFoward tests following the advice of Howard Bandy, Robert Pardo AND Van Tharp, I am getting results that show a random patron when changing the OOS en IS periods. So my conclusion is that WalkFoward is a subjective test ...
> > > > > >
> > > > > > Therefore I have serious problems using WalkFoward tests. If you can help me to get things done in an objective way then I will be delighted to know how you want to do that. But for sure Van Tharp did not help me ...
> > > > > >
> > > > > > Please do a simple WF test with OOS=1year and IS=1month... 12months. So creating WF results for OOS1y+IS1m, OOS1y+IS2m etc. And see what you are getting. This is purely random. The result says nothing to me ..
> > > > > >
> > > > > > Regards, Ton.
> > > > > >
> > > > > >
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: Mike
> > > > > > To: amibroker@xxxxxxxxx ps.com
> > > > > > Sent: Monday, October 05, 2009 9:29 AM
> > > > > > Subject: [amibroker] Re: Is the Walk forward study useful?
> > > > > >
> > > > > >
> > > > > > Ton,
> > > > > >
> > > > > > Are you saying that you have not found an IS/OOS pair that works well? What measure are you using to judge "stability" of the walk forward process (i.e. what measure are you using to judge the process as random)?
> > > > > >
> > > > > > After testing with multiple IS periods, and with multiple OOS periods, I was able to identify "fixed" window lengths that proved more consistent than the others tested.
> > > > > >
> > > > > > I reached this conclusion by charting a distribution curve of CAR for the OOS results. My fitness function is currently based on UPI, and thus my walk forward is driven by that value. However, ultimately my interest is in how consistent CAR would be which is why I used that for evaluating the goodness of fit for the IS/OOS period lengths.
> > > > > >
> > > > > > In my case, over a 13 year period, a 2 year IS and 6 month OOS (for a total of 26 OOS data points) produced the most normal looking distribution of CAR results (i.e. central peak, smallest standard deviation). Excluding the results from all of 1999 and the first half of 2000 (during which results were abnormally strong), the distribution curve looks even better.
> > > > > >
> > > > > > Also, have you tried working with different fitness functions? Perhaps your fitness function doesn't adequately identify the "signal" and thus misguides the walk forward, regardless of IS/OOS window lengths.
> > > > > >
> > > > > > I am in the process of running a new walk forward over the last 7.5 years using Van Tharp's System Quality Number (SQN) as my fitness function. I have kept the same 2 year IS/6 months OOS for a total of 15 OOS data points. My system strives to generate a minimum average of 2 trades per day, so each IS period generally has 1000 or more trades from which to calculate the fitness.
> > > > > >
> > > > > > It has not run to completion yet. But, for the periods that have produced results, the results look promising (at least with respect to the SQN of the OOS relative to the SQN of the IS, I have not yet created the distribution of CAR for OOS).
> > > > > >
> > > > > > Assuming that the remainder of the results are equally strong, I will walk forward further back in history to get the full 26 data points to compare against the results produced using my UPI fitness. If the CAR distribution is more normal using SQN as fitness, then I will officially start using SQN for generating optimal values for my next live OOS.
> > > > > >
> > > > > > If you are willing to share, I would be curious to hear if SQN as a fitness function was able to produce a more stable walk forward for you, and what measure you are using to judge "stable".
> > > > > >
> > > > > > Mike
> > > > > >
> > > > > > --- In amibroker@xxxxxxxxx ps.com, "Ton Sieverding" <ton.sieverding@ > wrote:
> > > > > > >
> > > > > > > Hi Howard,
> > > > > > >
> > > > > > > I still am struggling with the following sentence from David Aronson : "The decision about how to apportion the data between the IS and OOS subsets is arbitrary. There is no theory that suggests what fraction of the data should be assigned to training ( IS ) and testing ( OOS ). Results can be very sensitive to these choices ... ". Because this is exactly what I am seeing. WalkFoward results are more then sensitive to the IS/OOS relation and in many cases a pure random story. I am getting more and more the feeling that WalkForward is not the correct or better objective way to test trading systems. With all respect to Robert Pardo's idea's about this topic and what you are writing in QTS ...
> > > > > > >
> > > > > > > Regards, Ton.
> > > > > > >
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: Howard B
> > > > > > > To: amibroker@xxxxxxxxx ps.com
> > > > > > > Sent: Monday, October 05, 2009 12:48 AM
> > > > > > > Subject: Re: [amibroker] Re: Is the Walk forward study useful?
> > > > > > >
> > > > > > >
> > > > > > > Greetings all --
> > > > > > >
> > > > > > > My point of view on the length of the in-sample and out-of-sample may be a little different.
> > > > > > >
> > > > > > > The logic of the code has been designed to recognize some pattern or characteristic of the data. The length of the in-sample period is however long it takes to keep the model (the logic) in synchronization with the data. There is no one answer to what that length is. When the pattern changes, the model fits it less well. When the pattern changes significantly, the model must be re-synchronized. The only person who can say whether the length is correct or should be longer or shorter is the person running the tests.
> > > > > > >
> > > > > > > The length of the out-of-sample period is however long the model and the data remain in sync. That must be some length of time beyond the in-sample period in order to make profitable trades. It could be a long time, in which case there is no need to modify the model at all during that period. There is no general relationship between the length of the in-sample period and the length of the out-of-sample period -- none. There is no general relationship between the performance in-sample and the performance out-of-sample. The greater the difference between the two, the better the system has been fit to the data over the in-sample period. But that does not necessarily mean that the out-of-sample results are less meaningful.
> > > > > > >
> > > > > > > You can perform some experiments to see what the best in-sample length is. And then to see what the typical out-of-sample length is. Knowing these two, set up a walk forward run using those lengths. After the run is over, ignore the in-sample results. They have no value in estimating the future performance of the system. It is the out-of-sample results that can give you some idea of how the system might act when traded with real money.
> > > > > > >
> > > > > > > It is nice to have a lot of closed traded in the out-of-sample period, but you can run statistics on as few as 5 or 6. Having fewer trades means that it will be more difficult to achieve statistical significance. The number 30 is not magic -- it is just conventional.
> > > > > > >
> > > > > > > I think it helps to distinguish between the in-sample and out-of-sample periods this way -- in-sample is seeing how well the model can be made to fit the older data, out-of-sample is seeing how well it might fit future data.
> > > > > > >
> > > > > > > Ignore the television ads where person after person exclaims "backtesting! " as though that is the key to system development. It is not. Backtesting by itself, without going on to walk forward testing, will give the trading system developer the impression that the system is good. In-sample results are always good. We do not stop fooling with the system until they are good. But in-sample results have no value in predicting future performance -- none.
> > > > > > >
> > > > > > > There are some general characteristics of trading systems that make them easier to validate. Those begin with having a positive expectancy -- no system can be profitable in the long term unless it has a positive expectancy. Then going on to include trade frequently, hold a short time, minimize losses. Of course, there have been profitable systems that trade infrequently, hold a long time, and suffer deep drawdowns. It is much harder to show that those were profitable because they were good rather than lucky.
> > > > > > >
> > > > > > > There is more information about in-sample, out-of-sample, walk forward testing, statistical validation, objective functions, and so forth in my book, "Quantitative Trading Systems."
> > > > > > > http://www.quantita tivetradingsyste ms.com/
> > > > > > >
> > > > > > > Thanks for listening,
> > > > > > > Howard
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Sun, Oct 4, 2009 at 10:56 AM, Bisto <bistoman73@ > wrote:
> > > > > > >
> > > > > > >
> > > > > > > Yes, I believe that you should increase the IS period
> > > > > > >
> > > > > > > as general rule is not true "the shortest the best" trying to catch every market change because it's possible that a too short IS period produces a too low number of trades with no statistical robustness --> you will find parameters that are more likely candidated to fail in OS
> > > > > > >
> > > > > > > try a longer IS period and let's see what will happen
> > > > > > >
> > > > > > > I read an interesting book on this issue: "The evaluation and optimization of trading strategies" by Pardo. Maybe he repeated too much times the same concepts nevertheless I liked it
> > > > > > >
> > > > > > > if anyone could suggest a better book about this issue it would be very appreciated
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Bisto
> > > > > > >
> > > > > > > --- In amibroker@xxxxxxxxx ps.com, "Gonzaga" <gonzagags@> wrote:
> > > > > > > >
> > > > > > > > Oh, sorry, I am lost in translation ... ;-)
> > > > > > > > Yes I meant trades of my IS period.
> > > > > > > > I've got about 70 trades in my IS period, three months.
> > > > > > > > BUT, I buy stocks in a multiposition way.This means, that my hole capital divides among several stocks purchased simultaneously.
> > > > > > > > So, in my statistics, I use to average my trades. When I use maxopenpositions= 7, I use to average my results every 7 trades.
> > > > > > > > Considering that, my trades in three months are not 70, but less ( not exactly 70/7, but less than 70)
> > > > > > > >
> > > > > > > > If I use maxopenposition= 1, which is, invest all my capital every trade, in three months I would have about 29 trades.
> > > > > > > > So I suppose I have to increase the IS period.. isn`t it?
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In amibroker@xxxxxxxxx ps.com, "Bisto" <bistoman73@ > wrote:
> > > > > > > > >
> > > > > > > > > What do you mean with "I don't have many buyings and sellings"?
> > > > > > > > >
> > > > > > > > > If you have less than 30 trades in an IS period, IMHO, you are using a too short period due to not statistical robustness --> WFA is misleading, try a longer IS period
> > > > > > > > >
> > > > > > > > > Bisto
> > > > > > > > >
> > > > > > > > > --- In amibroker@xxxxxxxxx ps.com, "Gonzaga" <gonzagags@> wrote:
> > > > > > > > > >
> > > > > > > > > > Thanks for the answers
> > > > > > > > > > To Keith McCombs :
> > > > > > > > > >
> > > > > > > > > > I use 3 months IS test and 1 month step, this is, 1 month OS test. My system is an end-of day-system, so I don't have many buyings and sellings..
> > > > > > > > > > Perhaps I should make bigger the IS period?
> > > > > > > > > >
> > > > > > > > > > anyway, my parameter behaves well in any period. Of course it is an optimized variable, but it doesn't fail in ten years, in none of those ten years, over 500 stocks.. a very long period..
> > > > > > > > > > So, couldn't it be better, on the long run, than the parameters optimized with the WF study?
> > > > > > > > > > (In fact, I am using it now, the optimized variable)
> > > > > > > > > > That's my real question..
> > > > > > > > > >
> > > > > > > > > > To dloyer123:
> > > > > > > > > > I haven't understood the meaning of the Walk Forward Efficency, and seems interesting.
> > > > > > > > > > can you explain it better, please..?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --- In amibroker@xxxxxxxxx ps.com, "dloyer123" <dloyer123@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > I have had similar experiences. I like to use WFT to estimate what Pardo call's his "Walk Forward Efficency", or the ratio of the out of sample WF profits to just optimizing over the entire time period.
> > > > > > > > > > >
> > > > > > > > > > > A good system should have as high a WFE as posible. Systems with a poor WFE tend to do poorly in live trading.
> > > > > > > > > > >
> > > > > > > > > > > If you have a parm set that works well over a long period of live trading, then you are doing well!
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
> >
> >
> >
> > __________________________________________________________
> > Get more done like never before with Yahoo!7 Mail.
> > Learn more: http://au.overview.mail.yahoo.com/
> >
>

2.6.

Re: Is the Walk forward study useful?

Posted by: "aarbee60" rajbakshi@xxxxxxxxxxx   aarbee60

Mon Oct 19, 2009 5:02 pm (PDT)



In terms of getting significantly different results by shifting IS and OOS windows, could it be the result of using ObjFun like CAR/MDD where the result would be different if the CAR and/or MDD changes significantly at the beginning or end of the IS window. In this case, as the IS or OOS window is shifted the ObjFun changes dramatically giving rise to the behaviour noted in the earlier posts of this thread.

Curtis Faith in his "Way of the Turtle" refers to this behaviour in the context of designing more robust metrics. He has devised a couple of metrics that make a lot of sense. RAR% (Regressed Annual Return percentage) instead of CAR uses the beginning and ending values of linear regression line instead of those of the equity curve.

For example if at the beginning of the IS or OOS window, the equity curve had a downturn and a significant upturn before the end of that window the CAR would be significantly higher. In the same case if the Linear Regression line was used, the CAR value would be less. In general, the RAR% value is less sensitive to equity changes at the beginning and end of the test. This is why Curtis Faith refers to it as a more Robust measure of performance.

Anyone has any views on above. Would be very interested to hear.

Cheers
Raj Bakshi

--- In amibroker@xxxxxxxxxps.com, "Mike" <sfclimbers@...> wrote:
>
> Hi Ton,
>
> I agree that the rule of thumb is subjective. So far, I've been willing to live with it.
>
> It appears that you and I have different expectations of IS/OOS window sizes. I treat the calculation of walk forward window sizes as a second pass optimization, similar to a simple moving average (SMA) crossover system.
>
> - There are two variables (e.g. IS length/OOS length vs. fast SMA/slow SMA)
> - An optimal combination is desired
> - We use a fitness function to measure optimal (e.g. OOS:IS ratio vs. CAR/MDD)
>
> This is how I try to satisfy your Aronson quote "Each strategy will have its own best values for IS/OOS periods".
>
> Upon finding an optimal CAR/MDD using fast SMA/slow SMA, we should theoretically be able to trade that same optimal combination of fast SMA/slow SMA over different time periods and expect to get a somewhat stable CAR/MDD (subject to changing market conditions).
>
> I would not expect combinations of fast SMA/slow SMA to be stable relative to each other. Looking at a 3-D graph for this crossover system will reveal peaks and valleys. Taking a single slice of that graph (i.e. holding slow SMA constant and varying only fast SMA) will reveal a rising and falling wave.
>
> So, I would expect exactly the same in the IS/OOS experiment you describe. You are simply taking a slice of the 2 variable optimization graph (holding IS constant and varying OOS). I would expect a rising and falling wave representing the peaks and valleys that would appear on the full 3-D graph.
>
> If I optimize the ratio of OOS:IS using IS length/OOS length, then I expect to get a somewhat consistent OOS:IS ratio (subject to market changes) when using that same optimal IS length/OOS length over different data ranges. I don't expect to get a stable OOS:IS ratio using a fixed IS length and variable OOS length.
>
> Mike
>
> --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding" <ton.sieverding@> wrote:
> >
> > Thanks for your patience Mike -)
> >
> > 1. I know Pardo disagrees with Aronson. And yes I am also using Pardo's rule of thumb. But a rule of thumb without a scientific explanation is still a rule of thumb and therefore subjective. The result of this is when taking 1/8 in stead of 1/3, I am getting a completely different results. That's what Aronson tells me. So I do not understand why Pardo disagrees with Aronson ... Of course I should ask him. And I will ...
> >
> > 2. Here you are telling me what Aronson says : "Each strategy will have its own best values for IS/OOS periods". But trying to find the best values is empirical and therefore without having a 'good theory' why your are getting these values is highly subjective. Pardo is not giving me this good theory and Aronson tells me this good theory does not exist ...
> >
> > 3. With regard to our topic, it's not so important which objective function you are using for the WalkFoward. In general I use the CAR/MDD. But whatever OF gives you the same random WalkForward results. Where of course by definition you should use a return/risk related OF ...
> >
> > 4. The way I am analyzing the WalkForward result is simple. I am calculating the differences between the IS and OOS results in percentages from OOS. Then I am taking the average and standard deviation of all these percentages. This gives me an idea about the average IS/OOS error as well as the spread around this average. For the same AFL using the same Symbol you should do the WalkFoward in the way I mentioned in my previous email and calculate the above average/stdev relation. In order to get a stable WalkForward result being independent of the IS/OOS ratio, the average/stdev relation should be more or less stable. It's not. It's highly dependent on the IS/OOS ratio you are using ...
> >
> > BTW ... To get things straight, I am not throwing WalkFoward out of the window. I am just trying to believe in what I am using. And it's getting more and more difficult for me ...
> >
> > Regards, Ton.
> >
> >
> >
> >
> > ----- Original Message -----
> > From: Mike
> > To: amibroker@xxxxxxxxxps.com
> > Sent: Monday, October 05, 2009 11:09 AM
> > Subject: [amibroker] Re: Is the Walk forward study useful?
> >
> >
> > Ton,
> >
> > 1. Pardo disagrees with Aronson (and Bandy). Pardo suggests that a OOS to IS ration of 25% - 35% is best, but that a good rule of thumb for empirical testing is 1/8 to 1/3.
> >
> > 2. Yes, I suspect that each strategy will have its own best values for IS/OOS and that other values will appear as useless. It is up to us to try and find the best values.
> >
> > With respect to your comment: "I am getting results that show a random pattern", my question remains; What are you measuring? In other words, what values appear random - your fitness value? CAR? Something else?
> >
> > 3. I have done very much as you ask, except that I also varied my IS period. I mostly kept my ratios within Pardo's suggested 1/8 to 1/3, but went as low as 1/12 and as high as 1/2 just to be sure.
> >
> > For example IS=1 year, IS=2 years, IS=3 years giving
> >
> > IS1yr+OOS6mth, IS1yr+OOS3mth, IS1yr+OOS1mth
> > IS2yr+OOS12mth, IS2yr+OOS6mth, IS2yr+OOS3mth
> > IS3yr+OOS18mth, IS3yr+OOS12mth, IS3yr+OOS6mth
> >
> > IS2yr+OOS6mth produced the most consistent CAR, even though a weighted UPI was used as the fitness function for the actual walk forward.
> >
> > I do not have a strong opinion as to whether or not there really is a relationship between IS and OOS sizes. I found that Pardo's rule of thumb was as good a starting place as any. I was happy that my values (25%) coincided with what he advised. But, had my studies suggested a ratio outside of Pardo's range, I would have still gone with what my results suggested, despite Pardo's advice.
> >
> > Mike
> >
> > --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding" <ton.sieverding@> wrote:
> > >
> > > Hi Mike,
> > >
> > > What I am saying is :
> > >
> > > 1. That according to David Aronson "There is no theory that suggests what fraction of the data should be assigned to training ( IS ) and testing ( OOS )." and that "Results can be very sensitive to these choices ... ". I assume that he knows where he is talking about ...
> > >
> > > 2. That when I am doing WalkFoward tests following the advice of Howard Bandy, Robert Pardo AND Van Tharp, I am getting results that show a random patron when changing the OOS en IS periods. So my conclusion is that WalkFoward is a subjective test ...
> > >
> > > Therefore I have serious problems using WalkFoward tests. If you can help me to get things done in an objective way then I will be delighted to know how you want to do that. But for sure Van Tharp did not help me ...
> > >
> > > Please do a simple WF test with OOS=1year and IS=1month...12months. So creating WF results for OOS1y+IS1m, OOS1y+IS2m etc. And see what you are getting. This is purely random. The result says nothing to me ...
> > >
> > > Regards, Ton.
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: Mike
> > > To: amibroker@xxxxxxxxxps.com
> > > Sent: Monday, October 05, 2009 9:29 AM
> > > Subject: [amibroker] Re: Is the Walk forward study useful?
> > >
> > >
> > > Ton,
> > >
> > > Are you saying that you have not found an IS/OOS pair that works well? What measure are you using to judge "stability" of the walk forward process (i.e. what measure are you using to judge the process as random)?
> > >
> > > After testing with multiple IS periods, and with multiple OOS periods, I was able to identify "fixed" window lengths that proved more consistent than the others tested.
> > >
> > > I reached this conclusion by charting a distribution curve of CAR for the OOS results. My fitness function is currently based on UPI, and thus my walk forward is driven by that value. However, ultimately my interest is in how consistent CAR would be which is why I used that for evaluating the goodness of fit for the IS/OOS period lengths.
> > >
> > > In my case, over a 13 year period, a 2 year IS and 6 month OOS (for a total of 26 OOS data points) produced the most normal looking distribution of CAR results (i.e. central peak, smallest standard deviation). Excluding the results from all of 1999 and the first half of 2000 (during which results were abnormally strong), the distribution curve looks even better.
> > >
> > > Also, have you tried working with different fitness functions? Perhaps your fitness function doesn't adequately identify the "signal" and thus misguides the walk forward, regardless of IS/OOS window lengths.
> > >
> > > I am in the process of running a new walk forward over the last 7.5 years using Van Tharp's System Quality Number (SQN) as my fitness function. I have kept the same 2 year IS/6 months OOS for a total of 15 OOS data points. My system strives to generate a minimum average of 2 trades per day, so each IS period generally has 1000 or more trades from which to calculate the fitness.
> > >
> > > It has not run to completion yet. But, for the periods that have produced results, the results look promising (at least with respect to the SQN of the OOS relative to the SQN of the IS, I have not yet created the distribution of CAR for OOS).
> > >
> > > Assuming that the remainder of the results are equally strong, I will walk forward further back in history to get the full 26 data points to compare against the results produced using my UPI fitness. If the CAR distribution is more normal using SQN as fitness, then I will officially start using SQN for generating optimal values for my next live OOS.
> > >
> > > If you are willing to share, I would be curious to hear if SQN as a fitness function was able to produce a more stable walk forward for you, and what measure you are using to judge "stable".
> > >
> > > Mike
> > >
> > > --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding" <ton.sieverding@> wrote:
> > > >
> > > > Hi Howard,
> > > >
> > > > I still am struggling with the following sentence from David Aronson : "The decision about how to apportion the data between the IS and OOS subsets is arbitrary. There is no theory that suggests what fraction of the data should be assigned to training ( IS ) and testing ( OOS ). Results can be very sensitive to these choices ... ". Because this is exactly what I am seeing. WalkFoward results are more then sensitive to the IS/OOS relation and in many cases a pure random story. I am getting more and more the feeling that WalkForward is not the correct or better objective way to test trading systems. With all respect to Robert Pardo's idea's about this topic and what you are writing in QTS ...
> > > >
> > > > Regards, Ton.
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Howard B
> > > > To: amibroker@xxxxxxxxxps.com
> > > > Sent: Monday, October 05, 2009 12:48 AM
> > > > Subject: Re: [amibroker] Re: Is the Walk forward study useful?
> > > >
> > > >
> > > > Greetings all --
> > > >
> > > > My point of view on the length of the in-sample and out-of-sample may be a little different.
> > > >
> > > > The logic of the code has been designed to recognize some pattern or characteristic of the data. The length of the in-sample period is however long it takes to keep the model (the logic) in synchronization with the data. There is no one answer to what that length is. When the pattern changes, the model fits it less well. When the pattern changes significantly, the model must be re-synchronized. The only person who can say whether the length is correct or should be longer or shorter is the person running the tests.
> > > >
> > > > The length of the out-of-sample period is however long the model and the data remain in sync. That must be some length of time beyond the in-sample period in order to make profitable trades. It could be a long time, in which case there is no need to modify the model at all during that period. There is no general relationship between the length of the in-sample period and the length of the out-of-sample period -- none. There is no general relationship between the performance in-sample and the performance out-of-sample. The greater the difference between the two, the better the system has been fit to the data over the in-sample period. But that does not necessarily mean that the out-of-sample results are less meaningful.
> > > >
> > > > You can perform some experiments to see what the best in-sample length is. And then to see what the typical out-of-sample length is. Knowing these two, set up a walk forward run using those lengths. After the run is over, ignore the in-sample results. They have no value in estimating the future performance of the system. It is the out-of-sample results that can give you some idea of how the system might act when traded with real money.
> > > >
> > > > It is nice to have a lot of closed traded in the out-of-sample period, but you can run statistics on as few as 5 or 6. Having fewer trades means that it will be more difficult to achieve statistical significance. The number 30 is not magic -- it is just conventional.
> > > >
> > > > I think it helps to distinguish between the in-sample and out-of-sample periods this way -- in-sample is seeing how well the model can be made to fit the older data, out-of-sample is seeing how well it might fit future data.
> > > >
> > > > Ignore the television ads where person after person exclaims "backtesting!" as though that is the key to system development. It is not. Backtesting by itself, without going on to walk forward testing, will give the trading system developer the impression that the system is good. In-sample results are always good. We do not stop fooling with the system until they are good. But in-sample results have no value in predicting future performance -- none.
> > > >
> > > > There are some general characteristics of trading systems that make them easier to validate. Those begin with having a positive expectancy -- no system can be profitable in the long term unless it has a positive expectancy. Then going on to include trade frequently, hold a short time, minimize losses. Of course, there have been profitable systems that trade infrequently, hold a long time, and suffer deep drawdowns. It is much harder to show that those were profitable because they were good rather than lucky.
> > > >
> > > > There is more information about in-sample, out-of-sample, walk forward testing, statistical validation, objective functions, and so forth in my book, "Quantitative Trading Systems."
> > > > http://www.quantitativetradingsystems.com/
> > > >
> > > > Thanks for listening,
> > > > Howard
> > > >
> > > >
> > > >
> > > > On Sun, Oct 4, 2009 at 10:56 AM, Bisto <bistoman73@> wrote:
> > > >
> > > >
> > > > Yes, I believe that you should increase the IS period
> > > >
> > > > as general rule is not true "the shortest the best" trying to catch every market change because it's possible that a too short IS period produces a too low number of trades with no statistical robustness --> you will find parameters that are more likely candidated to fail in OS
> > > >
> > > > try a longer IS period and let's see what will happen
> > > >
> > > > I read an interesting book on this issue: "The evaluation and optimization of trading strategies" by Pardo. Maybe he repeated too much times the same concepts nevertheless I liked it
> > > >
> > > > if anyone could suggest a better book about this issue it would be very appreciated
> > > >
> > > >
> > > >
> > > > Bisto
> > > >
> > > > --- In amibroker@xxxxxxxxxps.com, "Gonzaga" <gonzagags@> wrote:
> > > > >
> > > > > Oh, sorry, I am lost in translation ... ;-)
> > > > > Yes I meant trades of my IS period.
> > > > > I've got about 70 trades in my IS period, three months.
> > > > > BUT, I buy stocks in a multiposition way.This means, that my hole capital divides among several stocks purchased simultaneously.
> > > > > So, in my statistics, I use to average my trades. When I use maxopenpositions=7, I use to average my results every 7 trades.
> > > > > Considering that, my trades in three months are not 70, but less ( not exactly 70/7, but less than 70)
> > > > >
> > > > > If I use maxopenposition=1, which is, invest all my capital every trade, in three months I would have about 29 trades.
> > > > > So I suppose I have to increase the IS period.. isn`t it?
> > > > >
> > > > >
> > > > > --- In amibroker@xxxxxxxxxps.com, "Bisto" <bistoman73@> wrote:
> > > > > >
> > > > > > What do you mean with "I don't have many buyings and sellings"?
> > > > > >
> > > > > > If you have less than 30 trades in an IS period, IMHO, you are using a too short period due to not statistical robustness --> WFA is misleading, try a longer IS period
> > > > > >
> > > > > > Bisto
> > > > > >
> > > > > > --- In amibroker@xxxxxxxxxps.com, "Gonzaga" <gonzagags@> wrote:
> > > > > > >
> > > > > > > Thanks for the answers
> > > > > > > To Keith McCombs :
> > > > > > >
> > > > > > > I use 3 months IS test and 1 month step, this is, 1 month OS test. My system is an end-of day-system, so I don't have many buyings and sellings..
> > > > > > > Perhaps I should make bigger the IS period?
> > > > > > >
> > > > > > > anyway, my parameter behaves well in any period. Of course it is an optimized variable, but it doesn't fail in ten years, in none of those ten years, over 500 stocks.. a very long period..
> > > > > > > So, couldn't it be better, on the long run, than the parameters optimized with the WF study?
> > > > > > > (In fact, I am using it now, the optimized variable)
> > > > > > > That's my real question..
> > > > > > >
> > > > > > > To dloyer123:
> > > > > > > I haven't understood the meaning of the Walk Forward Efficency, and seems interesting.
> > > > > > > can you explain it better, please..?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --- In amibroker@xxxxxxxxxps.com, "dloyer123" <dloyer123@> wrote:
> > > > > > > >
> > > > > > > > I have had similar experiences. I like to use WFT to estimate what Pardo call's his "Walk Forward Efficency", or the ratio of the out of sample WF profits to just optimizing over the entire time period.
> > > > > > > >
> > > > > > > > A good system should have as high a WFE as posible. Systems with a poor WFE tend to do poorly in live trading.
> > > > > > > >
> > > > > > > > If you have a parm set that works well over a long period of live trading, then you are doing well!
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

2.7.

Re: Is the Walk forward study useful?

Posted by: "Steve Dugas" sjdugas@xxxxxxxxxxx   djs44us

Mon Oct 19, 2009 11:02 pm (PDT)



Hi - For years I have been calculating stats for the reg line alongside
stats for the equity curve. But lately I have been wondering about the value
of the regression line because, in real life there are volatile periods
where the market has more to give, and less volatile periods where there
just isn't as much available. Would it be better to shoot for capturing a
consistent % of what is available rather than just a consistent %? I was
thinking about how to account for this, the best I have come up with is to
replace the reg line with a "perfect system eq line", i.e. one that looks
ahead to the next day and pre-positions itself so that it wins every day.
Then scale it down to see how the system eq line fits against the "perfect
shape". Anyone have any thoughts whether this might be a better approach?
Thanks!

Steve

----- Original Message -----
From: "aarbee60" <rajbakshi@xxxxxxxxcom>
To: <amibroker@xxxxxxxxxps.com>
Sent: Monday, October 19, 2009 8:02 PM
Subject: [amibroker] Re: Is the Walk forward study useful?

> In terms of getting significantly different results by shifting IS and OOS
> windows, could it be the result of using ObjFun like CAR/MDD where the
> result would be different if the CAR and/or MDD changes significantly at
> the beginning or end of the IS window. In this case, as the IS or OOS
> window is shifted the ObjFun changes dramatically giving rise to the
> behaviour noted in the earlier posts of this thread.
>
> Curtis Faith in his "Way of the Turtle" refers to this behaviour in the
> context of designing more robust metrics. He has devised a couple of
> metrics that make a lot of sense. RAR% (Regressed Annual Return
> percentage) instead of CAR uses the beginning and ending values of linear
> regression line instead of those of the equity curve.
>
> For example if at the beginning of the IS or OOS window, the equity curve
> had a downturn and a significant upturn before the end of that window the
> CAR would be significantly higher. In the same case if the Linear
> Regression line was used, the CAR value would be less. In general, the
> RAR% value is less sensitive to equity changes at the beginning and end of
> the test. This is why Curtis Faith refers to it as a more Robust measure
> of performance.
>
> Anyone has any views on above. Would be very interested to hear.
>
> Cheers
> Raj Bakshi
>
> --- In amibroker@xxxxxxxxxps.com, "Mike" <sfclimbers@...> wrote:
>>
>> Hi Ton,
>>
>> I agree that the rule of thumb is subjective. So far, I've been willing
>> to live with it.
>>
>> It appears that you and I have different expectations of IS/OOS window
>> sizes. I treat the calculation of walk forward window sizes as a second
>> pass optimization, similar to a simple moving average (SMA) crossover
>> system.
>>
>> - There are two variables (e.g. IS length/OOS length vs. fast SMA/slow
>> SMA)
>> - An optimal combination is desired
>> - We use a fitness function to measure optimal (e.g. OOS:IS ratio vs.
>> CAR/MDD)
>>
>> This is how I try to satisfy your Aronson quote "Each strategy will have
>> its own best values for IS/OOS periods".
>>
>> Upon finding an optimal CAR/MDD using fast SMA/slow SMA, we should
>> theoretically be able to trade that same optimal combination of fast
>> SMA/slow SMA over different time periods and expect to get a somewhat
>> stable CAR/MDD (subject to changing market conditions).
>>
>> I would not expect combinations of fast SMA/slow SMA to be stable
>> relative to each other. Looking at a 3-D graph for this crossover system
>> will reveal peaks and valleys. Taking a single slice of that graph (i.e.
>> holding slow SMA constant and varying only fast SMA) will reveal a rising
>> and falling wave.
>>
>> So, I would expect exactly the same in the IS/OOS experiment you
>> describe. You are simply taking a slice of the 2 variable optimization
>> graph (holding IS constant and varying OOS). I would expect a rising and
>> falling wave representing the peaks and valleys that would appear on the
>> full 3-D graph.
>>
>> If I optimize the ratio of OOS:IS using IS length/OOS length, then I
>> expect to get a somewhat consistent OOS:IS ratio (subject to market
>> changes) when using that same optimal IS length/OOS length over different
>> data ranges. I don't expect to get a stable OOS:IS ratio using a fixed IS
>> length and variable OOS length.
>>
>> Mike
>>
>> --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding" <ton.sieverding@>
>> wrote:
>> >
>> > Thanks for your patience Mike -)
>> >
>> > 1. I know Pardo disagrees with Aronson. And yes I am also using Pardo's
>> > rule of thumb. But a rule of thumb without a scientific explanation is
>> > still a rule of thumb and therefore subjective. The result of this is
>> > when taking 1/8 in stead of 1/3, I am getting a completely different
>> > results. That's what Aronson tells me. So I do not understand why Pardo
>> > disagrees with Aronson ... Of course I should ask him. And I will ...
>> >
>> > 2. Here you are telling me what Aronson says : "Each strategy will have
>> > its own best values for IS/OOS periods". But trying to find the best
>> > values is empirical and therefore without having a 'good theory' why
>> > your are getting these values is highly subjective. Pardo is not giving
>> > me this good theory and Aronson tells me this good theory does not
>> > exist ...
>> >
>> > 3. With regard to our topic, it's not so important which objective
>> > function you are using for the WalkFoward. In general I use the
>> > CAR/MDD. But whatever OF gives you the same random WalkForward results.
>> > Where of course by definition you should use a return/risk related OF
>> > ...
>> >
>> > 4. The way I am analyzing the WalkForward result is simple. I am
>> > calculating the differences between the IS and OOS results in
>> > percentages from OOS. Then I am taking the average and standard
>> > deviation of all these percentages. This gives me an idea about the
>> > average IS/OOS error as well as the spread around this average. For the
>> > same AFL using the same Symbol you should do the WalkFoward in the way
>> > I mentioned in my previous email and calculate the above average/stdev
>> > relation. In order to get a stable WalkForward result being independent
>> > of the IS/OOS ratio, the average/stdev relation should be more or less
>> > stable. It's not. It's highly dependent on the IS/OOS ratio you are
>> > using ...
>> >
>> > BTW ... To get things straight, I am not throwing WalkFoward out of the
>> > window. I am just trying to believe in what I am using. And it's
>> > getting more and more difficult for me ...
>> >
>> > Regards, Ton.
>> >
>> >
>> >
>> >
>> > ----- Original Message -----
>> > From: Mike
>> > To: amibroker@xxxxxxxxxps.com
>> > Sent: Monday, October 05, 2009 11:09 AM
>> > Subject: [amibroker] Re: Is the Walk forward study useful?
>> >
>> >
>> > Ton,
>> >
>> > 1. Pardo disagrees with Aronson (and Bandy). Pardo suggests that a
>> > OOS to IS ration of 25% - 35% is best, but that a good rule of thumb
>> > for empirical testing is 1/8 to 1/3.
>> >
>> > 2. Yes, I suspect that each strategy will have its own best values
>> > for IS/OOS and that other values will appear as useless. It is up to us
>> > to try and find the best values.
>> >
>> > With respect to your comment: "I am getting results that show a
>> > random pattern", my question remains; What are you measuring? In other
>> > words, what values appear random - your fitness value? CAR? Something
>> > else?
>> >
>> > 3. I have done very much as you ask, except that I also varied my IS
>> > period. I mostly kept my ratios within Pardo's suggested 1/8 to 1/3,
>> > but went as low as 1/12 and as high as 1/2 just to be sure.
>> >
>> > For example IS=1 year, IS=2 years, IS=3 years giving
>> >
>> > IS1yr+OOS6mth, IS1yr+OOS3mth, IS1yr+OOS1mth
>> > IS2yr+OOS12mth, IS2yr+OOS6mth, IS2yr+OOS3mth
>> > IS3yr+OOS18mth, IS3yr+OOS12mth, IS3yr+OOS6mth
>> >
>> > IS2yr+OOS6mth produced the most consistent CAR, even though a
>> > weighted UPI was used as the fitness function for the actual walk
>> > forward.
>> >
>> > I do not have a strong opinion as to whether or not there really is a
>> > relationship between IS and OOS sizes. I found that Pardo's rule of
>> > thumb was as good a starting place as any. I was happy that my values
>> > (25%) coincided with what he advised. But, had my studies suggested a
>> > ratio outside of Pardo's range, I would have still gone with what my
>> > results suggested, despite Pardo's advice.
>> >
>> > Mike
>> >
>> > --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding" <ton.sieverding@>
>> > wrote:
>> > >
>> > > Hi Mike,
>> > >
>> > > What I am saying is :
>> > >
>> > > 1. That according to David Aronson "There is no theory that
>> > suggests what fraction of the data should be assigned to training (
>> > IS ) and testing ( OOS )." and that "Results can be very sensitive to
>> > these choices ... ". I assume that he knows where he is talking about
>> > ...
>> > >
>> > > 2. That when I am doing WalkFoward tests following the advice of
>> > Howard Bandy, Robert Pardo AND Van Tharp, I am getting results that
>> > show a random patron when changing the OOS en IS periods. So my
>> > conclusion is that WalkFoward is a subjective test ...
>> > >
>> > > Therefore I have serious problems using WalkFoward tests. If you
>> > can help me to get things done in an objective way then I will be
>> > delighted to know how you want to do that. But for sure Van Tharp did
>> > not help me ...
>> > >
>> > > Please do a simple WF test with OOS=1year and IS=1month...12months.
>> > So creating WF results for OOS1y+IS1m, OOS1y+IS2m etc. And see what you
>> > are getting. This is purely random. The result says nothing to me ...
>> > >
>> > > Regards, Ton.
>> > >
>> > >
>> > >
>> > > ----- Original Message -----
>> > > From: Mike
>> > > To: amibroker@xxxxxxxxxps.com
>> > > Sent: Monday, October 05, 2009 9:29 AM
>> > > Subject: [amibroker] Re: Is the Walk forward study useful?
>> > >
>> > >
>> > > Ton,
>> > >
>> > > Are you saying that you have not found an IS/OOS pair that works
>> > well? What measure are you using to judge "stability" of the walk
>> > forward process (i.e. what measure are you using to judge the process
>> > as random)?
>> > >
>> > > After testing with multiple IS periods, and with multiple OOS
>> > periods, I was able to identify "fixed" window lengths that proved more
>> > consistent than the others tested.
>> > >
>> > > I reached this conclusion by charting a distribution curve of CAR
>> > for the OOS results. My fitness function is currently based on UPI, and
>> > thus my walk forward is driven by that value. However, ultimately my
>> > interest is in how consistent CAR would be which is why I used that for
>> > evaluating the goodness of fit for the IS/OOS period lengths.
>> > >
>> > > In my case, over a 13 year period, a 2 year IS and 6 month OOS (for
>> > a total of 26 OOS data points) produced the most normal looking
>> > distribution of CAR results (i.e. central peak, smallest standard
>> > deviation). Excluding the results from all of 1999 and the first half
>> > of 2000 (during which results were abnormally strong), the distribution
>> > curve looks even better.
>> > >
>> > > Also, have you tried working with different fitness functions?
>> > Perhaps your fitness function doesn't adequately identify the "signal"
>> > and thus misguides the walk forward, regardless of IS/OOS window
>> > lengths.
>> > >
>> > > I am in the process of running a new walk forward over the last 7.5
>> > years using Van Tharp's System Quality Number (SQN) as my fitness
>> > function. I have kept the same 2 year IS/6 months OOS for a total of 15
>> > OOS data points. My system strives to generate a minimum average of 2
>> > trades per day, so each IS period generally has 1000 or more trades
>> > from which to calculate the fitness.
>> > >
>> > > It has not run to completion yet. But, for the periods that have
>> > produced results, the results look promising (at least with respect to
>> > the SQN of the OOS relative to the SQN of the IS, I have not yet
>> > created the distribution of CAR for OOS).
>> > >
>> > > Assuming that the remainder of the results are equally strong, I
>> > will walk forward further back in history to get the full 26 data
>> > points to compare against the results produced using my UPI fitness. If
>> > the CAR distribution is more normal using SQN as fitness, then I will
>> > officially start using SQN for generating optimal values for my next
>> > live OOS.
>> > >
>> > > If you are willing to share, I would be curious to hear if SQN as a
>> > fitness function was able to produce a more stable walk forward for
>> > you, and what measure you are using to judge "stable".
>> > >
>> > > Mike
>> > >
>> > > --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding"
>> > <ton.sieverding@> wrote:
>> > > >
>> > > > Hi Howard,
>> > > >
>> > > > I still am struggling with the following sentence from David
>> > Aronson : "The decision about how to apportion the data between the IS
>> > and OOS subsets is arbitrary. There is no theory that suggests what
>> > fraction of the data should be assigned to training ( IS ) and testing
>> > ( OOS ). Results can be very sensitive to these choices ... ". Because
>> > this is exactly what I am seeing. WalkFoward results are more then
>> > sensitive to the IS/OOS relation and in many cases a pure random story.
>> > I am getting more and more the feeling that WalkForward is not the
>> > correct or better objective way to test trading systems. With all
>> > respect to Robert Pardo's idea's about this topic and what you are
>> > writing in QTS ...
>> > > >
>> > > > Regards, Ton.
>> > > >
>> > > >
>> > > > ----- Original Message -----
>> > > > From: Howard B
>> > > > To: amibroker@xxxxxxxxxps.com
>> > > > Sent: Monday, October 05, 2009 12:48 AM
>> > > > Subject: Re: [amibroker] Re: Is the Walk forward study useful?
>> > > >
>> > > >
>> > > > Greetings all --
>> > > >
>> > > > My point of view on the length of the in-sample and out-of-sample
>> > may be a little different.
>> > > >
>> > > > The logic of the code has been designed to recognize some pattern
>> > or characteristic of the data. The length of the in-sample period is
>> > however long it takes to keep the model (the logic) in synchronization
>> > with the data. There is no one answer to what that length is. When the
>> > pattern changes, the model fits it less well. When the pattern changes
>> > significantly, the model must be re-synchronized. The only person who
>> > can say whether the length is correct or should be longer or shorter is
>> > the person running the tests.
>> > > >
>> > > > The length of the out-of-sample period is however long the model
>> > and the data remain in sync. That must be some length of time beyond
>> > the in-sample period in order to make profitable trades. It could be a
>> > long time, in which case there is no need to modify the model at all
>> > during that period. There is no general relationship between the length
>> > of the in-sample period and the length of the out-of-sample period --
>> > none. There is no general relationship between the performance
>> > in-sample and the performance out-of-sample. The greater the difference
>> > between the two, the better the system has been fit to the data over
>> > the in-sample period. But that does not necessarily mean that the
>> > out-of-sample results are less meaningful.
>> > > >
>> > > > You can perform some experiments to see what the best in-sample
>> > length is. And then to see what the typical out-of-sample length is.
>> > Knowing these two, set up a walk forward run using those lengths. After
>> > the run is over, ignore the in-sample results. They have no value in
>> > estimating the future performance of the system. It is the
>> > out-of-sample results that can give you some idea of how the system
>> > might act when traded with real money.
>> > > >
>> > > > It is nice to have a lot of closed traded in the out-of-sample
>> > period, but you can run statistics on as few as 5 or 6. Having fewer
>> > trades means that it will be more difficult to achieve statistical
>> > significance. The number 30 is not magic -- it is just conventional.
>> > > >
>> > > > I think it helps to distinguish between the in-sample and
>> > out-of-sample periods this way -- in-sample is seeing how well the
>> > model can be made to fit the older data, out-of-sample is seeing how
>> > well it might fit future data.
>> > > >
>> > > > Ignore the television ads where person after person exclaims
>> > "backtesting!" as though that is the key to system development. It is
>> > not. Backtesting by itself, without going on to walk forward testing,
>> > will give the trading system developer the impression that the system
>> > is good. In-sample results are always good. We do not stop fooling with
>> > the system until they are good. But in-sample results have no value in
>> > predicting future performance -- none.
>> > > >
>> > > > There are some general characteristics of trading systems that
>> > make them easier to validate. Those begin with having a positive
>> > expectancy -- no system can be profitable in the long term unless it
>> > has a positive expectancy. Then going on to include trade frequently,
>> > hold a short time, minimize losses. Of course, there have been
>> > profitable systems that trade infrequently, hold a long time, and
>> > suffer deep drawdowns. It is much harder to show that those were
>> > profitable because they were good rather than lucky.
>> > > >
>> > > > There is more information about in-sample, out-of-sample, walk
>> > forward testing, statistical validation, objective functions, and so
>> > forth in my book, "Quantitative Trading Systems."
>> > > > http://www.quantitativetradingsystems.com/
>> > > >
>> > > > Thanks for listening,
>> > > > Howard
>> > > >
>> > > >
>> > > >
>> > > > On Sun, Oct 4, 2009 at 10:56 AM, Bisto <bistoman73@> wrote:
>> > > >
>> > > >
>> > > > Yes, I believe that you should increase the IS period
>> > > >
>> > > > as general rule is not true "the shortest the best" trying to
>> > catch every market change because it's possible that a too short IS
>> > period produces a too low number of trades with no statistical
>> > robustness --> you will find parameters that are more likely candidated
>> > to fail in OS
>> > > >
>> > > > try a longer IS period and let's see what will happen
>> > > >
>> > > > I read an interesting book on this issue: "The evaluation and
>> > optimization of trading strategies" by Pardo. Maybe he repeated too
>> > much times the same concepts nevertheless I liked it
>> > > >
>> > > > if anyone could suggest a better book about this issue it would
>> > be very appreciated
>> > > >
>> > > >
>> > > >
>> > > > Bisto
>> > > >
>> > > > --- In amibroker@xxxxxxxxxps.com, "Gonzaga" <gonzagags@> wrote:
>> > > > >
>> > > > > Oh, sorry, I am lost in translation ... ;-)
>> > > > > Yes I meant trades of my IS period.
>> > > > > I've got about 70 trades in my IS period, three months.
>> > > > > BUT, I buy stocks in a multiposition way.This means, that my
>> > hole capital divides among several stocks purchased simultaneously.
>> > > > > So, in my statistics, I use to average my trades. When I use
>> > maxopenpositions=7, I use to average my results every 7 trades.
>> > > > > Considering that, my trades in three months are not 70, but
>> > less ( not exactly 70/7, but less than 70)
>> > > > >
>> > > > > If I use maxopenposition=1, which is, invest all my capital
>> > every trade, in three months I would have about 29 trades.
>> > > > > So I suppose I have to increase the IS period.. isn`t it?
>> > > > >
>> > > > >
>> > > > > --- In amibroker@xxxxxxxxxps.com, "Bisto" <bistoman73@> wrote:
>> > > > > >
>> > > > > > What do you mean with "I don't have many buyings and
>> > sellings"?
>> > > > > >
>> > > > > > If you have less than 30 trades in an IS period, IMHO, you
>> > are using a too short period due to not statistical robustness --> WFA
>> > is misleading, try a longer IS period
>> > > > > >
>> > > > > > Bisto
>> > > > > >
>> > > > > > --- In amibroker@xxxxxxxxxps.com, "Gonzaga" <gonzagags@>
>> > wrote:
>> > > > > > >
>> > > > > > > Thanks for the answers
>> > > > > > > To Keith McCombs :
>> > > > > > >
>> > > > > > > I use 3 months IS test and 1 month step, this is, 1 month
>> > OS test. My system is an end-of day-system, so I don't have many
>> > buyings and sellings..
>> > > > > > > Perhaps I should make bigger the IS period?
>> > > > > > >
>> > > > > > > anyway, my parameter behaves well in any period. Of course
>> > it is an optimized variable, but it doesn't fail in ten years, in none
>> > of those ten years, over 500 stocks.. a very long period..
>> > > > > > > So, couldn't it be better, on the long run, than the
>> > parameters optimized with the WF study?
>> > > > > > > (In fact, I am using it now, the optimized variable)
>> > > > > > > That's my real question..
>> > > > > > >
>> > > > > > > To dloyer123:
>> > > > > > > I haven't understood the meaning of the Walk Forward
>> > Efficency, and seems interesting.
>> > > > > > > can you explain it better, please..?
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > --- In amibroker@xxxxxxxxxps.com, "dloyer123" <dloyer123@>
>> > wrote:
>> > > > > > > >
>> > > > > > > > I have had similar experiences. I like to use WFT to
>> > estimate what Pardo call's his "Walk Forward Efficency", or the ratio
>> > of the out of sample WF profits to just optimizing over the entire time
>> > period.
>> > > > > > > >
>> > > > > > > > A good system should have as high a WFE as posible.
>> > Systems with a poor WFE tend to do poorly in live trading.
>> > > > > > > >
>> > > > > > > > If you have a parm set that works well over a long period
>> > of live trading, then you are doing well!
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>
>
>
>
> ------------------------------------
>
> **** 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
>
>
>
>

2.8.

Re: Is the Walk forward study useful?

Posted by: "Mike" sfclimbers@xxxxxxxxx   sfclimbers

Mon Oct 19, 2009 11:47 pm (PDT)



In "The Evaluation and Optimization of Trading Strategies", Robert Pardo describes Perfect Profit as "buying at every valley and selling at every peak".

He suggests that Correlation between Equity Curve and Perfect Profit (CECPP) "is an excellent sole evaluation measure" (i.e. fitness function).

Independant of fitness function, he further suggests that model efficiency can be measured by expressing Net Profit as a ratio of Perfect Profit; (Net Profit / Perfect Profit) * 100 with a value of 5 or greater being very good.

What you describe in your note sounds very much like his model efficiency measure.

If you simplify the idea a bit, using minimum price movements, you end up with Zig instead of Perfect Profit.

Mike

--- In amibroker@xxxxxxxxxps.com, "Steve Dugas" <sjdugas@xxx> wrote:
>
> Hi - For years I have been calculating stats for the reg line alongside
> stats for the equity curve. But lately I have been wondering about the value
> of the regression line because, in real life there are volatile periods
> where the market has more to give, and less volatile periods where there
> just isn't as much available. Would it be better to shoot for capturing a
> consistent % of what is available rather than just a consistent %? I was
> thinking about how to account for this, the best I have come up with is to
> replace the reg line with a "perfect system eq line", i.e. one that looks
> ahead to the next day and pre-positions itself so that it wins every day.
> Then scale it down to see how the system eq line fits against the "perfect
> shape". Anyone have any thoughts whether this might be a better approach?
> Thanks!
>
> Steve
>
>
> ----- Original Message -----
> From: "aarbee60" <rajbakshi@x..>
> To: <amibroker@xxxxxxxxxps.com>
> Sent: Monday, October 19, 2009 8:02 PM
> Subject: [amibroker] Re: Is the Walk forward study useful?
>
>
> > In terms of getting significantly different results by shifting IS and OOS
> > windows, could it be the result of using ObjFun like CAR/MDD where the
> > result would be different if the CAR and/or MDD changes significantly at
> > the beginning or end of the IS window. In this case, as the IS or OOS
> > window is shifted the ObjFun changes dramatically giving rise to the
> > behaviour noted in the earlier posts of this thread.
> >
> > Curtis Faith in his "Way of the Turtle" refers to this behaviour in the
> > context of designing more robust metrics. He has devised a couple of
> > metrics that make a lot of sense. RAR% (Regressed Annual Return
> > percentage) instead of CAR uses the beginning and ending values of linear
> > regression line instead of those of the equity curve.
> >
> > For example if at the beginning of the IS or OOS window, the equity curve
> > had a downturn and a significant upturn before the end of that window the
> > CAR would be significantly higher. In the same case if the Linear
> > Regression line was used, the CAR value would be less. In general, the
> > RAR% value is less sensitive to equity changes at the beginning and end of
> > the test. This is why Curtis Faith refers to it as a more Robust measure
> > of performance.
> >
> > Anyone has any views on above. Would be very interested to hear.
> >
> > Cheers
> > Raj Bakshi
> >
> > --- In amibroker@xxxxxxxxxps.com, "Mike" <sfclimbers@> wrote:
> >>
> >> Hi Ton,
> >>
> >> I agree that the rule of thumb is subjective. So far, I've been willing
> >> to live with it.
> >>
> >> It appears that you and I have different expectations of IS/OOS window
> >> sizes. I treat the calculation of walk forward window sizes as a second
> >> pass optimization, similar to a simple moving average (SMA) crossover
> >> system.
> >>
> >> - There are two variables (e.g. IS length/OOS length vs. fast SMA/slow
> >> SMA)
> >> - An optimal combination is desired
> >> - We use a fitness function to measure optimal (e.g. OOS:IS ratio vs.
> >> CAR/MDD)
> >>
> >> This is how I try to satisfy your Aronson quote "Each strategy will have
> >> its own best values for IS/OOS periods".
> >>
> >> Upon finding an optimal CAR/MDD using fast SMA/slow SMA, we should
> >> theoretically be able to trade that same optimal combination of fast
> >> SMA/slow SMA over different time periods and expect to get a somewhat
> >> stable CAR/MDD (subject to changing market conditions).
> >>
> >> I would not expect combinations of fast SMA/slow SMA to be stable
> >> relative to each other. Looking at a 3-D graph for this crossover system
> >> will reveal peaks and valleys. Taking a single slice of that graph (i.e.
> >> holding slow SMA constant and varying only fast SMA) will reveal a rising
> >> and falling wave.
> >>
> >> So, I would expect exactly the same in the IS/OOS experiment you
> >> describe. You are simply taking a slice of the 2 variable optimization
> >> graph (holding IS constant and varying OOS). I would expect a rising and
> >> falling wave representing the peaks and valleys that would appear on the
> >> full 3-D graph.
> >>
> >> If I optimize the ratio of OOS:IS using IS length/OOS length, then I
> >> expect to get a somewhat consistent OOS:IS ratio (subject to market
> >> changes) when using that same optimal IS length/OOS length over different
> >> data ranges. I don't expect to get a stable OOS:IS ratio using a fixed IS
> >> length and variable OOS length.
> >>
> >> Mike
> >>
> >> --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding" <ton.sieverding@>
> >> wrote:
> >> >
> >> > Thanks for your patience Mike -)
> >> >
> >> > 1. I know Pardo disagrees with Aronson. And yes I am also using Pardo's
> >> > rule of thumb. But a rule of thumb without a scientific explanation is
> >> > still a rule of thumb and therefore subjective. The result of this is
> >> > when taking 1/8 in stead of 1/3, I am getting a completely different
> >> > results. That's what Aronson tells me. So I do not understand why Pardo
> >> > disagrees with Aronson ... Of course I should ask him. And I will ...
> >> >
> >> > 2. Here you are telling me what Aronson says : "Each strategy will have
> >> > its own best values for IS/OOS periods". But trying to find the best
> >> > values is empirical and therefore without having a 'good theory' why
> >> > your are getting these values is highly subjective. Pardo is not giving
> >> > me this good theory and Aronson tells me this good theory does not
> >> > exist ...
> >> >
> >> > 3. With regard to our topic, it's not so important which objective
> >> > function you are using for the WalkFoward. In general I use the
> >> > CAR/MDD. But whatever OF gives you the same random WalkForward results.
> >> > Where of course by definition you should use a return/risk related OF
> >> > ...
> >> >
> >> > 4. The way I am analyzing the WalkForward result is simple. I am
> >> > calculating the differences between the IS and OOS results in
> >> > percentages from OOS. Then I am taking the average and standard
> >> > deviation of all these percentages. This gives me an idea about the
> >> > average IS/OOS error as well as the spread around this average. For the
> >> > same AFL using the same Symbol you should do the WalkFoward in the way
> >> > I mentioned in my previous email and calculate the above average/stdev
> >> > relation. In order to get a stable WalkForward result being independent
> >> > of the IS/OOS ratio, the average/stdev relation should be more or less
> >> > stable. It's not. It's highly dependent on the IS/OOS ratio you are
> >> > using ...
> >> >
> >> > BTW ... To get things straight, I am not throwing WalkFoward out of the
> >> > window. I am just trying to believe in what I am using. And it's
> >> > getting more and more difficult for me ...
> >> >
> >> > Regards, Ton.
> >> >
> >> >
> >> >
> >> >
> >> > ----- Original Message -----
> >> > From: Mike
> >> > To: amibroker@xxxxxxxxxps.com
> >> > Sent: Monday, October 05, 2009 11:09 AM
> >> > Subject: [amibroker] Re: Is the Walk forward study useful?
> >> >
> >> >
> >> > Ton,
> >> >
> >> > 1. Pardo disagrees with Aronson (and Bandy). Pardo suggests that a
> >> > OOS to IS ration of 25% - 35% is best, but that a good rule of thumb
> >> > for empirical testing is 1/8 to 1/3.
> >> >
> >> > 2. Yes, I suspect that each strategy will have its own best values
> >> > for IS/OOS and that other values will appear as useless. It is up to us
> >> > to try and find the best values.
> >> >
> >> > With respect to your comment: "I am getting results that show a
> >> > random pattern", my question remains; What are you measuring? In other
> >> > words, what values appear random - your fitness value? CAR? Something
> >> > else?
> >> >
> >> > 3. I have done very much as you ask, except that I also varied my IS
> >> > period. I mostly kept my ratios within Pardo's suggested 1/8 to 1/3,
> >> > but went as low as 1/12 and as high as 1/2 just to be sure.
> >> >
> >> > For example IS=1 year, IS=2 years, IS=3 years giving
> >> >
> >> > IS1yr+OOS6mth, IS1yr+OOS3mth, IS1yr+OOS1mth
> >> > IS2yr+OOS12mth, IS2yr+OOS6mth, IS2yr+OOS3mth
> >> > IS3yr+OOS18mth, IS3yr+OOS12mth, IS3yr+OOS6mth
> >> >
> >> > IS2yr+OOS6mth produced the most consistent CAR, even though a
> >> > weighted UPI was used as the fitness function for the actual walk
> >> > forward.
> >> >
> >> > I do not have a strong opinion as to whether or not there really is a
> >> > relationship between IS and OOS sizes. I found that Pardo's rule of
> >> > thumb was as good a starting place as any. I was happy that my values
> >> > (25%) coincided with what he advised. But, had my studies suggested a
> >> > ratio outside of Pardo's range, I would have still gone with what my
> >> > results suggested, despite Pardo's advice.
> >> >
> >> > Mike
> >> >
> >> > --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding" <ton.sieverding@>
> >> > wrote:
> >> > >
> >> > > Hi Mike,
> >> > >
> >> > > What I am saying is :
> >> > >
> >> > > 1. That according to David Aronson "There is no theory that
> >> > suggests what fraction of the data should be assigned to training (
> >> > IS ) and testing ( OOS )." and that "Results can be very sensitive to
> >> > these choices ... ". I assume that he knows where he is talking about
> >> > ...
> >> > >
> >> > > 2. That when I am doing WalkFoward tests following the advice of
> >> > Howard Bandy, Robert Pardo AND Van Tharp, I am getting results that
> >> > show a random patron when changing the OOS en IS periods. So my
> >> > conclusion is that WalkFoward is a subjective test ...
> >> > >
> >> > > Therefore I have serious problems using WalkFoward tests. If you
> >> > can help me to get things done in an objective way then I will be
> >> > delighted to know how you want to do that. But for sure Van Tharp did
> >> > not help me ...
> >> > >
> >> > > Please do a simple WF test with OOS=1year and IS=1month...12months.
> >> > So creating WF results for OOS1y+IS1m, OOS1y+IS2m etc. And see what you
> >> > are getting. This is purely random. The result says nothing to me ...
> >> > >
> >> > > Regards, Ton.
> >> > >
> >> > >
> >> > >
> >> > > ----- Original Message -----
> >> > > From: Mike
> >> > > To: amibroker@xxxxxxxxxps.com
> >> > > Sent: Monday, October 05, 2009 9:29 AM
> >> > > Subject: [amibroker] Re: Is the Walk forward study useful?
> >> > >
> >> > >
> >> > > Ton,
> >> > >
> >> > > Are you saying that you have not found an IS/OOS pair that works
> >> > well? What measure are you using to judge "stability" of the walk
> >> > forward process (i.e. what measure are you using to judge the process
> >> > as random)?
> >> > >
> >> > > After testing with multiple IS periods, and with multiple OOS
> >> > periods, I was able to identify "fixed" window lengths that proved more
> >> > consistent than the others tested.
> >> > >
> >> > > I reached this conclusion by charting a distribution curve of CAR
> >> > for the OOS results. My fitness function is currently based on UPI, and
> >> > thus my walk forward is driven by that value. However, ultimately my
> >> > interest is in how consistent CAR would be which is why I used that for
> >> > evaluating the goodness of fit for the IS/OOS period lengths.
> >> > >
> >> > > In my case, over a 13 year period, a 2 year IS and 6 month OOS (for
> >> > a total of 26 OOS data points) produced the most normal looking
> >> > distribution of CAR results (i.e. central peak, smallest standard
> >> > deviation). Excluding the results from all of 1999 and the first half
> >> > of 2000 (during which results were abnormally strong), the distribution
> >> > curve looks even better.
> >> > >
> >> > > Also, have you tried working with different fitness functions?
> >> > Perhaps your fitness function doesn't adequately identify the "signal"
> >> > and thus misguides the walk forward, regardless of IS/OOS window
> >> > lengths.
> >> > >
> >> > > I am in the process of running a new walk forward over the last 7.5
> >> > years using Van Tharp's System Quality Number (SQN) as my fitness
> >> > function. I have kept the same 2 year IS/6 months OOS for a total of 15
> >> > OOS data points. My system strives to generate a minimum average of 2
> >> > trades per day, so each IS period generally has 1000 or more trades
> >> > from which to calculate the fitness.
> >> > >
> >> > > It has not run to completion yet. But, for the periods that have
> >> > produced results, the results look promising (at least with respect to
> >> > the SQN of the OOS relative to the SQN of the IS, I have not yet
> >> > created the distribution of CAR for OOS).
> >> > >
> >> > > Assuming that the remainder of the results are equally strong, I
> >> > will walk forward further back in history to get the full 26 data
> >> > points to compare against the results produced using my UPI fitness. If
> >> > the CAR distribution is more normal using SQN as fitness, then I will
> >> > officially start using SQN for generating optimal values for my next
> >> > live OOS.
> >> > >
> >> > > If you are willing to share, I would be curious to hear if SQN as a
> >> > fitness function was able to produce a more stable walk forward for
> >> > you, and what measure you are using to judge "stable".
> >> > >
> >> > > Mike
> >> > >
> >> > > --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding"
> >> > <ton.sieverding@> wrote:
> >> > > >
> >> > > > Hi Howard,
> >> > > >
> >> > > > I still am struggling with the following sentence from David
> >> > Aronson : "The decision about how to apportion the data between the IS
> >> > and OOS subsets is arbitrary. There is no theory that suggests what
> >> > fraction of the data should be assigned to training ( IS ) and testing
> >> > ( OOS ). Results can be very sensitive to these choices ... ". Because
> >> > this is exactly what I am seeing. WalkFoward results are more then
> >> > sensitive to the IS/OOS relation and in many cases a pure random story.
> >> > I am getting more and more the feeling that WalkForward is not the
> >> > correct or better objective way to test trading systems. With all
> >> > respect to Robert Pardo's idea's about this topic and what you are
> >> > writing in QTS ...
> >> > > >
> >> > > > Regards, Ton.
> >> > > >
> >> > > >
> >> > > > ----- Original Message -----
> >> > > > From: Howard B
> >> > > > To: amibroker@xxxxxxxxxps.com
> >> > > > Sent: Monday, October 05, 2009 12:48 AM
> >> > > > Subject: Re: [amibroker] Re: Is the Walk forward study useful?
> >> > > >
> >> > > >
> >> > > > Greetings all --
> >> > > >
> >> > > > My point of view on the length of the in-sample and out-of-sample
> >> > may be a little different.
> >> > > >
> >> > > > The logic of the code has been designed to recognize some pattern
> >> > or characteristic of the data. The length of the in-sample period is
> >> > however long it takes to keep the model (the logic) in synchronization
> >> > with the data. There is no one answer to what that length is. When the
> >> > pattern changes, the model fits it less well. When the pattern changes
> >> > significantly, the model must be re-synchronized. The only person who
> >> > can say whether the length is correct or should be longer or shorter is
> >> > the person running the tests.
> >> > > >
> >> > > > The length of the out-of-sample period is however long the model
> >> > and the data remain in sync. That must be some length of time beyond
> >> > the in-sample period in order to make profitable trades. It could be a
> >> > long time, in which case there is no need to modify the model at all
> >> > during that period. There is no general relationship between the length
> >> > of the in-sample period and the length of the out-of-sample period --
> >> > none. There is no general relationship between the performance
> >> > in-sample and the performance out-of-sample. The greater the difference
> >> > between the two, the better the system has been fit to the data over
> >> > the in-sample period. But that does not necessarily mean that the
> >> > out-of-sample results are less meaningful.
> >> > > >
> >> > > > You can perform some experiments to see what the best in-sample
> >> > length is. And then to see what the typical out-of-sample length is.
> >> > Knowing these two, set up a walk forward run using those lengths. After
> >> > the run is over, ignore the in-sample results. They have no value in
> >> > estimating the future performance of the system. It is the
> >> > out-of-sample results that can give you some idea of how the system
> >> > might act when traded with real money.
> >> > > >
> >> > > > It is nice to have a lot of closed traded in the out-of-sample
> >> > period, but you can run statistics on as few as 5 or 6. Having fewer
> >> > trades means that it will be more difficult to achieve statistical
> >> > significance. The number 30 is not magic -- it is just conventional.
> >> > > >
> >> > > > I think it helps to distinguish between the in-sample and
> >> > out-of-sample periods this way -- in-sample is seeing how well the
> >> > model can be made to fit the older data, out-of-sample is seeing how
> >> > well it might fit future data.
> >> > > >
> >> > > > Ignore the television ads where person after person exclaims
> >> > "backtesting!" as though that is the key to system development. It is
> >> > not. Backtesting by itself, without going on to walk forward testing,
> >> > will give the trading system developer the impression that the system
> >> > is good. In-sample results are always good. We do not stop fooling with
> >> > the system until they are good. But in-sample results have no value in
> >> > predicting future performance -- none.
> >> > > >
> >> > > > There are some general characteristics of trading systems that
> >> > make them easier to validate. Those begin with having a positive
> >> > expectancy -- no system can be profitable in the long term unless it
> >> > has a positive expectancy. Then going on to include trade frequently,
> >> > hold a short time, minimize losses. Of course, there have been
> >> > profitable systems that trade infrequently, hold a long time, and
> >> > suffer deep drawdowns. It is much harder to show that those were
> >> > profitable because they were good rather than lucky.
> >> > > >
> >> > > > There is more information about in-sample, out-of-sample, walk
> >> > forward testing, statistical validation, objective functions, and so
> >> > forth in my book, "Quantitative Trading Systems."
> >> > > > http://www.quantitativetradingsystems.com/
> >> > > >
> >> > > > Thanks for listening,
> >> > > > Howard
> >> > > >
> >> > > >
> >> > > >
> >> > > > On Sun, Oct 4, 2009 at 10:56 AM, Bisto <bistoman73@> wrote:
> >> > > >
> >> > > >
> >> > > > Yes, I believe that you should increase the IS period
> >> > > >
> >> > > > as general rule is not true "the shortest the best" trying to
> >> > catch every market change because it's possible that a too short IS
> >> > period produces a too low number of trades with no statistical
> >> > robustness --> you will find parameters that are more likely candidated
> >> > to fail in OS
> >> > > >
> >> > > > try a longer IS period and let's see what will happen
> >> > > >
> >> > > > I read an interesting book on this issue: "The evaluation and
> >> > optimization of trading strategies" by Pardo. Maybe he repeated too
> >> > much times the same concepts nevertheless I liked it
> >> > > >
> >> > > > if anyone could suggest a better book about this issue it would
> >> > be very appreciated
> >> > > >
> >> > > >
> >> > > >
> >> > > > Bisto
> >> > > >
> >> > > > --- In amibroker@xxxxxxxxxps.com, "Gonzaga" <gonzagags@> wrote:
> >> > > > >
> >> > > > > Oh, sorry, I am lost in translation ... ;-)
> >> > > > > Yes I meant trades of my IS period.
> >> > > > > I've got about 70 trades in my IS period, three months.
> >> > > > > BUT, I buy stocks in a multiposition way.This means, that my
> >> > hole capital divides among several stocks purchased simultaneously.
> >> > > > > So, in my statistics, I use to average my trades. When I use
> >> > maxopenpositions=7, I use to average my results every 7 trades.
> >> > > > > Considering that, my trades in three months are not 70, but
> >> > less ( not exactly 70/7, but less than 70)
> >> > > > >
> >> > > > > If I use maxopenposition=1, which is, invest all my capital
> >> > every trade, in three months I would have about 29 trades.
> >> > > > > So I suppose I have to increase the IS period.. isn`t it?
> >> > > > >
> >> > > > >
> >> > > > > --- In amibroker@xxxxxxxxxps.com, "Bisto" <bistoman73@> wrote:
> >> > > > > >
> >> > > > > > What do you mean with "I don't have many buyings and
> >> > sellings"?
> >> > > > > >
> >> > > > > > If you have less than 30 trades in an IS period, IMHO, you
> >> > are using a too short period due to not statistical robustness --> WFA
> >> > is misleading, try a longer IS period
> >> > > > > >
> >> > > > > > Bisto
> >> > > > > >
> >> > > > > > --- In amibroker@xxxxxxxxxps.com, "Gonzaga" <gonzagags@>
> >> > wrote:
> >> > > > > > >
> >> > > > > > > Thanks for the answers
> >> > > > > > > To Keith McCombs :
> >> > > > > > >
> >> > > > > > > I use 3 months IS test and 1 month step, this is, 1 month
> >> > OS test. My system is an end-of day-system, so I don't have many
> >> > buyings and sellings..
> >> > > > > > > Perhaps I should make bigger the IS period?
> >> > > > > > >
> >> > > > > > > anyway, my parameter behaves well in any period. Of course
> >> > it is an optimized variable, but it doesn't fail in ten years, in none
> >> > of those ten years, over 500 stocks.. a very long period..
> >> > > > > > > So, couldn't it be better, on the long run, than the
> >> > parameters optimized with the WF study?
> >> > > > > > > (In fact, I am using it now, the optimized variable)
> >> > > > > > > That's my real question..
> >> > > > > > >
> >> > > > > > > To dloyer123:
> >> > > > > > > I haven't understood the meaning of the Walk Forward
> >> > Efficency, and seems interesting.
> >> > > > > > > can you explain it better, please.?
> >> > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > > > --- In amibroker@xxxxxxxxxps.com, "dloyer123" <dloyer123@>
> >> > wrote:
> >> > > > > > > >
> >> > > > > > > > I have had similar experiences. I like to use WFT to
> >> > estimate what Pardo call's his "Walk Forward Efficency", or the ratio
> >> > of the out of sample WF profits to just optimizing over the entire time
> >> > period.
> >> > > > > > > >
> >> > > > > > > > A good system should have as high a WFE as posible.
> >> > Systems with a poor WFE tend to do poorly in live trading.
> >> > > > > > > >
> >> > > > > > > > If you have a parm set that works well over a long period
> >> > of live trading, then you are doing well!
> >> > > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > **** 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
> >
> >
> >
> >
>

3a.

Re: MA cross with %filter

Posted by: "Steve Dugas" sjdugas@xxxxxxxxxxx   djs44us

Mon Oct 19, 2009 11:05 am (PDT)



Hi - Close, it is Exrem that removes all signals until opposite signal is
generated. Flip, after a True, will continue to return True until it comes
to a True in the 2nd array. I think it is convenient to look at it as Signal
( buy, sell, use Exrem ) vs. State ( in long, in short, use Flip ) In your
case, if you have 2 arrays...

1101101111000000111 // in buy zone, occasionally drops into neutral
territory
0000000000111111000 // in sell zone

then after doing
InLong = Flip( InBuyZone, InSellZone );
you will have

1101101111000000111 // in buy zone
0000000000111111000 // in sell zone
1111111111000000111 // in long, here is the filter you wanted I think?

----- Original Message -----
From: "levibreidenbach" <levib1@xxxxxxxxnet>
To: <amibroker@xxxxxxxxxps.com>
Sent: Monday, October 19, 2009 11:15 AM
Subject: [amibroker] Re: MA cross with %filter

> Hello:
>
> I'm still having difficulty understanding both the flip() and exrem()
> function. Can somebody help to explain them. I've read documentation,
> but it is fairly brief.
>
> Does flip remove all signals until a opposite signal is generated? Not
> sure if I'm understanding it.
>
> Thanks
>
> Levi
>
> --- In amibroker@xxxxxxxxxps.com, "levibreidenbach" <levib1@xxx> wrote:
>>
>> Hello:
>>
>> Fairly new to Amibroker with a question regarding MA crossover. This is
>> probably very simple to code, but I can't seem to wrap my head around it.
>> I would like to have a filter that I include with buy logic as follows:
>> Using S&P500 data, whenever price moves above 65 week moving average by
>> 1%, filter = 1. Whenever price moves below MA by 1% filter = 0.
>>
>> The part I'm getting hung up on is what happens in between filter. Say
>> price trends down from buy zone (1.01*65 week MA), but doesn't close
>> below sell zone (.99*65 week MA). Then price comes back up above 1% buy
>> filter. During this period, the filter should always = 1. But if it
>> crosses 1% sell filter, it should become 0 until it crosses above 1% buy
>> filter.
>>
>> I think I'm making this much more confusing than it needs to be. I'm
>> sure there is a very simple way to program this - that's what I'm looking
>> for.
>>
>> Thanks ahead of time,
>>
>> Levi
>>
>
>
>
>
> ------------------------------------
>
> **** 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
>
>
>
>

4a.

Re: Some Yahoo tickers fail to download data

Posted by: "TomB" directaim@xxxxxxxxx   directaim

Mon Oct 19, 2009 12:54 pm (PDT)



Richard, thanks for your comments.

I was saying
MSN has historical
but only to the prior day
but not the current day
so could be used for backtesting
but not for entry signals.

I am using a seperate .tls file
for MSN
which updates the previous Yahoo data
to the prior day.
I am not using a ticker transaltion table.

My over 200 tickers
which last week ceased updating in Yahoo
do now again update with Yahoo "current".

--- In amibroker@xxxxxxxxxps.com, "Richard" <areehoi@xxx> wrote:
>
> Tom,
> You need to go to the Yahoo site and look at the specific security that's not getting updated. To check, go to "historical" file and if data doesn't appear you will not get historical data. You can update such stocks daily using "current" instead if EOD. To get historical try MSN and/or Google. They have historical data in many instances so download accordingly and then update daily with Yahoo current. MSM dosn't have as many stocks available as Yahoo. I hope this helps.
> I use a combination or "EODDATA.com" and Yahoo with very few problems.
>
> Dick H.
> --- In amibroker@xxxxxxxxxps.com, "TomB" <directaim@> wrote:
> >
> >
> >
> >
> >
> >
> > MSN
> > does do a daily historical update
> > [to the prior day]
> > of all my tickers eliminated by Yahoo
> > which could be used for backtesting.
> >
>

4b.

Re: Some Yahoo tickers fail to download data

Posted by: "TomB" directaim@xxxxxxxxx   directaim

Mon Oct 19, 2009 1:00 pm (PDT)



Evelyn

Im not familiar with DJX
but Yahoo does offer ^DJI.

--- In amibroker@xxxxxxxxxps.com, "Evelyn" <ebroom2@xxx> wrote:
>
> I am also experiencing the same issue.
>
> I have never been able to get the DJX, and now, I cannot download data for QQQQ. I have tried Yahoo, Google and MSN with Amiquote and it says the data downloaded, but there is a blank chart.
>
> I recently had to re-install Amibroker and downloaded all the stocks again and updated with no problem, but for some reason, there are some missing tickers.
>
>
>
>
> --- In amibroker@xxxxxxxxxps.com, "Richard" <richpach2@> wrote:
> >
> > Hi rick,
> >
> > I experienced the same problem (since Wednesday) on ASX Yahoo data. Some thickers work some (large percentage) don't.
> > I get an error during download 404 Not Found. Either the symbol is incorrect or there is a problem with the data vendor's site.
> >
> > Regards
> > Richard
> >
> > --- In amibroker@xxxxxxxxxps.com, Rick Osborn <ricko@> wrote:
> > >
> > > they work fine for me
> > >
> > > Best Regards
> > > Rick Osborn
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: TomB <directaim@>
> > > To: amibroker@xxxxxxxxxps.com
> > > Sent: Thu, October 15, 2009 12:48:21 PM
> > > Subject: [amibroker] Some Yahoo tickers fail to download data
> > >
> > >
> > > After 10/9/09,
> > > in AmiQuote,
> > > Yahoo data
> > > for over 200 tickers of my universe
> > > no longer downloads.
> > >
> > > All others continue to download.
> > >
> > > Have others experienced this cutoff?
> > >
> > > Thanks,
> > > DirectAim
> > >
> > > Examples of failed tickers:
> > >
> > > AAWW
> > > ABAX
> > > ABM
> > > ACIW
> > > ACL
> > > AFAM
> > > ALE
> > > ALJ
> > > ALKS
> > > ALNY
> > > AMSG
> > > AOS
> > > APA
> > > APEI
> > > APOG
> > > ARB
> > > ASF
> > > ASTE
> > > ATMI
> > > ATR
> > > AVAV
> > > AZZ
> > >
> >
>

4c.

Re: Some Yahoo tickers fail to download data

Posted by: "Richard" areehoi@xxxxxxxxx   areehoi

Tue Oct 20, 2009 7:45 am (PDT)



Evelyn,
In that ^DJX (Yahoo) doesn't show historical data you'll have to find another source. As a starter here's EOD data (free ... for full data you'll have to purchase see"EODDATA.Com). Then update daily with "current".

Dick H

Date Open High Low Close Volume Open Interest
10/19/09 100.0 101.2 100.0 100.9 0 0
10/16/09 100.6 100.6 99.4 100.0 0 0
10/15/09 100.2 100.6 99.8 100.6 0 0
10/14/09 98.7 100.3 98.7 100.2 0 0
10/13/09 98.8 99.0 98.2 98.7 0 0
10/12/09 98.7 99.3 98.5 98.9 0 0
10/09/09 97.9 98.7 97.7 98.7 0 0
10/08/09 97.3 98.4 97.3 97.9 0 0
10/07/09 97.3 97.4 96.8 97.3 0 0
10/06/09 96.0 97.7 96.0 97.3 0 0
10/05/09 94.9 96.3 94.8 96.0 0 0
10/02/09 95.1 95.3 94.3 94.9 0 0
10/01/09 97.1 97.1 95.0 95.1 0 0
09/30/09 97.4 97.8 96.1 97.1 0 0
09/29/09 97.9 98.3 97.4 97.4 0 0
09/28/09 96.6 98.2 96.6 97.9 0 0
09/25/09 97.1 97.4 96.4 96.7 0 0
09/24/09 97.5 98.1 96.7 97.1 0 0
09/23/09 98.3 99.2 97.4 97.5 0 0
09/22/09 97.8 98.4 97.7 98.3 0

--- In amibroker@xxxxxxxxxps.com, "Evelyn" <ebroom2@xxx> wrote:
>
>
> Thank you for responding. I tried ^DJX, DJX and $DJX....Yahoo uses ^DJX, but I get "Error during download. Yahoo - 404 not found....etc.
> And, as you said, Yahoo shows that there is no historical data for DJX.
>
> I tried Google and MSN, but I get the same error message. I guess I won't be able to get DJX with any of the data providers, but there are many other things to trade, so I will stop trying to force something that isn't going to happen!
>
>
> --- In amibroker@xxxxxxxxxps.com, "Richard" <areehoi@> wrote:
> >
> > I looked up ^DJX and it doesn't show historical data so try MSN or Google ... but remember use $ or other marker before DJX like Yajoo uses a "^". On QQQQ Yahoo shows historical data back to 1999. Hope this helps
> >
> > --- In amibroker@xxxxxxxxxps.com, "Evelyn" <ebroom2@> wrote:
> > >
> > > I am also experiencing the same issue.
> > >
> > > I have never been able to get the DJX, and now, I cannot download data for QQQQ. I have tried Yahoo, Google and MSN with Amiquote and it says the data downloaded, but there is a blank chart.
> > >
> > > I recently had to re-install Amibroker and downloaded all the stocks again and updated with no problem, but for some reason, there are some missing tickers.
> > >
> > >
> > >
> > >
> > > --- In amibroker@xxxxxxxxxps.com, "Richard" <richpach2@> wrote:
> > > >
> > > > Hi rick,
> > > >
> > > > I experienced the same problem (since Wednesday) on ASX Yahoo data. Some thickers work some (large percentage) don't.
> > > > I get an error during download 404 Not Found. Either the symbol is incorrect or there is a problem with the data vendor's site.
> > > >
> > > > Regards
> > > > Richard
> > > >
> > > > --- In amibroker@xxxxxxxxxps.com, Rick Osborn <ricko@> wrote:
> > > > >
> > > > > they work fine for me
> > > > >
> > > > > Best Regards
> > > > > Rick Osborn
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: TomB <directaim@>
> > > > > To: amibroker@xxxxxxxxxps.com
> > > > > Sent: Thu, October 15, 2009 12:48:21 PM
> > > > > Subject: [amibroker] Some Yahoo tickers fail to download data
> > > > >
> > > > >
> > > > > After 10/9/09,
> > > > > in AmiQuote,
> > > > > Yahoo data
> > > > > for over 200 tickers of my universe
> > > > > no longer downloads.
> > > > >
> > > > > All others continue to download.
> > > > >
> > > > > Have others experienced this cutoff?
> > > > >
> > > > > Thanks,
> > > > > DirectAim
> > > > >
> > > > > Examples of failed tickers:
> > > > >
> > > > > AAWW
> > > > > ABAX
> > > > > ABM
> > > > > ACIW
> > > > > ACL
> > > > > AFAM
> > > > > ALE
> > > > > ALJ
> > > > > ALKS
> > > > > ALNY
> > > > > AMSG
> > > > > AOS
> > > > > APA
> > > > > APEI
> > > > > APOG
> > > > > ARB
> > > > > ASF
> > > > > ASTE
> > > > > ATMI
> > > > > ATR
> > > > > AVAV
> > > > > AZZ
> > > > >
> > > >
> > >
> >
>

4d.

Re: Some Yahoo tickers fail to download data

Posted by: "J Paul Buffon" jbuffon1@xxxxxxxxx   jbuffon1@xxxxxxxxx

Tue Oct 20, 2009 7:52 am (PDT)



Curious why are you selecting eoddata

Thanks

Jean Paul

From: amibroker@xxxxxxxxxps.com [mailto:amibroker@xxxxxxxxxps.com] On Behalf
Of Richard
Sent: 10/20/2009 10:45 AM
To: amibroker@xxxxxxxxxps.com
Subject: [amibroker] Re: Some Yahoo tickers fail to download data

Evelyn,
In that ^DJX (Yahoo) doesn't show historical data you'll have to find
another source. As a starter here's EOD data (free ... for full data you'll
have to purchase see"EODDATA.Com). Then update daily with "current".

Dick H

Date Open High Low Close Volume Open Interest
10/19/09 100.0 101.2 100.0 100.9 0 0
10/16/09 100.6 100.6 99.4 100.0 0 0
10/15/09 100.2 100.6 99.8 100.6 0 0
10/14/09 98.7 100.3 98.7 100.2 0 0
10/13/09 98.8 99.0 98.2 98.7 0 0
10/12/09 98.7 99.3 98.5 98.9 0 0
10/09/09 97.9 98.7 97.7 98.7 0 0
10/08/09 97.3 98.4 97.3 97.9 0 0
10/07/09 97.3 97.4 96.8 97.3 0 0
10/06/09 96.0 97.7 96.0 97.3 0 0
10/05/09 94.9 96.3 94.8 96.0 0 0
10/02/09 95.1 95.3 94.3 94.9 0 0
10/01/09 97.1 97.1 95.0 95.1 0 0
09/30/09 97.4 97.8 96.1 97.1 0 0
09/29/09 97.9 98.3 97.4 97.4 0 0
09/28/09 96.6 98.2 96.6 97.9 0 0
09/25/09 97.1 97.4 96.4 96.7 0 0
09/24/09 97.5 98.1 96.7 97.1 0 0
09/23/09 98.3 99.2 97.4 97.5 0 0
09/22/09 97.8 98.4 97.7 98.3 0

--- In amibroker@xxxxxxxxxps.com <mailto:amibroker%40yahoogroups.com> ,
"Evelyn" <ebroom2@xxx> wrote:
>
>
> Thank you for responding. I tried ^DJX, DJX and $DJX....Yahoo uses ^DJX,
but I get "Error during download. Yahoo - 404 not found....etc.
> And, as you said, Yahoo shows that there is no historical data for DJX.
>
> I tried Google and MSN, but I get the same error message. I guess I won't
be able to get DJX with any of the data providers, but there are many other
things to trade, so I will stop trying to force something that isn't going
to happen!
>
>
> --- In amibroker@xxxxxxxxxps.com <mailto:amibroker%40yahoogroups.com> ,
"Richard" <areehoi@> wrote:
> >
> > I looked up ^DJX and it doesn't show historical data so try MSN or
Google ... but remember use $ or other marker before DJX like Yajoo uses a
"^". On QQQQ Yahoo shows historical data back to 1999. Hope this helps
> >
> > --- In amibroker@xxxxxxxxxps.com <mailto:amibroker%40yahoogroups.com> ,
"Evelyn" <ebroom2@> wrote:
> > >
> > > I am also experiencing the same issue.
> > >
> > > I have never been able to get the DJX, and now, I cannot download data
for QQQQ. I have tried Yahoo, Google and MSN with Amiquote and it says the
data downloaded, but there is a blank chart.
> > >
> > > I recently had to re-install Amibroker and downloaded all the stocks
again and updated with no problem, but for some reason, there are some
missing tickers.
> > >
> > >
> > >
> > >
> > > --- In amibroker@xxxxxxxxxps.com <mailto:amibroker%40yahoogroups.com>
, "Richard" <richpach2@> wrote:
> > > >
> > > > Hi rick,
> > > >
> > > > I experienced the same problem (since Wednesday) on ASX Yahoo data.
Some thickers work some (large percentage) don't.
> > > > I get an error during download 404 Not Found. Either the symbol is
incorrect or there is a problem with the data vendor's site.
> > > >
> > > > Regards
> > > > Richard
> > > >
> > > > --- In amibroker@xxxxxxxxxps.com
<mailto:amibroker%40yahoogroups.com> , Rick Osborn <ricko@> wrote:
> > > > >
> > > > > they work fine for me
> > > > >
> > > > > Best Regards
> > > > > Rick Osborn
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: TomB <directaim@>
> > > > > To: amibroker@xxxxxxxxxps.com <mailto:amibroker%40yahoogroups.com>

> > > > > Sent: Thu, October 15, 2009 12:48:21 PM
> > > > > Subject: [amibroker] Some Yahoo tickers fail to download data
> > > > >
> > > > >
> > > > > After 10/9/09,
> > > > > in AmiQuote,
> > > > > Yahoo data
> > > > > for over 200 tickers of my universe
> > > > > no longer downloads.
> > > > >
> > > > > All others continue to download.
> > > > >
> > > > > Have others experienced this cutoff?
> > > > >
> > > > > Thanks,
> > > > > DirectAim
> > > > >
> > > > > Examples of failed tickers:
> > > > >
> > > > > AAWW
> > > > > ABAX
> > > > > ABM
> > > > > ACIW
> > > > > ACL
> > > > > AFAM
> > > > > ALE
> > > > > ALJ
> > > > > ALKS
> > > > > ALNY
> > > > > AMSG
> > > > > AOS
> > > > > APA
> > > > > APEI
> > > > > APOG
> > > > > ARB
> > > > > ASF
> > > > > ASTE
> > > > > ATMI
> > > > > ATR
> > > > > AVAV
> > > > > AZZ
> > > > >
> > > >
> > >
> >
>

5a.

AmiBroker 5.2 & AmiQuote from USB drive

Posted by: "jamesfarrow2003" jamesfarrow2003@xxxxxxxxx   jamesfarrow2003

Mon Oct 19, 2009 1:35 pm (PDT)



I just upgraded to v5.2, and it seems like the option under tools for updating quotes has disappeared.

Is this by design, or is something set up wrong on my version?

I am running from and external drive for portability, but the drive does not always get assigned the same letter. When the letter is different, than it was during installation, launching AmiQuote from AmiBroker seemed to connect everything OK. (using v5.1)

Now (using v5.2), I have to open AmiQuote from the drive, and AmiQuote reports that AmiBroker needs to be re-installed... however if I take it to a PC where it gets assigned the drive letter that was used during installation, I am able to open AmiQuote independently and everything is OK.

Anyone else have an issue like this?

Thanks,

James

5b.

Re: AmiBroker 5.2 & AmiQuote from USB drive

Posted by: "Tomasz Janeczko" groups@xxxxxxxxxxxxx   amibroker

Mon Oct 19, 2009 2:33 pm (PDT)



Hello,

When upgrading you should NOT uninstall previous version.
If you did that, you need to run full install
http://www.amibroker.com/bin/AmiBroker520.exe

Of course when you run from portable drive YOU MUST ensure that it
gets assigned THE SAME letter. It can be EASILY done on Windows XP.

Just use Windows Control Panel, "Administrative Tools", Computer Management, then
"Disk Management", there you will see all disks, now click on the disk and
select "Change drive letter", use some unused letter like "Z".
Once you do, it will use permanent assignment.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "jamesfarrow2003" <jamesfarrow2003@yahoo.com>
To: <amibroker@xxxxxxxxxps.com>
Sent: Monday, October 19, 2009 10:32 PM
Subject: [amibroker] AmiBroker 5.2 & AmiQuote from USB drive

>I just upgraded to v5.2, and it seems like the option under tools for updating quotes has disappeared.
>
> Is this by design, or is something set up wrong on my version?
>
> I am running from and external drive for portability, but the drive does not always get assigned the same letter. When the letter
> is different, than it was during installation, launching AmiQuote from AmiBroker seemed to connect everything OK. (using v5.1)
>
> Now (using v5.2), I have to open AmiQuote from the drive, and AmiQuote reports that AmiBroker needs to be re-installed... however
> if I take it to a PC where it gets assigned the drive letter that was used during installation, I am able to open AmiQuote
> independently and everything is OK.
>
> Anyone else have an issue like this?
>
> Thanks,
>
> James
>
>
>
> ------------------------------------
>
> **** 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
>
>
>

6a.

Re: Making and Index representative of the cash position in a system

Posted by: "Mike" sfclimbers@xxxxxxxxx   sfclimbers

Mon Oct 19, 2009 4:21 pm (PDT)



You could almost certainly do this using custom backtester code.

e.g.
- Start your script by taking a 100 investment in SPY.
- Add Buy/Sell logic for your watchlist symbols
- Write low level custom backtest code that generates a Sell order equivalent in size to every Buy signal, and a Buy order equivalent in size to every Sell signal.

It's actually somewhat more complicated since you would have to do all the checking to see if the buy/sell signals would actually result in trades with respect to sufficient funds, max positions, etc. before manually taking the associated sell/buy of SPY.

You might choose instead to fake out the backtester by adding the equivalent value of SPY position to bo.Cash, let the backtester do its thing, then reduce/increas SPY holdings in light of the trades performed. You would then have to reset the bo.Cash back to zero.

In any event, read the custom backtester document in the Files section of this group.

Mike

--- In amibroker@xxxxxxxxxps.com, "orionsturtle" <orionsturtle@...> wrote:
>
> I want to have the system I'm developing go into an index by default instead of cash.
> So whenever I get a sell in the portfolio in a watchlist of a stock it goes into SPY instead of cash. Positionsize of stocks would be set to 20% of the total portfolio, but the SPY position size could be at times 100% of the portfolio just like cash can by default.
>
> Would anyone know how to do this?
>
> Thank you!
>

6b.

Re: Making and Index representative of the cash position in a system

Posted by: "Mike" orionsturtle@xxxxxxxxx   orionsturtle

Tue Oct 20, 2009 6:52 am (PDT)



Thanks Mike.
I am looking into the Custom BT stuff but it's slow going for me since I am not a very accomplished programmer. I like your latter Idea of faking out the BT, I will see if I can do that.
Thanks again!

--- In amibroker@xxxxxxxxxps.com, "Mike" <sfclimbers@...> wrote:
>
> You could almost certainly do this using custom backtester code.
>
> e.g.
> - Start your script by taking a 100 investment in SPY.
> - Add Buy/Sell logic for your watchlist symbols
> - Write low level custom backtest code that generates a Sell order equivalent in size to every Buy signal, and a Buy order equivalent in size to every Sell signal.
>
> It's actually somewhat more complicated since you would have to do all the checking to see if the buy/sell signals would actually result in trades with respect to sufficient funds, max positions, etc. before manually taking the associated sell/buy of SPY.
>
> You might choose instead to fake out the backtester by adding the equivalent value of SPY position to bo.Cash, let the backtester do its thing, then reduce/increas SPY holdings in light of the trades performed. You would then have to reset the bo.Cash back to zero.
>
> In any event, read the custom backtester document in the Files section of this group.
>
> Mike
>
> --- In amibroker@xxxxxxxxxps.com, "orionsturtle" <orionsturtle@> wrote:
> >
> > I want to have the system I'm developing go into an index by default instead of cash.
> > So whenever I get a sell in the portfolio in a watchlist of a stock it goes into SPY instead of cash. Positionsize of stocks would be set to 20% of the total portfolio, but the SPY position size could be at times 100% of the portfolio just like cash can by default.
> >
> > Would anyone know how to do this?
> >
> > Thank you!
> >
>

7a.

Re: Difference between templates and layouts

Posted by: "Keith McCombs" kmccombs@xxxxxxxxxxxx   keithmccombs

Mon Oct 19, 2009 11:59 pm (PDT)



Having some problems rapping my brain around Chart Templates. Some of
those problems are:
1. When I save a template, it only saves as a .aly or .chart file. I
can't figure out how to save a .act file.

2. When I open a .aly or .chart file I see many 'sheets' listed. I
have always thought of each sheet as being a window. But now it looks
like that was wrong. So then, what is a 'window'?

3. I've always used used different Layouts, and thought I knew what
they were. But now with Templates? If I open a .awl file and a .aly
file, they the look same to me.

4. How are Layouts and Templates related? If a Layout can contain more
than one Template, how do I know which Template I am viewing?

Please help me get my brain back.
-- Keith

Tomasz Janeczko wrote:
>
>
> Template - ONE chart window
> Layout - ALL chart windows.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: <p_heroux@xxxxxxxcom <mailto:p_heroux%40rogers.com>>
> To: <amibroker@xxxxxxxxxps.com <mailto:amibroker%40yahoogroups.com>>
> Sent: Saturday, July 25, 2009 10:55 PM
> Subject: [amibroker] Difference between templates and layouts
>
> > Hi everyone,
> >
> > I am a new AB user. I am currently going through the documentation
> to learn this software and I have the following question:
> >
> > What is the difference between templates and layouts? Both objects
> save chart information(though a layout seems intented for a
> > group of several chart windows).
> >
> > When/Why use a layout versus a template?
> >
> > Thanks for your help.
> >
> > Philippe
> >
> >
> >
> >
> >
> > ------------------------------------
> >
> > **** 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/ <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/ <http://www.amibroker.com/devlog/>
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>
8a.

Re: Exit on different time frame

Posted by: "bartlettbm" bartlett@xxxxxxxxxx   bartlettbm

Tue Oct 20, 2009 1:27 am (PDT)



Graham,
Hopefully you have found an answer to this problem. Please share
as I am stumped on similar issue.
Simple timeframe functions TimeFrameSet() etc gets tangled in the loop stuff. . .

Would like to see an example of weekly entry and exit on daily (specific day).
Perhaps you could expand a little on what you have so far?
Brian

--- In amibroker@xxxxxxxxxps.com, "grahamj42" <graham.johnson@...> wrote:
>
> I've been reading the User Docs and searching the forum for a starting point, but I seem to be getting more and more confused.
>
> The system is weekly and if the weekly open is < Stop then exit at weekly close.
>
> What I want to experiment with exit on Monday close or Tuesday close ...... Probably use optimization to best determine the effect.
>
> If TimeFrameGetPrice is used - how do I navigate the array that is returned?
>
> For other reasons (mainly Stop manipulation) the exit is in a loop. Code below has the unrelated lines removed (hopefully, for clarity).
>
> SellPrice = Close;
> for (bar1 = 2 ; bar1 < BarCount ; bar1++)
> {
> if(Open[bar1] < Stop[bar1 - 1])
> {
> Sell[bar1] = True;
> }
> }
>
> Graham
>

8b.

Re: Exit on different time frame

Posted by: "grahamj42" graham.johnson@xxxxxxxxxxxxx   grahamj42

Tue Oct 20, 2009 4:41 am (PDT)



Hi Brian

Nothing to offer.

I keep on going back to it and haven't had any inspiration. No responces from the forum either.

I'm sure that a start would get me on the right path.

Graham

--- In amibroker@xxxxxxxxxps.com, "bartlettbm" <bartlett@xx.> wrote:
>
> Graham,
> Hopefully you have found an answer to this problem. Please share
> as I am stumped on similar issue.
> Simple timeframe functions TimeFrameSet() etc gets tangled in the loop stuff. . .
>
> Would like to see an example of weekly entry and exit on daily (specific day).
> Perhaps you could expand a little on what you have so far?
> Brian
>
> --- In amibroker@xxxxxxxxxps.com, "grahamj42" <graham.johnson@> wrote:
> >
> > I've been reading the User Docs and searching the forum for a starting point, but I seem to be getting more and more confused.
> >
> > The system is weekly and if the weekly open is < Stop then exit at weekly close.
> >
> > What I want to experiment with exit on Monday close or Tuesday close ...... Probably use optimization to best determine the effect.
> >
> > If TimeFrameGetPrice is used - how do I navigate the array that is returned?
> >
> > For other reasons (mainly Stop manipulation) the exit is in a loop. Code below has the unrelated lines removed (hopefully, for clarity).
> >
> > SellPrice = Close;
> > for (bar1 = 2 ; bar1 < BarCount ; bar1++)
> > {
> > if(Open[bar1] < Stop[bar1 - 1])
> > {
> > Sell[bar1] = True;
> > }
> > }
> >
> > Graham
> >
>

9.

Problem with importing Data from Yahoo historical files

Posted by: "hackl_elisabeth" hackl_elisabeth@xxxxxxxxx   hackl_elisabeth

Tue Oct 20, 2009 4:27 am (PDT)



Hello all,

I do have a problem with importing csv data files from Yahoo historical data to Amibroker Testversion.

There is a script provided on amibroker.com (http://www.amibroker.com/docs/ab302.html) which refers to a different formatting of data.

The data is currently available in the following format from yahoo:

Date,Open,High,Low,Close,Volume,Adj Close
2009-10-16,51.13,51.76,50.95,51.51,980000,51.51
2009-10-15,51.86,52.15,51.75,52.09,1085600,52.09
2009-10-14,52.31,52.44,52.12,52.35,1049300,52.35

The "Import2" script (provided by amibroker) is expecting:

Date,Open,High,Low,Close,Volume
1-Feb- 0,104,105,100,100.25,2839600
31-Jan- 0,101,103.875,94.50,103.75,6265000
28-Jan- 0,108.1875,110.875,100.625,101.625,3779900

Does anybody have the amended script to import data according to the formatting provided now by yahoo or know another way to import this data.

Many thanks,

Elisabeth

10.

Time frame change Q

Posted by: "rffpgadsp" rffpgadsp@xxxxxxxxx   rffpgadsp

Tue Oct 20, 2009 6:44 am (PDT)



Hi,

Been working on some indicator that is based on other stock (foreign) daily price movement.

Now once I switch to weekly/monthly view on current security, the indicator gets all messed up.

I check the mutli time frame method, it seems you could only get from shorter interval to longer interval ( current in daily, then to weekly, monthly) but not the other way around ( from weekly to daily) etc..

Is this doable? the data is all avaiable, just don't know how to get it in the correct time frame.

Thanks

Recent Activity
Visit Your Group
Yahoo! News

Fashion News

What's the word on

fashion and style?

Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Ads on Yahoo!

Learn more now.

Reach customers

searching for you.

Need to Reply?

Click one of the "Reply" links to respond to a specific message in the Daily Digest.

Create New Topic | Visit Your Group on the Web
**** 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/

 


__._,_.___


**** 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/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___