Code Monkey home page Code Monkey logo

monotonicity's Introduction

monotonicity

Overview

CRAN_Status_Badge Project Status: Active – The project has reached a stable, usable state and is being actively developed. Travis-CI Build Status Build status codecov Total Downloads License

monotonicity is an R package providing several monotonicity tests for asset returns based on portfolio sorts. Its first version is mainly based on the paper Monotonicity in asset returns: New testes with applications to the term structure, the CAPM, and portfolio sorts by Andrew Patton and Allan Timmermann. Please see Andrew Pattons Matlab code page Nr. 8 for the original Matlab code or his Exec&Share profile providing an online executable version of monotonicity tests.

Key Features

Functions for monotonicity tests on asset returns based on portfolio sorts:

  • Wolak Test
  • Up and Down Test
  • MR (Monotonic Relationship) Test
  • Weak monotonicity test using Bonferroni bounds
  • Stationary Bootstrap Simulation

Installation

# The easiest way to install monotonicity is to download via CRAN
install.packages("monotonicity")

# Alternatively, you can install the development version from GitHub
# install.packages("devtools")
devtools::install_github("skoestlmeier/monotonicity")

Notes

The monotonicity tests provided by this package are mostly based on simulated bootstrap samples. The results may therefore slightly differ for repeated tests.

For an estimation of the variation of the results, we exemplarily run the MR (Monotonic Relationship) Test provided by the function monoRelation 1,000 times with identical input data. We observed the following results for the mean studentised p-value, using the provided R package and in comparison Andrew Pattons original Matlab code:

Software Mean Minimum  Maximum  Standard deviation
Matlab 0.032 0.014 0.047 0.0057
R 0.031 0.018 0.048 0.0064

In fact, the observed variation seems to be acceptable and should not affect any decision based on the returning p-value, when using the recommended number of 1,000 bootstrap replications.

Contributing

Constributions in form of feedback, comments, code, bug reports or pull requests are most welcome. How to contribute:

  • Issues, bug reports, or desired expansions: File a GitHub issue.
  • Fork the source code, modify it, and issue a pull request through the project GitHub page.

Please read the contribution guidelines on how to contribute to this R-package.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

monotonicity's People

Contributors

nemobis avatar skoestlmeier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.