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

radek radek.maciaszek at gmail.com
Tue Nov 20 15:48:23 CET 2012


Hi Brian,

Apologies for necromancing such an old topic but I was wondering if this
work has been added in the end to the TTR (or perhaps some other package)? I
am facing a similar issue and would like to calculate when the volume is
(pivoting) breaking the channel.

Thanks,
Radek


braverock wrote
> OK, so Josh actually reviewed the paper rather than relying on hazy 
> recollection (my bad).
> 
> Based on this, you'd apply the relevant indicators for MA periods, 
> DonchianChannel, or OBV, es needed.  Channel Break-outs are also often 
> called pivots.  We have some code for this, and will endeavor to 
> document it and get it into TTR.
> 
> After any indicators are applied, as required, you'll then generate 
> signals as I described in my prior email.
> 
> Regards,
> 
>    - Brian
> 
> On 03/29/2011 01:24 AM, Joshua Ulrich wrote:
>> Hi Worik,
>>
>> There are 5 types of rules: filter rules, moving averages, support and
>> resistance, channel break-outs, and on-balance volume averages.  TTR
>> contains what you need for moving averages, channel break-outs
>> (DonchianChannel) and on-balance volume (OBV).
>>
>> I coded filter rules in another language a few years ago, so I could
>> help you write them in R.  I don't understand how the support and
>> resistance rules differ from the channel break-outs, but that could be
>> due to the time of day and my lack of sleep.  Regardless, I doubt they
>> would be difficult to code.
>>
>> Best,
>> --
>> Joshua Ulrich  |  FOSS Trading: www.fosstrading.com
>>
>>
>>
>> On Mon, Mar 28, 2011 at 4:33 PM, Worik<

> worik.stanton@

> >  wrote:
>>> [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.
> 
> _______________________________________________

> R-SIG-Finance@

>  mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.





--
View this message in context: http://r.789695.n4.nabble.com/Sullivan-Timmerman-and-White-1999-TA-rules-and-R-tp3413144p4650167.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list