monoSummary: Summary of Patton and Timmermann monotonicity (JoE, 2010)...

Description Usage Arguments Details Value References See Also Examples

View source: R/monoSummary.R

Description

monoSummary implements the test for monotonicity in asset returns, based on portfolio sorts in (JoE, 2010)

Usage

1
2
monoSummary(data, bootstrapRep = 1000, wolakRep = 100,
  increasing = TRUE, difference = FALSE, plot = FALSE, block_length, zero_treshold = 1e-6)

Arguments

data

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.

bootstrapRep

A numeric scalar: the number of bootstrap samples.

wolakRep

A numeric scalar, stating the number of simulations to use to estimate the weight function in the weighted-sum of chi-square variables.

increasing

An object of class "logical": Assume an increasing or a decreasing pattern in monotonicity for the sorted portfolios.

difference

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

plot

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

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.

zero_treshold

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.

Details

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

Value

monoSummary returns an object of class "data.frame".

The returning value of "monoSummary" is a "data.frame" containing the following components:

TopMinusBottom

Mean difference return between top and bottom portfolio.

t_stat

the residuals, that is response minus fitted values.

t_pval

the fitted mean values.

MR_pval

the numeric rank of the fitted linear model.

MRall_pval

the numeric rank of the fitted linear model.

UP_pval

studentized p-value from Patton and Timmermanns (JoE, 2010) "Up and Down" test for assumed increasing monotonicity pattern and using absolute difference returns.

DOWN_pval

studentized p-value from Patton and Timmermanns (JoE, 2010) "Up and Down" test for assumed decreasing monotonicity pattern and using absolute difference returns.

Wolak_pval

p-value "TestOnePvalueWolak" for H0* of Test 1 in wolak.R

Bonferroni_pval

p-value for H0* of Test 1 from monoBonferroni.R.

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.

See Also

monoRelation, monoUpDown, wolak.

Examples

1
2
3
4
5
## load daily non-difference return data.
## test an increasing pattern of monotonicity

data(demo_returns)
monoSummary(demo_returns, increasing = TRUE, block_length = 10)

skoestlmeier/monotonicity documentation built on Dec. 29, 2021, 9:54 a.m.