monoUpDown {monotonicity} | R Documentation |
Up and Down test
Description
monoUpDown
implements the 'Up and Down' tests from Patton & Timmermann (2010, JFE) based on:
(1) sum of squared differences for positive diffs and negative diffs, (2) sum of absolute differences for positive diffs and negative diffs,
and uses the stationary bootstrap method from Politis & Romano (1994, JASA).
Usage
monoUpDown(data, difference = FALSE, bootstrapRep = 1000, block_length)
Arguments
data |
an object of class |
difference |
An object of class |
bootstrapRep |
A numeric scalar: the number of bootstrap samples. |
block_length |
A numeric scalar: The average length of the block to usefor the stationary bootstrap. This parameter is related to how much serial correlation is in your data. Use 10/6/3/2 as the block length if data is measured in daily/monthly/quarterly/annual returns. |
Value
monoUpDown
returns an object of class
"matrix"
:
"matrix": |
A named 4x2 matrix with the bootstrap p-values from a test for a monotonic relationship. The first row contains p-values for squared diffs in an assumed increasing monotonic pattern, the second row respectively for a decreasing pattern. The third row contains p-values for absolute differences in an assumed increasing monotonic pattern, the fourth row respectively for a decreasing pattern. The first column gives p-values which are not studentised, the second column the equivalent studentised p-values. |
References
Patton, A. and Timmermann, A. (2010): Monotonicity in asset returns: New testes with applications to the term structure, the CAPM, and portfolio sorts. Journal of Financial Economics, 98, No. 3, p. 605–625. doi: 10.1016/j.jfineco.2010.06.006.
Wolak, Frank A. (1989): Testing Inequality Constraints in Linear Econometric Models. Journal of Econometrics, 41, p. 205–235. doi: 10.1016/0304-4076(89)90094-8.
Examples
## load demo data and apply monoUpDown with daily data, which are not yet in differences
data(demo_returns)
test <- monoUpDown(demo_returns,block_length = 10)