Skip to content

dispositionEffect

1.0.1Package record

Analysis of Disposition Effect on Financial Portfolios

0packages depend
2.7Kdownloads / year
95.3%test coverage
9/13flavors OK

Overview

About

Evaluate the presence of disposition effect and others irrational investor's behaviors based solely on investor's transactions and financial market data. Experimental data can also be used to perform the analysis. Four different methodologies are implemented to account for the different nature of human behaviors on financial markets. Novel analyses such as portfolio driven and time series disposition effect are also allowed.

Changes in 1.0.1
  • Minor bug fix.

From NEWS.md in the release

Install

Health

CRAN checks
4ERROR9OK
Check messages
ERRORtestsr-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-release-macos-arm64, r-release-macos-x86_64

r-oldrel-macos-arm64

Running ‘testthat.R’ [4s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dispositionEffect)
  --------------------------------------------
  The dispositionEffect is the first R package to perform behavioural analysis on financial data.
  Use citation('dispositionEffect') to cite the package.
  Learn more at: https://marcozanotti.github.io/dispositionEffect/index.html
  --------------------------------------------
  > 
  > test_check("dispositionEffect")
  [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-paper_compute.R:46:2'): paper_compute works (method = duration) ──
  paper_compute(...) not equal to res[, c(1, 14:17)].
  Component "PG_duration": Mean relative difference: 0.06666667
  Component "PL_duration": Mean relative difference: 0.06666667
  ── Failure ('test-paper_compute.R:52:2'): paper_compute works (method = all) ───
  pap
...[truncated]...
28 == 1
  ── Failure ('test-realized_duration.R:141:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [2] 29 - 28 == 1
  ── Failure ('test-realized_duration.R:152:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [2] 29 - 28 == 1
  ── Failure ('test-realized_duration.R:155:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [1] 29 - 28 == 1
  ── Failure ('test-realized_duration.R:158:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [2] 29 - 28 == 1
  ── Failure ('test-realized_duration.R:161:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [1] 29 - 28 == 1
  
  [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ]
  Error: Test failures
  Execution halted

r-oldrel-macos-x86_64

Running ‘testthat.R’ [7s/10s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dispositionEffect)
  --------------------------------------------
  The dispositionEffect is the first R package to perform behavioural analysis on financial data.
  Use citation('dispositionEffect') to cite the package.
  Learn more at: https://marcozanotti.github.io/dispositionEffect/index.html
  --------------------------------------------
  > 
  > test_check("dispositionEffect")
  [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-paper_compute.R:46:2'): paper_compute works (method = duration) ──
  paper_compute(...) not equal to res[, c(1, 14:17)].
  Component "PG_duration": Mean relative difference: 0.1764706
  Component "PL_duration": Mean relative difference: 0.1764706
  ── Failure ('test-paper_compute.R:52:2'): paper_compute works (method = all) ───
  pape
...[truncated]...
28 == 3
  ── Failure ('test-realized_duration.R:141:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [2] 31 - 28 == 3
  ── Failure ('test-realized_duration.R:152:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [2] 31 - 28 == 3
  ── Failure ('test-realized_duration.R:155:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [1] 31 - 28 == 3
  ── Failure ('test-realized_duration.R:158:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [2] 31 - 28 == 3
  ── Failure ('test-realized_duration.R:161:2'): realized_duration works (realized_only = TRUE) ──
  realized_duration(...) not equal to c(...).
  1/4 mismatches
  [1] 31 - 28 == 3
  
  [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ]
  Error: Test failures
  Execution halted

r-release-macos-arm64

Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dispositionEffect)
  --------------------------------------------
  The dispositionEffect is the first R package to perform behavioural analysis on financial data.
  Use citation('dispositionEffect') to cite the package.
  Learn more at: https://marcozanotti.github.io/dispositionEffect/index.html
  --------------------------------------------
  > 
  > test_check("dispositionEffect")
  Saving _problems/test-paper_compute-48.R
  Saving _problems/test-paper_compute-54.R
  Saving _problems/test-portfolio_compute-10.R
  Saving _problems/test-portfolio_compute-11.R
  Saving _problems/test-realized_compute-81.R
  Saving _problems/test-realized_compute-93.R
  Saving _problems/test-realized_duration-23.R
  Saving _problems/test-realized_duration-26.R
  Saving _problems/test-realized_duration-29.R
  Saving _problems/test-realized_duration-32.R
  Saving _problems/test-re
...[truncated]...
ed_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [2] 29 - 28 == 1
  ── Failure ('test-realized_duration.R:152:2'): realized_duration works (realized_only = TRUE) ──
  Expected `realized_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [2] 29 - 28 == 1
  ── Failure ('test-realized_duration.R:155:2'): realized_duration works (realized_only = TRUE) ──
  Expected `realized_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [1] 29 - 28 == 1
  ── Failure ('test-realized_duration.R:158:2'): realized_duration works (realized_only = TRUE) ──
  Expected `realized_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [2] 29 - 28 == 1
  ── Failure ('test-realized_duration.R:161:2'): realized_duration works (realized_only = TRUE) ──
  Expected `realized_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [1] 29 - 28 == 1
  
  [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ]
  Error:
  ! Test failures.
  Execution halted

r-release-macos-x86_64

Running ‘testthat.R’ [9s/15s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dispositionEffect)
  --------------------------------------------
  The dispositionEffect is the first R package to perform behavioural analysis on financial data.
  Use citation('dispositionEffect') to cite the package.
  Learn more at: https://marcozanotti.github.io/dispositionEffect/index.html
  --------------------------------------------
  > 
  > test_check("dispositionEffect")
  Saving _problems/test-paper_compute-48.R
  Saving _problems/test-paper_compute-54.R
  Saving _problems/test-portfolio_compute-10.R
  Saving _problems/test-portfolio_compute-11.R
  Saving _problems/test-realized_compute-81.R
  Saving _problems/test-realized_compute-93.R
  Saving _problems/test-realized_duration-23.R
  Saving _problems/test-realized_duration-26.R
  Saving _problems/test-realized_duration-29.R
  Saving _problems/test-realized_duration-32.R
  Saving _problems/test-r
...[truncated]...
ed_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [2] 31 - 28 == 3
  ── Failure ('test-realized_duration.R:152:2'): realized_duration works (realized_only = TRUE) ──
  Expected `realized_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [2] 31 - 28 == 3
  ── Failure ('test-realized_duration.R:155:2'): realized_duration works (realized_only = TRUE) ──
  Expected `realized_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [1] 31 - 28 == 3
  ── Failure ('test-realized_duration.R:158:2'): realized_duration works (realized_only = TRUE) ──
  Expected `realized_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [2] 31 - 28 == 3
  ── Failure ('test-realized_duration.R:161:2'): realized_duration works (realized_only = TRUE) ──
  Expected `realized_duration(...)` to equal `c(...)`.
  Differences:
  1/4 mismatches
  [1] 31 - 28 == 3
  
  [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ]
  Error:
  ! Test failures.
  Execution halted

CRAN check page ↗

Slowest check: 3.1 min · r-release-macos-x86_64
Status changes
  • ERROR9 OK, 4 ERRORNow
  • ERROR9 OK, 5 ERROR2026-03-10
Advisories

none known

Documentation

In release 1.0.1
READMEYes · 310 wordsVignettesYes · 4 · dynamicNEWSYes · 100% structured · mentions 1.0.1Citation fileNoWebsiteYes · pkgdown
Help pages
21 (8 internal)includes a package overview page
Examples that run
no examples
Exported functions with examples
0%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
5%

Downloads

2.7K
CRAN downloads in the past year
Rank #15,917 · ~7/day · ~224/mo
Daily download trend is not available in this view yet.
31230 days
77090 days
2.7K1 year
Compare downloads with other packages →
Also on82 r2u5 autocran

Repository

4Stars
1Forks
5Open issues
0Open PRs
1Releases
308Commits
5Commit identities
rstats-packagefinancebehavioral-economicseconomicseconometricstime-seriesfinancial-analysisfinancial-markets
308 commits · Last activity 2022-05-30 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
3
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2024-04-29 · 42026-07-07 · 4
PracticesBeta

9 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/marcozanotti/dispositioneffect on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2022-05-30 · The repository has a site deploy workflow

pkgdown site last built 2022-05-30

Coverage (1)
Coverage reporting (Codecov)
CRAN release process (1)
cran-comments.md
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
20 external dependencies (excludes base and recommended)

Installing dispositionEffect adds 23 packages (12 with compiled code, 6.5 MB of source tarballs). Heaviest: vctrs 1.0 MB, dplyr 902 KB, rlang 766 KB.

Depends (1)
R >= 3.5.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 1.0.0 (2021)
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.1Latest
    record
    2022-05-30 · current release · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 1.0.0
    record
    2021-08-02
  • R
    R 4.1.0 released · 2021-05-18

Package metadata

First published
2021-08-02
Total releases
2 / 5 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5.0
Bundled data
352 KB / 5 files
Download size
1.0 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("dispositionEffect")
Zanotti, M., & Mazzucchelli, L. (2022). dispositionEffect: Analysis of Disposition Effect on Financial Portfolios (Version 1.0.1) [Computer software]. https://doi.org/10.32614/CRAN.package.dispositionEffect

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for dispositionEffect version 1.0.1 [Data set]. HJJB, LLC. Data release v2026-10-20. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy