[R-SIG-Finance] Locating peaks in zoo objects in one go
josh.m.ulrich at gmail.com
Thu Mar 5 16:25:42 CET 2009
> vix <- as.xts(VIX)
> vix[vix > 70]
> index(vix[vix > 70])
 "2008-10-17" "2008-10-24" "2008-10-27"
 "2008-11-19" "2008-11-20" "2008-11-21"
On Thu, Mar 5, 2009 at 9:00 AM, Vorlow Constantinos <CVorlow at eurobank.gr> wrote:
> Dear R users,
> The following code will download the VIX volatility index to a variable
> called "VIX" (what else)...
> VIX <- get.hist.quote("^VIX", start = "1990-01-01", quote = "Close")
> Is there a way I could determine (in one go or iteratively), where the
> peaks (local maxima) lie in the sequence
> (say by using an arbitrary rule i.e., locate prices which are greater
> than x% the sample's average or a certain value) ???
> I would like to be able to capture the prices as well as their
> Thanks in advance &
> Best regards,
> Costas Vorlow
> P Think before you print.
> 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]]
> R-SIG-Finance at stat.math.ethz.ch mailing list
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
More information about the R-SIG-Finance