Identification of Bull and Bear States of the Market
Overview
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.
Install
Health
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Valeriy Zakamulin <valeriz@uia.no>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Valeriy",
family = "Zakamulin",
role = c("aut", "cre"),
email = "valeriz@uia.no")
as necessary.- NOTE11 OK, 2 NOTENow
- NOTE12 OK, 2 NOTE2026-04-22
- ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 11
- Examples that run
- 100%3 run in a plain check
- Exported functions with examples
- 43%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 36%
Downloads
Dependencies
Code & Tests
Datasets
People & History
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 1.0Latest2021-04-01 · current release
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2021-04-01
- Total releases
- 1 / 5 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.0
- Bundled data
- 71 KB / 1 file
- Download size
- 380 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("bbdetection")Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.