MyNixOS website logo
Description

Compute the Adjusted Market Inefficiency Measure.

Fast tool to calculate the Adjusted Market Inefficiency Measure following Tran & Leirvik (2019) <doi:10.1016/j.frl.2019.03.004>. This tool provides rolling window estimates of the Adjusted Market Inefficiency Measure for multiple instruments simultaneously.

AMIM

The goal of AMIM is to provide an easy function to compute the rolling window AMIM following the paper of Tran & Leirvik (2019), “A simple but powerful measure of market efficiency”. Finance Research Letters, 29, pp.141-151.

Installation

You can install the released version of AMIM from CRAN with:

install.packages("AMIM")

Example

This is a basic example which shows you how to solve a common problem:

library(AMIM)
library(data.table)

data <- AMIM::exampledata # load the example data

AMIM <- AMIM.roll(data.table = data, identity.col = "ticker", rollWindow = 60, Date.col = "Date", return.col = "RET", min.obs = 30, max.lag = 10)
#>   |                                                                              |                                                                      |   0%  |                                                                              |===                                                                   |   4%  |                                                                              |======                                                                |   8%  |                                                                              |=========                                                             |  12%  |                                                                              |============                                                          |  17%  |                                                                              |===============                                                       |  21%  |                                                                              |==================                                                    |  25%  |                                                                              |====================                                                  |  29%  |                                                                              |=======================                                               |  33%  |                                                                              |==========================                                            |  38%  |                                                                              |=============================                                         |  42%  |                                                                              |================================                                      |  46%  |                                                                              |===================================                                   |  50%  |                                                                              |======================================                                |  54%  |                                                                              |=========================================                             |  58%  |                                                                              |============================================                          |  62%  |                                                                              |===============================================                       |  67%  |                                                                              |==================================================                    |  71%  |                                                                              |====================================================                  |  75%  |                                                                              |=======================================================               |  79%  |                                                                              |==========================================================            |  83%  |                                                                              |=============================================================         |  88%  |                                                                              |================================================================      |  92%  |                                                                              |===================================================================   |  96%  |                                                                              |======================================================================| 100%
AMIM[, .SD[(.N - 5):(.N), ], by = ticker] # show the last 5 observations for each ticker
#>     ticker  N       Date       MIM        CI        AMIM
#>  1:      A  2 2021-07-06 0.7044131 0.7604725 -0.23404162
#>  2:      A  2 2021-07-07 0.7044131 0.7604725 -0.23404162
#>  3:      A  3 2021-07-08 0.8058670 0.8110500 -0.02743054
#>  4:      A  3 2021-07-09 0.8017444 0.8110500 -0.04924920
#>  5:      A  3 2021-07-10 0.8017444 0.8110500 -0.04924920
#>  6:      A  3 2021-07-11 0.8017444 0.8110500 -0.04924920
#>  7:      B NA 2021-07-06        NA        NA          NA
#>  8:      B NA 2021-07-07        NA        NA          NA
#>  9:      B NA 2021-07-08        NA        NA          NA
#> 10:      B NA 2021-07-09        NA        NA          NA
#> 11:      B NA 2021-07-10        NA        NA          NA
#> 12:      B NA 2021-07-11        NA        NA          NA
Metadata

Version

1.0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows