Hello...

Is there a quick and easy way to determine how curvature changes (along
time) on a smoothed version (or trend) of a time series?

i.e.

in the following code, I wan to check (possibly vith a combination of
rollapply function, where the peaks and troughs are on the idx variable
-and, IF they are peaks or troughs- which is a 15 day moving average of
the SP500 index...

    library(tseries)
    SP500 <- get.hist.quote("^GSPC", start = "2006-01-01", quote =
"Close")
    idx1 <- rollapply(SP500, 15, align="right", function(x) mean(x))

Have experimented a bit with the derivatives functions but I can't make
it really work properly... The fact that the sequences are also  zoo
objects and I would like to retain their time stamp properties
complicates things for my code...

If there is a better and faster way (possibly finding a local max or
min), I would appreciate some pointers. 

Thanks in advance,

Costas

 


P Think before you print.

Disclaimer:
This e-mail is confidential. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete the copy from your system.
EFG Eurobank Ergasias S.A. is not responsible for, nor endorses, any opinion, recommendation, conclusion, solicitation, offer or agreement or any information contained in this communication.
EFG Eurobank Ergasias S.A. cannot accept any responsibility for the accuracy or completeness of this message as it has been transmitted over a public network. If you suspect that the message may have been intercepted or amended, please call the sender.


	[[alternative HTML version deleted]]

