Skip to content

using findPeaks in designing railing-stops?

8 messages · Michael, Jeff Ryan, R. Michael Weylandt +1 more

#
It looks like you need to wrap coredata() because some funny
arithmetic is happening when the xts-ness is preserved.

e.g.

findPeaks(coredata(Ad(SPY)), 5)

But this is perhaps a less-than-desirable feature. I'll patch it and
send it to Josh.

Michael
On Thu, Feb 9, 2012 at 9:56 PM, Michael <comtech.usa at gmail.com> wrote:
#
On Thu, Feb 9, 2012 at 9:00 PM, R. Michael Weylandt
<michael.weylandt at gmail.com> wrote:
Proper procedure is indeed to blame Josh for all undesirable
functionality, even in code he didn't write ;-)

Patched in R-forge rev 577. Thanks.

Jeff

  
    
#
Happy to follow procedure.

Thanks for jumping on it so quickly.

Michael Weylandt
On Thu, Feb 9, 2012 at 10:40 PM, Jeffrey Ryan <jeffrey.ryan at lemnica.com> wrote:
6 days later
#
You'll get more if you lower your threshold value (the 5)

Michael
On Thu, Feb 16, 2012 at 10:13 AM, Luna <lunamoonmoon at gmail.com> wrote:
#
No....perhaps you misunderstand what the "threshold" means? It means
the point of interest has to be x greater than its neighbor, not the
amount by which it has to exceed the valley. If you look in the
neighborhood of ~55:65 (the "next peak" on your graph) you'll see no
point is that far above its predecessor so there's no peak (so to
speak). Type findPeaks without parentheses and try to understand the
code used and the implicit definition of what a peak is. There's also
a lag convention you should be aware of.

What do you mean you cannot change the number 5?

Michael
On Thu, Feb 16, 2012 at 10:18 AM, Luna <lunamoonmoon at gmail.com> wrote: