Search code examples
rtime-seriesquantmodquantitative-finance

How do I find stock market moves of a certain magnitude over a time series?


I'm getting my feet wet with R, and after much trial and error with my current task, I'm still stuck. I have price data for a stock ticker. I'm trying to find bear markets within my data, defined as a pricing data point <= 20% below an earlier point (but not too much earlier). Is this a time- series task? I hope this isn't too vague; I'm still learning the capabilities, so it's the best, most concise way I know to ask.

Thanks in advance..


Solution

  • Take a look at PerformanceAnalytics, specifically, DrawdownPeak, it may be what you're looking for