Contents of AB-FT afl15 zip

01-19-2008

Welcome and hope you find these files of use to you

This zip files includes the following:

 

RuttrFT ROC Scoring    6/16/07            Fred Tonetti   -Here's a nice simple scoring mechanism based on ROC ( Rate of Change ) over some length of time ... It uses RuttrFT2 as the decision maker of WHEN to be long or flat ... This is what was used above and will generate the same buy and sell signals in terms of time. That system typically has an AddToComposite line that most of the time is noted out but can be used to create a readable buy / sell datastream via an AFL Foreign statement.
 

We'll optimize for length of ROC to be used and the number of positions to hold when buy signals are in effect. We'll set the optimizations statement for ROCLen so that it is basiclly an n-month ROC i.e. multiples of 21 as there are roughly that many daily bars per month

I've sorted the results in descending order by CAR but in AA they could of course be sorted however you want ... Additionally because this is a 2 parameter optimiztion you can use he 3-d graph in AB to generate an area plot for some perfomance metric along the z-axis like this ...

... which seems to suggest almost any pair of parameter values is better than no position scoring. If you pick for parameters values something that are in a relatively non sensitive area of the area plot like 231 & 7 and run a backtest on those parameter values you get a performance chart that looks like this ...

... which while not the best performer either in terms of CAR or MDD or CAR / MDD still outperforms any individual fund and is pretty close to the results of choosing the top 10% performers from the funds available with the benefit of hindsight.

Here's the trade list ... Note that most symbols are for the most part different from one signal to the next.

One could argue about what is or is not in the original "universe" of funds that was used from the previous post and was kept through out on the basis that some of these may be closed or not tradable for a variety of reasons which is probably true. However, the principles involved here apply regardless of the starting universe. IMHO the bottom line is, do you want to pick some fund that has performed well either on B&H or with the use of some timing signal and hope it continues to perform well in the future or do you want to have some mechanism to help decide what to trade at any given point in time.

 

 

HiLoVLE   6/18/07            Fred Tonetti -For those wanting a HiLoVLE "like" AFL ...

It will NOT lock up ...

You'll need to point AB / AA at a watchlist containing the three symbols i.e. RYAVX, RYAZX & RYSHX.

With the original parameter values from the Trade .ini the results are SIMILAR but NOT exactly the same as in Trade. I don't view this as necessarily a bad thing. The default values I left in the AFL are from optimization for 4/18/05 to current. This AFL is not feasible to optimize with AB's standard exhaustive search.

Use however you see fit ...
 

 

Sig_CAR_Test_3.afl & test2.afl   6/19/07           Dave Howarter-As a result of the above discussion on HoldMinDays, I did some testing and concluded that Fred's suggestion above to use flip to solve the problem I had seen where signals were ignored, rather than delayed, solves 99% of the problem.

I did find one outstanding problem with SetOption("HoldMinDays", 10), although probably not a very significant problem. For instance take a case where a signal goes to buy on 9/21/95 and you set the AA start of test to 9/25/95, and have a SetOption("HoldMinDays", 30). Then the signal goes to sell on 9/28/95. AB will enforce the 30 day HoldMinDays so that the sell trade is not made until 10/25/95. AB starts all test action at the start of the AA window.

I did a test and found that Trade also does a similar thing and forces the first buy to hold for 30 days from the start of the SignalPairTrade test.

It seems more logical to me to count the HoldMinDays from the previous buy signal, rather than the start of the test window as doing the latter would cause a buy to be held into a falling market and make a system take an artificial drawdown. On the other hand, the present simulation does reproduce what a person would experience if he decided to start using a system on exactly the day of the start of the test period. In that case, he would be forced to hold his first buy for the minimum days or suffer the consequences. I guess it depends on whether you want the test to match what would happen to a person who starts trading on the start of the test period or if you want to look at a snapshot of the returns from a portion of a larger period.

As a result of this, I decided to continue to use the function I had created which counts the first HoldMinDays from the preceding buy date, as I am more interested in the snapshot of trading within a larger time frame.

In the process of doing this testing I found a syntax error in two of the files I had posted previously. The syntax was wrong but I can't find any incorrect results from it. Regardless, I am posting below corrected copies of those in case the error has any effects.


 

 

HiLo|1_bisv1.2.afl   6/19/07           Bert Steele- I thought the afl was posted. Here it is. The section at the top of the afl provides instructions.

I like the manual slide bar approach, but maybe there are better ways.

How can one handle a typical day like Don and others do with this in Trade: Look at the chart; right click on chart and select Parameters; change N to Y to complete current day analysis; move either the percent change (what I like) or point change (what Don likes) to find out if there can be a signal change for the day (or even mess around with some of the inputs to see what might happen); and, if a signal change can take place, then look at the chart and write down Close, Percent or Point Change down on a piece of paper.

And, always open to better ways.

 

Discretionary sigs v1.afl & Equity discretionary backtest.afl   6/20/07           Ken Close-Signal File and Backtest for Descretionary traders:

OK, I solved my trading issue described above using PositionScore.

For those of you who might be interested in placing a series of descretionary signals on a chart, then converting those into an FNU, and then using the FNU to backtest the signal, the following may prove interesting. I suppose this could be used to test repetitive patterns or other buy and sell criteria that are too difficult to put into explicit rules. I know, I know, the system developers are groaning now. Still, I will bet there are a few of you who might be interested in using AB to backtest some descretionary signals, if for no other reason than to get the nice statistics.

Comments in the code provide minor instruction on the use of the two code files.

Ken

[Edit] I see an error in the File 2 and am posting the correction in the next message. Do not download File 1 here
.

 

Ft-Utilities8a.afl    6/20/07           Bert Steele-

 

Discretionary sigs v1.afl    6/20/07           Ken Close-There are the "cobblers" of AFL and there are the "knowing ones". The latter understand each and every statement and the intracacies of subscripts, bar identification, etc. The "cobblers" piece together code from other places, knowing enough to stick things together but maybe not the details. I are a "cobbler".

In cleaning up the above File 1 script, I removed a statement (bh = Equity(0,0)) because I did not think it was needed. I really did not understand what it is doing and it seemed not needed...but, the code does not work without it. The error msg is subscript out of range. The code works with the statement back in the code. Thus, a "cobbler's approach".