bbdetection: Identification of Bull and Bear States of the Market

Implements two algorithms of detecting Bull and Bear markets in stock prices: the algorithm of Pagan and Sossounov (2002, <doi:10.1002/jae.664>) and the algorithm of Lunde and Timmermann (2004, <doi:10.1198/073500104000000136>). The package also contains functions for printing out the dating of the Bull and Bear states of the market, the descriptive statistics of the states, and functions for plotting the results. For the sake of convenience, the package includes the monthly and daily data on the prices (not adjusted for dividends) of the S&P 500 stock market index.

Getting started

Package details

AuthorValeriy Zakamulin
MaintainerValeriy Zakamulin <>
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:

Try the bbdetection package in your browser

Any scripts or data that you put into this service are public.

bbdetection documentation built on April 1, 2021, 5:06 p.m.