Site icon R-bloggers

Structural Breaks (Bull or Bear?)

[This article was first published on Timely Portfolio, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

When I spotted the bfast R package, I could not resist attempting to apply it to identify bull and bear markets.  For all the details that I do not understand, please see the references:

< size="1" face="Courier New">Jan Verbesselt, Rob Hyndman, Glenn Newnham, Darius Culvenor (2010). Detecting Trend and
  Seasonal Changes in Satellite Image Time Series. Remote Sensing of Environment, 114(1),
  106-115. doi:10.1016/j.rse.2009.08.014< >

< size="1" face="Courier New">Jan Verbesselt, Rob Hyndman, Achim Zeileis, Darius Culvenor (2010). Phenological Change
  Detection while Accounting for Abrupt and Gradual Trends in Satellite Image Time
  Series. Remote Sensing of Environment, 114(12), 2970 – 2980.
  doi:10.1016/j.rse.2010.08.003< >

I believe the result on the S&P 500 (even with a high h and only one iteration) is a fairly close marker for bull and bear markets, and I thoroughly enjoyed applying forestry techniques to financial time series.

From TimelyPortfolio
From TimelyPortfolio
From TimelyPortfolio

R code from GIST:

To leave a comment for the author, please follow the link and comment on their blog: Timely Portfolio.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.