monoSummary
implements the test for monotonicity in asset returns, based on portfolio sorts in (JoE, 2010)
monoSummary(data, bootstrapRep = 1000, wolakRep = 100,
increasing = TRUE, difference = FALSE, plot = FALSE, block_length, zero_treshold = 1e-6)
an object of class "matrix"
(or one that
can be coerced to that class): asset returns or differences in asset returns which are sorted in a maximum of 15 portfolios. Each column of the matrix 'data' represents a single portfolio. data
is therefore limited to a 15 columns.
A numeric scalar: the number of bootstrap samples.
A numeric scalar, stating the number of simulations to use to estimate the weight function in the weighted-sum of chi-square variables.
An object of class "logical"
: Assume an increasing or a decreasing pattern in monotonicity for the sorted portfolios.
An object of class "logical"
: If data
is already differences in asset returns, use TRUE. Otherwise data
will be transformed to difference returns \(r_p(n+1) - r_p(n)\) between portfolio \(n+1 \) and portfolio \(n\)
An object of class "logical"
: If plot
is TRUE, a plot is generated of the average returns on sorted portfolios with the p-value of the test on monotonicity from monoRelation.R
. Otherwise data
will be transformed to difference returns \(r_p(n+1) - r_p(n)\) between portfolio \(n+1 \) and portfolio \(n\)
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.
A numeric scalar, being the treshold for comparing solution values of a non-linear optimization in the Wolak (1989, JoE) test against zero. See section DETAILS for further information.
monoSummary
returns an object of class
"data.frame"
.
The returning value of "monoSummary"
is a "data.frame"
containing the
following components:
Mean difference return between top and bottom portfolio.
the residuals, that is response minus fitted values.
the fitted mean values.
the numeric rank of the fitted linear model.
the numeric rank of the fitted linear model.
studentized p-value from Patton and Timmermanns (JoE, 2010) "Up and Down" test for assumed increasing monotonicity pattern and using absolute difference returns.
studentized p-value from Patton and Timmermanns (JoE, 2010) "Up and Down" test for assumed decreasing monotonicity pattern and using absolute difference returns.
p-value "TestOnePvalueWolak" for \(H0*\) of Test 1 in wolak.R
p-value for \(H0*\) of Test 1 from monoBonferroni.R
.
Internally, a non-linear optimization using "constrOptim"
is used for the Monte-Carlo simulation within the Wolak (1989, JoE) test. The resulting values of the solution are close to zero, but due to the used machine precision numerically differnt from zero. For this reason, we suggest a treshold value close to zero. The default value is \(1e-6\), so all resulting solutions smaller than the treshold value are treated as being zero. The default treshold value is consistent with the data-set and results of Patton and Timmermann (JoE, 2010). Of course, the appropriate treshold value can differ across applications (e.g. run the code on one set of data, and then the same data/100).
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. 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. 10.1016/0304-4076(89)90094-8.
# NOT RUN {
## load daily non-difference return data.
## test an increasing pattern of monotonicity
# }
# NOT RUN {
data(demo_returns)
monoSummary(demo_returns, increasing = TRUE, block_length = 10)
# }
Run the code above in your browser using DataLab