Hi Richard -- I think I misunderstood your question.
The idea behind the system is that there may be a trading bias in favor of or against the end of one calendar month and the start of the next. The system can tested for each trading day of the month or calendar day of the month that you are interested in. That is where the 22 and / or 31 would come in. For the system described in the book, only the First trading day is tested. To test the effect, set the reference point to be the first trading day of the month -- the day where this day's month is not the same as yesterday's month. Then test the effect of buying each of the days around the first trading day of the month by adding or subtracting some number of days. That is where the optimize from -8 to plus 8 comes in. Each of those 17 runs tests the profitability of buying on that day, relative to the reference day, and holding for one day. If there is a bias, it will show up as some day, relative to the first trading day of the month, being particularly profitable or not profitable. For the in-sample period, 1/1/1995 to 1/1/2005, there is a strong seasonality effect -- buy on the third day before the first trading day of the month and hold through the second day after. See Figure 11.7. For the out-of-sample period, 1/1/2005 through 1/1/2007, that same seasonality holds fairly well, but the days after the first trading day are not as strong. See Figure 11.9. If you want to test any other reference day, you can by setting the reference day to one of the 31 calendar days or one of the 22 trading days of the month. In this case, I did not wrap completely around because I was testing the effect around the First trading day. Look at pages 155-158 and you will see a similar technique applied to testing the profitability of trading around options expiration. Thanks, Howard www.quantitativetradingsystems.com On Sun, Oct 19, 2008 at 5:59 PM, richpach2 <[EMAIL PROTECTED]> wrote: > Hello Howard, > > Thank you for your reply. I am still confused but, I am new to > AmiBroker and still learning. I understand that, AFL runs for every > record of the history array so, in that sense it will run for all the > bars in the array. Is this correct? Is this why you say that, it > runs 31 times? > > Also, I have read further into your book and noticed some reference > to Nelson Freeburg systems in "Filters and Timing" chapter. I am a > big fun of Nelson's approach. The AFL code for this his system is not > included in the book or AFL download. Do you know if this available > for reasearch and educational purpose? > > Regards > Richard > > > --- In [email protected] <amibroker%40yahoogroups.com>, "Howard B" > <[EMAIL PROTECTED]> wrote: > > > > Sorry -- the test is run 31 times, once for every day of the > month. 22 of > > those will show trading results. > > > > On Sat, Oct 18, 2008 at 8:41 AM, Howard B <[EMAIL PROTECTED]> wrote: > > > > > Hi Richard -- > > > > > > Thanks for the kind words about my book. > > > > > > I may not have sufficiently clear. The test is run 22 times. > Each time > > > the day of interest is one of the 22 trading days of the month. > The test is > > > to see whether there is an effect near that day of interest, so > there is no > > > need to gather results for all days. > > > > > > Thanks, > > > Howard > > > > > > > > > On Sat, Oct 18, 2008 at 12:14 AM, richpach2 <[EMAIL PROTECTED]> wrote: > > > > > >> Hello Howard, > > >> > > >> I have been reading your book. So far I was able to digest 160 > pages. > > >> It is all very clear and well written. I have one question in > regards > > >> to "Seasonality Systems" testing on page 152 and 153 (Trading > Day of > > >> the Month) AFL defines "Daynumber" as 8 bars before and after > DOI day. > > >> If we have 22 trading days on average in any given month, why do > you > > >> only test for 16 or 17 if one includes DOI day? > > >> Is there a reason why you don't use Minus11 instead of Minus8? > > >> > > >> Kind Regards > > >> Richard > > >> > > >> > > >> > > > > > > > > > > >
