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:
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),
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.
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.