Analysis of Disposition Effect on Financial Portfolios
Overview
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.
- Minor bug fix.
From NEWS.md in the release
Install
Health
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 haltedr-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 haltedr-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 haltedr-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- ERROR9 OK, 4 ERRORNow
- ERROR9 OK, 5 ERROR2026-03-10
Documentation
- 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
Repository
- 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
Forks over time
Releases over time
Issues over time
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.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2022-05-30 · The repository has a site deploy workflow
pkgdown site last built 2022-05-30
Show all practicesHide 1 practice
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.1Latest
- RR 4.2.0 released · 2022-04-22
- 1.0.02021-08-02
- RR 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")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.
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.