[R-SIG-Finance] Sullivan, Timmerman and White 1999: TA rules, and R

Worik worik.stanton at gmail.com
Mon Mar 28 23:33:21 CEST 2011


[Apologies if I have sent this multiple times.  I have been struggling 
with SMTP sewrvers and I have not seen my message appear on the list]

Friends

I am trying to save myself some tedious work.

I am processing a paper from  "The Journal Of Finance * Vol. LIV, No. 5  
October 1999" by Sullivan,  Timmerman and  White.  "Data-Snooping, 
Technical Trading Rule Performance, and the Bootstrap"

I am aiming to reproduce their results using the same  TA rules as they 
used.

They describe the rules they use in English and I am in the process of 
trying to programme them into R.  But if some one has already done this 
it would save me a pile of work.

It would be nice to just grab some rules from the TTR package, but 
because of the way STW describe the rules it is quite a lot of work to 
calculate what parameters to use.

So I am clutching at a straw here:  If anybody could point me in a 
better direction than slogging through the English text and trying to 
match that with the TTR docs I would be grateful

cheers
Worik

PS Here is an example of their text.  Not that it is bad, just quite a 
bit of work....

     A. Filter Rules
Filter rules are used in Alexander (1961) to assess the efficiency of stock
price movements. Fama and Blume (1966) explain the standard filter rule:
An x per cent filter is defined as follows: If the daily closing price of a
particular security moves up at least x per cent, buy and hold the se-
curity until its price moves down at least x per cent from a subsequent
high, at which time simultaneously sell and go short. The short position
is maintained until the daily closing price rises at least x per cent above
a subsequent low at which time one covers and buys. Moves less than x
per cent in either direction are ignored. (p. 227)
The first item of consideration is how to define subsequent lows and highs.
We will do this in two ways. As the above excerpt suggests, a subsequent
high is the highest closing price achieved while holding a particular long
position. Likewise, a subsequent low is the lowest closing price achieved
while holding a particular short position. Alternatively, a low (high) 
can be
defined as the most recent closing price that is less (greater) than the e
previous closing prices. Next, we will expand the universe of filter 
rules by
allowing a neutral position to be imposed. This is accomplished by 
liquidat-
ing a long position when the price decreases y percent from the previous
high, and covering a short position when the price increases y percent from
the previous low. Following BLL, we also consider holding a given long or
short position for a prespecified number of days, c, effectively 
ignoring all
other signals generated during that time.

-- 
If we amplify everything, we hear nothing.
--



More information about the R-SIG-Finance mailing list