dispositionEffect
Analysis of Disposition Effect on Financial Portfolios
v1.0.1
·
May 30, 2022
·
MIT + file LICENSE
Description
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.
Downloads
275
Last 30 days
15339th
677
Last 90 days
2.4K
Last year
Trend: +27.9% (30d vs prior 30d)
CRAN Check Status
5
ERROR
9
OK
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | ERROR |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | ERROR |
| r-oldrel-macos-x86_64 | ERROR |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | ERROR |
| r-release-macos-x86_64 | ERROR |
| r-release-windows-x86_64 | OK |
Check details (5 non-OK)
ERROR
r-devel-macos-arm64
tests
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
ERROR
r-oldrel-macos-arm64
tests
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
ERROR
r-oldrel-macos-x86_64
tests
Running ‘testthat.R’ [7s/9s]
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) ───
paper
...[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
ERROR
r-release-macos-arm64
tests
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
ERROR
r-release-macos-x86_64
tests
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
Check History
ERROR 9 OK · 0 NOTE · 0 WARNING · 5 ERROR · 0 FAILURE Mar 10, 2026
ERROR
r-devel-macos-arm64
tests
Running ‘testthat.R’ [2s/2s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(dispositionEffect) -------------------------------------------- The dispositionEffect is the first R package to perfor ...[truncated]... : 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
ERROR
r-release-macos-arm64
tests
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 perfor ...[truncated]... t-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
ERROR
r-release-macos-x86_64
tests
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 perfo ...[truncated]... t-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
ERROR
r-oldrel-macos-arm64
tests
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 perfor ...[truncated]... t-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
ERROR
r-oldrel-macos-x86_64
tests
Running ‘testthat.R’ [7s/9s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(dispositionEffect) -------------------------------------------- The dispositionEffect is the first R package to perfor ...[truncated]... t-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