[R-SIG-Finance] TTR Stochastics function - internal smoothing
Joshua Ulrich
josh.m.ulrich at gmail.com
Tue Jun 2 04:00:33 CEST 2009
Stanley,
Thank you very much for this detailed explanation. I will let you
know when TTR has been updated on r-forge.
Best,
Josh
--
http://www.fosstrading.com
On Mon, Jun 1, 2009 at 4:01 AM, Stanley Neo <stanley.neo at gmail.com> wrote:
> Hi Joshua,
>
> I would suggest the following:
> 1. an additional argument "IntSmooth" for internal smoothing period
> (probably with default as 1 so that the current users need not change any
> inputs).
> 2. applying simple moving average on the differences (i.e. C-LL and HH-LL)
> with IntSmooth value as the SMA period.
>
> The SMA of C-LL and HH-LL can then be used to compute the usual Fast K, Fast
> D, Slow D. We will not need to have an another output as in practice, the
> raw K is the Fast K, the SMA on Fast K is the Slow K (which is also known as
> the Fast D) and the SMA on Slow K is the Slow D.
>
> Therefore, if IntSmooth = 1, the SMA on differences will result in the usual
> values that the stoch currently generates. If the users desire to set a
> different value, then the stoch will have the raw K smoothed internally.
>
> In short:
> 1. SMA on Differences => internal smoothing, upon which, we compute Raw K
> 2. Raw K aka Fast K
> 3. Slow K aka Fast D = Moving Average on Raw K
> 4. Slow D = Moving Average on Slow K
>
> rgds
> Stanley
>
> 2009/6/1 Joshua Ulrich <josh.m.ulrich at gmail.com>
>>
>> Stanley,
>>
>> Thanks for pointing this out.
>>
>> On Sun, May 31, 2009 at 11:35 AM, Stanley Neo <stanley.neo at gmail.com>
>> wrote:
>> > just want to highlight,
>> >
>> > For Stochastics implementation on most trading platforms, besides apply
>> > moving on K to get a smooth K (aka Slow K) there is an option for
>> > internal
>> > smoothing of %K. Ths works by take a moving average of the differences
>> > (i.e.
>> > C-LowestL and HighestH-LowestL) before computing %K.
>> >
>> > TTR stoch function, smoothing is applied on final K values to obtain
>> > slow K
>> > (or fast D) and slow D. Implicitly, this means internal smoothing period
>> > =
>> > 1. not too sure if there will be an update to include the internal
>> > smoothing
>> > option for internal smoothing period > 1.
>> >
>> I wasn't planning on providing an update, but I will now that you've
>> brought it to my attention. :-)
>> How would you suggest it be implemented? Should I do more than add a
>> slowK=1 argument and add slowK output?
>>
>> Just to make sure I understand, slowK and fastD should be equal when
>> the slowK periods = 1, correct?
>>
>> > this might answer some doubts on why stochastics on TTR may differ from
>> > some
>> > trading platforms where the default internal smoothing period is 3.
>> >
>> > rgds
>> > Stanley
>> >
>> > [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > R-SIG-Finance at stat.math.ethz.ch mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only.
>> > -- If you want to post, subscribe first.
>> >
>>
>> Best,
>> Josh
>> --
>> http://www.fosstrading.com
>
More information about the R-SIG-Finance
mailing list