Last updated on 2026-08-04 07:50:32 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.0.1 | 4.49 | 135.40 | 139.89 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.0.1 | 3.33 | 95.49 | 98.82 | NOTE | |
| r-devel-linux-x86_64-fedora-clang | 1.0.1 | 220.80 | OK | |||
| r-devel-linux-x86_64-fedora-gcc | 1.0.1 | 98.51 | OK | |||
| r-devel-windows-x86_64 | 1.0.1 | 7.00 | 149.00 | 156.00 | OK | |
| r-patched-linux-x86_64 | 1.0.1 | 4.18 | 128.04 | 132.22 | OK | |
| r-release-linux-x86_64 | 1.0.1 | 3.90 | 127.86 | 131.76 | OK | |
| r-release-macos-arm64 | 1.0.1 | 1.00 | 38.00 | 39.00 | ERROR | |
| r-release-macos-x86_64 | 1.0.1 | 3.00 | 184.00 | 187.00 | ERROR | |
| r-release-windows-x86_64 | 1.0.1 | 7.00 | 151.00 | 158.00 | OK | |
| r-oldrel-macos-arm64 | 1.0.1 | ERROR | ||||
| r-oldrel-macos-x86_64 | 1.0.1 | 3.00 | 133.00 | 136.00 | ERROR | |
| r-oldrel-windows-x86_64 | 1.0.1 | 8.00 | 183.00 | 191.00 | OK |
Version: 1.0.1
Check: for new files in some other directories
Result: NOTE
Found the following files/directories:
‘~/tmp/scratch/Rtmp0Rsj4y’ ‘~/tmp/scratch/Rtmp0WU2Ga’
‘~/tmp/scratch/Rtmp1IJaDX’ ‘~/tmp/scratch/Rtmp1XXlM1’
‘~/tmp/scratch/Rtmp1xyO0N’ ‘~/tmp/scratch/Rtmp2Lu39v’
‘~/tmp/scratch/Rtmp2fDBcn’ ‘~/tmp/scratch/Rtmp2nsPmL’
‘~/tmp/scratch/Rtmp3QwGd2’ ‘~/tmp/scratch/Rtmp4FIlSX’
‘~/tmp/scratch/Rtmp5GH2iQ’ ‘~/tmp/scratch/Rtmp73VoW4’
‘~/tmp/scratch/Rtmp7AO6wt’ ‘~/tmp/scratch/Rtmp8M8ZiG’
‘~/tmp/scratch/Rtmp8XdZ7c’ ‘~/tmp/scratch/Rtmp8cKyg3’
‘~/tmp/scratch/Rtmp8jsKbL’ ‘~/tmp/scratch/Rtmp8plwAI’
‘~/tmp/scratch/Rtmp8smrvz’ ‘~/tmp/scratch/Rtmp8yIhw4’
‘~/tmp/scratch/Rtmp9GZIbR’ ‘~/tmp/scratch/Rtmp9vLPfU’
‘~/tmp/scratch/RtmpA9bi5y’ ‘~/tmp/scratch/RtmpAaHEYA’
‘~/tmp/scratch/RtmpAcyXCA’ ‘~/tmp/scratch/RtmpAfOmWw’
‘~/tmp/scratch/RtmpB3X7Sh’ ‘~/tmp/scratch/RtmpBWloex’
‘~/tmp/scratch/RtmpBmpOuJ’ ‘~/tmp/scratch/RtmpDHP0AY’
‘~/tmp/scratch/RtmpDWcn6h’ ‘~/tmp/scratch/RtmpDa0khG’
‘~/tmp/scratch/RtmpEm9Ioz’ ‘~/tmp/scratch/RtmpF39QxF’
‘~/tmp/scratch/RtmpF3Xw79’ ‘~/tmp/scratch/RtmpFWHUEb’
‘~/tmp/scratch/RtmpFWhLKP’ ‘~/tmp/scratch/RtmpFoeycU’
‘~/tmp/scratch/RtmpH3wzAA’ ‘~/tmp/scratch/RtmpHwY62l’
‘~/tmp/scratch/RtmpI1qhxt’ ‘~/tmp/scratch/RtmpIXhfZx’
‘~/tmp/scratch/RtmpIjqUDY’ ‘~/tmp/scratch/RtmpJ6YWrG’
‘~/tmp/scratch/RtmpKUhPnl’ ‘~/tmp/scratch/RtmpKuhDbU’
‘~/tmp/scratch/RtmpLXiBqu’ ‘~/tmp/scratch/RtmpLZpjBK’
‘~/tmp/scratch/RtmpLai9VN’ ‘~/tmp/scratch/RtmpLivELf’
‘~/tmp/scratch/RtmpMKTExh’ ‘~/tmp/scratch/RtmpMRvfi6’
‘~/tmp/scratch/RtmpNCkhvY’ ‘~/tmp/scratch/RtmpNO9OUq’
‘~/tmp/scratch/RtmpNoWhFf’ ‘~/tmp/scratch/RtmpOeS3DW’
‘~/tmp/scratch/RtmpOidzES’ ‘~/tmp/scratch/RtmpP4YRbJ’
‘~/tmp/scratch/RtmpPRkJSv’ ‘~/tmp/scratch/RtmpQnRvEu’
‘~/tmp/scratch/RtmpQwTFJ7’ ‘~/tmp/scratch/RtmpRTEObU’
‘~/tmp/scratch/RtmpRxSMsb’ ‘~/tmp/scratch/RtmpSOZcCC’
‘~/tmp/scratch/RtmpSb6OGf’ ‘~/tmp/scratch/RtmpSf3LFM’
‘~/tmp/scratch/RtmpTHTXTG’ ‘~/tmp/scratch/RtmpTI1SKc’
‘~/tmp/scratch/RtmpU4eWCW’ ‘~/tmp/scratch/RtmpUBjB3r’
‘~/tmp/scratch/RtmpUNa6ih’ ‘~/tmp/scratch/RtmpUhX4D7’
‘~/tmp/scratch/RtmpVXTcqG’ ‘~/tmp/scratch/RtmpVpmx8f’
‘~/tmp/scratch/RtmpWB54c4’ ‘~/tmp/scratch/RtmpWPfWB0’
‘~/tmp/scratch/RtmpY7J7HV’ ‘~/tmp/scratch/RtmpY9Ub7x’
‘~/tmp/scratch/RtmpZAwN19’ ‘~/tmp/scratch/RtmpZlG3P0’
‘~/tmp/scratch/Rtmpa6hLoX’ ‘~/tmp/scratch/RtmpauQlGU’
‘~/tmp/scratch/Rtmpb306hu’ ‘~/tmp/scratch/RtmpbHr5ZF’
‘~/tmp/scratch/RtmpbmRA7f’ ‘~/tmp/scratch/RtmpcLXsyX’
‘~/tmp/scratch/Rtmpea4Ujp’ ‘~/tmp/scratch/RtmpewI2On’
‘~/tmp/scratch/RtmpeybzOt’ ‘~/tmp/scratch/Rtmpf6DBp1’
‘~/tmp/scratch/RtmpfHPFvr’ ‘~/tmp/scratch/RtmpfIo8Af’
‘~/tmp/scratch/RtmpfLZx0n’ ‘~/tmp/scratch/RtmpfLo83p’
‘~/tmp/scratch/Rtmpfd8HZZ’ ‘~/tmp/scratch/Rtmpfxh93D’
‘~/tmp/scratch/RtmpgYojxU’ ‘~/tmp/scratch/RtmpgaMFmp’
‘~/tmp/scratch/Rtmpgl1INo’ ‘~/tmp/scratch/RtmpglupFf’
‘~/tmp/scratch/Rtmph3IrL1’ ‘~/tmp/scratch/Rtmph7JTP2’
‘~/tmp/scratch/RtmphO6twU’ ‘~/tmp/scratch/Rtmphb5Afq’
‘~/tmp/scratch/RtmphphGVh’ ‘~/tmp/scratch/RtmpiACgAH’
‘~/tmp/scratch/Rtmpibba6Y’ ‘~/tmp/scratch/RtmpiusbNr’
‘~/tmp/scratch/Rtmpj2nHMM’ ‘~/tmp/scratch/RtmpjXFotN’
‘~/tmp/scratch/RtmpkINr14’ ‘~/tmp/scratch/Rtmpkujpss’
‘~/tmp/scratch/RtmpkvaIFs’ ‘~/tmp/scratch/RtmplM9W1u’
‘~/tmp/scratch/RtmplgltQ3’ ‘~/tmp/scratch/Rtmpm8YduV’
‘~/tmp/scratch/RtmpmRMkHD’ ‘~/tmp/scratch/RtmpnBMeOy’
‘~/tmp/scratch/RtmpnMy78m’ ‘~/tmp/scratch/RtmpnR79Jd’
‘~/tmp/scratch/Rtmpojb4pk’ ‘~/tmp/scratch/Rtmpp55WKB’
‘~/tmp/scratch/Rtmpp9sQCW’ ‘~/tmp/scratch/RtmppdpCpl’
‘~/tmp/scratch/RtmppgWnTu’ ‘~/tmp/scratch/RtmpqI1zKO’
‘~/tmp/scratch/RtmpqL7nBC’ ‘~/tmp/scratch/RtmpqkKQ5z’
‘~/tmp/scratch/Rtmpr97dR7’ ‘~/tmp/scratch/RtmprDDNxm’
‘~/tmp/scratch/RtmprEaF2G’ ‘~/tmp/scratch/Rtmps7D44y’
‘~/tmp/scratch/RtmpsC4VOy’ ‘~/tmp/scratch/RtmpsOEeNJ’
‘~/tmp/scratch/RtmpuDe3Be’ ‘~/tmp/scratch/RtmpuRTwuj’
‘~/tmp/scratch/RtmpuT5kGV’ ‘~/tmp/scratch/RtmpuZlK7v’
‘~/tmp/scratch/Rtmpuv4zIn’ ‘~/tmp/scratch/RtmpvLBDkP’
‘~/tmp/scratch/RtmpvT0g2h’ ‘~/tmp/scratch/RtmpvVchtH’
‘~/tmp/scratch/Rtmpw4LY0L’ ‘~/tmp/scratch/RtmpwOpRZ0’
‘~/tmp/scratch/RtmpwgOkCU’ ‘~/tmp/scratch/RtmpwqyPQl’
‘~/tmp/scratch/RtmpwwzrGQ’ ‘~/tmp/scratch/Rtmpxh8gPA’
‘~/tmp/scratch/RtmpyesO5t’ ‘~/tmp/scratch/RtmpzBJNmL’
‘~/tmp/scratch/Rtmpzes4Km’ ‘~/tmp/scratch/RtmpztOsS4’
‘~/tmp/scratch/RtmpzuR5JR’ ‘~/tmp/scratch/xvfb-run.04cDkc’
‘~/tmp/scratch/xvfb-run.0h5nVE’ ‘~/tmp/scratch/xvfb-run.1AxCEE’
‘~/tmp/scratch/xvfb-run.1ti7oU’ ‘~/tmp/scratch/xvfb-run.2VvEiJ’
‘~/tmp/scratch/xvfb-run.3SlZ32’ ‘~/tmp/scratch/xvfb-run.5YyJ8j’
‘~/tmp/scratch/xvfb-run.6wiIwH’ ‘~/tmp/scratch/xvfb-run.78lqtE’
‘~/tmp/scratch/xvfb-run.7AcWo5’ ‘~/tmp/scratch/xvfb-run.8hwsu4’
‘~/tmp/scratch/xvfb-run.9kDFp0’ ‘~/tmp/scratch/xvfb-run.9m76dW’
‘~/tmp/scratch/xvfb-run.APv1ln’ ‘~/tmp/scratch/xvfb-run.B29zqQ’
‘~/tmp/scratch/xvfb-run.CfX6EX’ ‘~/tmp/scratch/xvfb-run.EE1pgT’
‘~/tmp/scratch/xvfb-run.EuNjPG’ ‘~/tmp/scratch/xvfb-run.FjT8JL’
‘~/tmp/scratch/xvfb-run.HPOCVR’ ‘~/tmp/scratch/xvfb-run.HgvRJo’
‘~/tmp/scratch/xvfb-run.KmBB6Y’ ‘~/tmp/scratch/xvfb-run.MY8l8A’
‘~/tmp/scratch/xvfb-run.NEFm8O’ ‘~/tmp/scratch/xvfb-run.QAeTEp’
‘~/tmp/scratch/xvfb-run.Qqxl2T’ ‘~/tmp/scratch/xvfb-run.U8P3EK’
‘~/tmp/scratch/xvfb-run.V43Njh’ ‘~/tmp/scratch/xvfb-run.VZGr3v’
‘~/tmp/scratch/xvfb-run.Vp9kAL’ ‘~/tmp/scratch/xvfb-run.XNk1x8’
‘~/tmp/scratch/xvfb-run.YGPeGd’ ‘~/tmp/scratch/xvfb-run.YoMBb0’
‘~/tmp/scratch/xvfb-run.aGTosm’ ‘~/tmp/scratch/xvfb-run.awdPcY’
‘~/tmp/scratch/xvfb-run.ax1a9x’ ‘~/tmp/scratch/xvfb-run.biHpJk’
‘~/tmp/scratch/xvfb-run.d4CWHC’ ‘~/tmp/scratch/xvfb-run.dfa3DG’
‘~/tmp/scratch/xvfb-run.dzsPog’ ‘~/tmp/scratch/xvfb-run.f7bMk8’
‘~/tmp/scratch/xvfb-run.gUNkaN’ ‘~/tmp/scratch/xvfb-run.gdGABR’
‘~/tmp/scratch/xvfb-run.hEDWvJ’ ‘~/tmp/scratch/xvfb-run.i1fntL’
‘~/tmp/scratch/xvfb-run.jkJi70’ ‘~/tmp/scratch/xvfb-run.js47iv’
‘~/tmp/scratch/xvfb-run.kZZ9hM’ ‘~/tmp/scratch/xvfb-run.lIHmXb’
‘~/tmp/scratch/xvfb-run.lQLJIa’ ‘~/tmp/scratch/xvfb-run.lozAZk’
‘~/tmp/scratch/xvfb-run.mGoA7w’ ‘~/tmp/scratch/xvfb-run.o7apKu’
‘~/tmp/scratch/xvfb-run.pwV5Rg’ ‘~/tmp/scratch/xvfb-run.q0RS56’
‘~/tmp/scratch/xvfb-run.qcPTvh’ ‘~/tmp/scratch/xvfb-run.sDQs0A’
‘~/tmp/scratch/xvfb-run.u1EjtK’ ‘~/tmp/scratch/xvfb-run.uhwNDW’
‘~/tmp/scratch/xvfb-run.wsBK1S’ ‘~/tmp/scratch/xvfb-run.yEV88n’
‘~/tmp/scratch/xvfb-run.yGfJE6’ ‘~/tmp/scratch/xvfb-run.ypTVFq’
‘~/tmp/scratch/xvfb-run.zXjfK9’ ‘~/tmp/scratch/xvfb-run.za5OI6’
‘~/tmp/scratch/xvfb-run.zxS9qQ’
‘/dev/shm/sm_segment.gimli1.1001.14f10000.0’
‘/dev/shm/sm_segment.gimli1.1001.31a80000.0’
‘/dev/shm/sm_segment.gimli1.1001.40000.0’
‘/dev/shm/sm_segment.gimli1.1001.601a0000.0’
‘/dev/shm/sm_segment.gimli1.1001.7c420000.0’
‘/dev/shm/sm_segment.gimli1.1001.8ebc0000.0’
‘/dev/shm/sm_segment.gimli1.1001.a2320000.0’
‘/dev/shm/sm_segment.gimli1.1001.d1700000.0’
‘/dev/shm/sm_segment.gimli1.1001.f5610000.0’
‘~/.cache/pocl/uncached/tempfile_AHQUmc’
‘~/.cache/pocl/uncached/tempfile_GIDhAq’
‘~/.cache/pocl/uncached/tempfile_LuLeC1’
‘~/.cache/pocl/uncached/tempfile_cy949M’
‘~/.cache/pocl/uncached/tempfile_iLNVzZ’
‘~/.cache/pocl/uncached/tempfile_pgpZ3G’
‘~/.cache/pocl/uncached/tempfile_rwKbiU’
‘~/.cache/pocl/uncached/tempfile_u3Of7y’
‘~/.cache/pocl/uncached/tempfile_zrlQL3’
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0.1
Check: tests
Result: ERROR
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-realized_duration-35.R
Saving _problems/test-realized_duration-38.R
Saving _problems/test-realized_duration-44.R
Saving _problems/test-realized_duration-47.R
Saving _problems/test-realized_duration-50.R
Saving _problems/test-realized_duration-53.R
Saving _problems/test-realized_duration-56.R
Saving _problems/test-realized_duration-59.R
Saving _problems/test-realized_duration-66.R
Saving _problems/test-realized_duration-69.R
Saving _problems/test-realized_duration-72.R
Saving _problems/test-realized_duration-75.R
Saving _problems/test-realized_duration-78.R
Saving _problems/test-realized_duration-81.R
Saving _problems/test-realized_duration-114.R
Saving _problems/test-realized_duration-117.R
Saving _problems/test-realized_duration-120.R
Saving _problems/test-realized_duration-123.R
Saving _problems/test-realized_duration-133.R
Saving _problems/test-realized_duration-136.R
Saving _problems/test-realized_duration-139.R
Saving _problems/test-realized_duration-142.R
Saving _problems/test-realized_duration-153.R
Saving _problems/test-realized_duration-156.R
Saving _problems/test-realized_duration-159.R
Saving _problems/test-realized_duration-162.R
[ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-paper_compute.R:46:2'): paper_compute works (method = duration) ──
Expected `paper_compute(...)` to equal `res[, c(1, 14:17)]`.
Differences:
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) ───
Expected `paper_compute(...)` to equal `res`.
Differences:
Component "PG_duration": Mean relative difference: 0.06666667
Component "PL_duration": Mean relative difference: 0.06666667
── Failure ('test-portfolio_compute.R:10:2'): portfolio_compute works (arg method) ──
Expected `portfolio_compute(investor, marketprices, method = "duration")` to equal `portfolio_results[, c(1:5, 18:21)]`.
Differences:
Component "RG_duration": Mean relative difference: 0.007344991
Component "RL_duration": Mean relative difference: 0.04026507
Component "PG_duration": Mean relative difference: 0.07414429
── Failure ('test-portfolio_compute.R:11:2'): portfolio_compute works (arg method) ──
Expected `portfolio_compute(investor, marketprices, method = "all")` to equal `portfolio_results`.
Differences:
Component "RG_duration": Mean relative difference: 0.007344991
Component "RL_duration": Mean relative difference: 0.04026507
Component "PG_duration": Mean relative difference: 0.07414429
── Failure ('test-realized_compute.R:73:2'): realized_compute works (method = duration) ──
Expected `dplyr::bind_rows(...)` to equal `res[, c(1, 14:17)]`.
Differences:
Component "RG_duration": Mean relative difference: 0.03448276
Component "RL_duration": Mean relative difference: 0.03448276
Component "PG_duration": Mean relative difference: 0.06666667
Component "PL_duration": Mean relative difference: 0.06666667
── Failure ('test-realized_compute.R:85:2'): realized_compute works (method = all) ──
Expected `dplyr::bind_rows(...)` to equal `res`.
Differences:
Component "RG_duration": Mean relative difference: 0.03448276
Component "RL_duration": Mean relative difference: 0.03448276
Component "PG_duration": Mean relative difference: 0.06666667
Component "PL_duration": Mean relative difference: 0.06666667
── Failure ('test-realized_duration.R:22:2'): realized_duration works (long) ───
Expected `realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`.
Differences:
1/4 mismatches
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:25:2'): realized_duration works (long) ───
Expected `realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`.
Differences:
1/4 mismatches
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:28:2'): realized_duration works (long) ───
Expected `realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 1)
[2] 29 - 28 == 1
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:31:2'): realized_duration works (long) ───
Expected `realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 1)
[1] 29 - 28 == 1
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:34:2'): realized_duration works (long) ───
Expected `realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
1/4 mismatches
[2] 29 - 28 == 1
── Failure ('test-realized_duration.R:37:2'): realized_duration works (long) ───
Expected `realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
1/4 mismatches
[1] 29 - 28 == 1
── Failure ('test-realized_duration.R:43:2'): realized_duration works (short) ──
Expected `realized_duration(...)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`.
Differences:
1/4 mismatches
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:46:2'): realized_duration works (short) ──
Expected `realized_duration(...)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`.
Differences:
1/4 mismatches
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:49:2'): realized_duration works (short) ──
Expected `realized_duration(-2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 1)
[1] 29 - 28 == 1
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:52:2'): realized_duration works (short) ──
Expected `realized_duration(-2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 1)
[2] 29 - 28 == 1
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:55:2'): realized_duration works (short) ──
Expected `realized_duration(-2, 15, 2, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
1/4 mismatches
[1] 29 - 28 == 1
── Failure ('test-realized_duration.R:58:2'): realized_duration works (short) ──
Expected `realized_duration(-2, 10, 2, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
1/4 mismatches
[2] 29 - 28 == 1
── Failure ('test-realized_duration.R:65:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`.
Differences:
1/4 mismatches
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:68:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`.
Differences:
1/4 mismatches
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:71:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 1)
[2] 29 - 28 == 1
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:74:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 1)
[1] 29 - 28 == 1
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:77:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`.
Differences:
1/4 mismatches
[2] 29 - 28 == 1
── Failure ('test-realized_duration.R:80:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`.
Differences:
1/4 mismatches
[1] 29 - 28 == 1
── Failure ('test-realized_duration.R:113: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:116: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:119: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:122: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:132: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:135: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:138: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:141: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: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
Flavor: r-release-macos-arm64
Version: 1.0.1
Check: tests
Result: ERROR
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-realized_duration-35.R
Saving _problems/test-realized_duration-38.R
Saving _problems/test-realized_duration-44.R
Saving _problems/test-realized_duration-47.R
Saving _problems/test-realized_duration-50.R
Saving _problems/test-realized_duration-53.R
Saving _problems/test-realized_duration-56.R
Saving _problems/test-realized_duration-59.R
Saving _problems/test-realized_duration-66.R
Saving _problems/test-realized_duration-69.R
Saving _problems/test-realized_duration-72.R
Saving _problems/test-realized_duration-75.R
Saving _problems/test-realized_duration-78.R
Saving _problems/test-realized_duration-81.R
Saving _problems/test-realized_duration-114.R
Saving _problems/test-realized_duration-117.R
Saving _problems/test-realized_duration-120.R
Saving _problems/test-realized_duration-123.R
Saving _problems/test-realized_duration-133.R
Saving _problems/test-realized_duration-136.R
Saving _problems/test-realized_duration-139.R
Saving _problems/test-realized_duration-142.R
Saving _problems/test-realized_duration-153.R
Saving _problems/test-realized_duration-156.R
Saving _problems/test-realized_duration-159.R
Saving _problems/test-realized_duration-162.R
[ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-paper_compute.R:46:2'): paper_compute works (method = duration) ──
Expected `paper_compute(...)` to equal `res[, c(1, 14:17)]`.
Differences:
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) ───
Expected `paper_compute(...)` to equal `res`.
Differences:
Component "PG_duration": Mean relative difference: 0.1764706
Component "PL_duration": Mean relative difference: 0.1764706
── Failure ('test-portfolio_compute.R:10:2'): portfolio_compute works (arg method) ──
Expected `portfolio_compute(investor, marketprices, method = "duration")` to equal `portfolio_results[, c(1:5, 18:21)]`.
Differences:
Component "PG_duration": Mean relative difference: 0.01597873
── Failure ('test-portfolio_compute.R:11:2'): portfolio_compute works (arg method) ──
Expected `portfolio_compute(investor, marketprices, method = "all")` to equal `portfolio_results`.
Differences:
Component "PG_duration": Mean relative difference: 0.01597873
── Failure ('test-realized_compute.R:73:2'): realized_compute works (method = duration) ──
Expected `dplyr::bind_rows(...)` to equal `res[, c(1, 14:17)]`.
Differences:
Component "RG_duration": Mean relative difference: 0.09677419
Component "RL_duration": Mean relative difference: 0.09677419
Component "PG_duration": Mean relative difference: 0.1764706
Component "PL_duration": Mean relative difference: 0.1764706
── Failure ('test-realized_compute.R:85:2'): realized_compute works (method = all) ──
Expected `dplyr::bind_rows(...)` to equal `res`.
Differences:
Component "RG_duration": Mean relative difference: 0.09677419
Component "RL_duration": Mean relative difference: 0.09677419
Component "PG_duration": Mean relative difference: 0.1764706
Component "PL_duration": Mean relative difference: 0.1764706
── Failure ('test-realized_duration.R:22:2'): realized_duration works (long) ───
Expected `realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`.
Differences:
1/4 mismatches
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:25:2'): realized_duration works (long) ───
Expected `realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`.
Differences:
1/4 mismatches
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:28:2'): realized_duration works (long) ───
Expected `realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 3)
[2] 31 - 28 == 3
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:31:2'): realized_duration works (long) ───
Expected `realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 3)
[1] 31 - 28 == 3
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:34:2'): realized_duration works (long) ───
Expected `realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
1/4 mismatches
[2] 31 - 28 == 3
── Failure ('test-realized_duration.R:37:2'): realized_duration works (long) ───
Expected `realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
1/4 mismatches
[1] 31 - 28 == 3
── Failure ('test-realized_duration.R:43:2'): realized_duration works (short) ──
Expected `realized_duration(...)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`.
Differences:
1/4 mismatches
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:46:2'): realized_duration works (short) ──
Expected `realized_duration(...)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`.
Differences:
1/4 mismatches
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:49:2'): realized_duration works (short) ──
Expected `realized_duration(-2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 3)
[1] 31 - 28 == 3
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:52:2'): realized_duration works (short) ──
Expected `realized_duration(-2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 3)
[2] 31 - 28 == 3
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:55:2'): realized_duration works (short) ──
Expected `realized_duration(-2, 15, 2, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
1/4 mismatches
[1] 31 - 28 == 3
── Failure ('test-realized_duration.R:58:2'): realized_duration works (short) ──
Expected `realized_duration(-2, 10, 2, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`.
Differences:
1/4 mismatches
[2] 31 - 28 == 3
── Failure ('test-realized_duration.R:65:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`.
Differences:
1/4 mismatches
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:68:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`.
Differences:
1/4 mismatches
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:71:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 3)
[2] 31 - 28 == 3
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:74:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`.
Differences:
2/4 mismatches (average diff: 3)
[1] 31 - 28 == 3
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:77:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`.
Differences:
1/4 mismatches
[2] 31 - 28 == 3
── Failure ('test-realized_duration.R:80:2'): realized_duration works (allow_short = FALSE) ──
Expected `realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`.
Differences:
1/4 mismatches
[1] 31 - 28 == 3
── Failure ('test-realized_duration.R:113: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:116: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:119: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:122: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:132: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:135: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:138: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:141: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: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
Flavor: r-release-macos-x86_64
Version: 1.0.1
Check: tests
Result: ERROR
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) ───
paper_compute(...) not equal to `res`.
Component "PG_duration": Mean relative difference: 0.06666667
Component "PL_duration": Mean relative difference: 0.06666667
── Failure ('test-portfolio_compute.R:10:2'): portfolio_compute works (arg method) ──
portfolio_compute(investor, marketprices, method = "duration") not equal to portfolio_results[, c(1:5, 18:21)].
Component "RG_duration": Mean relative difference: 0.007344991
Component "RL_duration": Mean relative difference: 0.04026507
Component "PG_duration": Mean relative difference: 0.07414429
── Failure ('test-portfolio_compute.R:11:2'): portfolio_compute works (arg method) ──
portfolio_compute(investor, marketprices, method = "all") not equal to `portfolio_results`.
Component "RG_duration": Mean relative difference: 0.007344991
Component "RL_duration": Mean relative difference: 0.04026507
Component "PG_duration": Mean relative difference: 0.07414429
── Failure ('test-realized_compute.R:73:2'): realized_compute works (method = duration) ──
dplyr::bind_rows(...) not equal to res[, c(1, 14:17)].
Component "RG_duration": Mean relative difference: 0.03448276
Component "RL_duration": Mean relative difference: 0.03448276
Component "PG_duration": Mean relative difference: 0.06666667
Component "PL_duration": Mean relative difference: 0.06666667
── Failure ('test-realized_compute.R:85:2'): realized_compute works (method = all) ──
dplyr::bind_rows(...) not equal to `res`.
Component "RG_duration": Mean relative difference: 0.03448276
Component "RL_duration": Mean relative difference: 0.03448276
Component "PG_duration": Mean relative difference: 0.06666667
Component "PL_duration": Mean relative difference: 0.06666667
── Failure ('test-realized_duration.R:22:2'): realized_duration works (long) ───
realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff).
1/4 mismatches
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:25:2'): realized_duration works (long) ───
realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0).
1/4 mismatches
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:28:2'): realized_duration works (long) ───
realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
2/4 mismatches (average diff: 1)
[2] 29 - 28 == 1
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:31:2'): realized_duration works (long) ───
realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
2/4 mismatches (average diff: 1)
[1] 29 - 28 == 1
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:34:2'): realized_duration works (long) ───
realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
1/4 mismatches
[2] 29 - 28 == 1
── Failure ('test-realized_duration.R:37:2'): realized_duration works (long) ───
realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
1/4 mismatches
[1] 29 - 28 == 1
── Failure ('test-realized_duration.R:43:2'): realized_duration works (short) ──
realized_duration(...) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0).
1/4 mismatches
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:46:2'): realized_duration works (short) ──
realized_duration(...) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff).
1/4 mismatches
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:49:2'): realized_duration works (short) ──
realized_duration(-2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
2/4 mismatches (average diff: 1)
[1] 29 - 28 == 1
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:52:2'): realized_duration works (short) ──
realized_duration(-2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
2/4 mismatches (average diff: 1)
[2] 29 - 28 == 1
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:55:2'): realized_duration works (short) ──
realized_duration(-2, 15, 2, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
1/4 mismatches
[1] 29 - 28 == 1
── Failure ('test-realized_duration.R:58:2'): realized_duration works (short) ──
realized_duration(-2, 10, 2, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
1/4 mismatches
[2] 29 - 28 == 1
── Failure ('test-realized_duration.R:65:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff).
1/4 mismatches
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:68:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0).
1/4 mismatches
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:71:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...).
2/4 mismatches (average diff: 1)
[2] 29 - 28 == 1
[4] 15 - 14 == 1
── Failure ('test-realized_duration.R:74:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...).
2/4 mismatches (average diff: 1)
[1] 29 - 28 == 1
[3] 15 - 14 == 1
── Failure ('test-realized_duration.R:77:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...).
1/4 mismatches
[2] 29 - 28 == 1
── Failure ('test-realized_duration.R:80:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...).
1/4 mismatches
[1] 29 - 28 == 1
── Failure ('test-realized_duration.R:113: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:116: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:119: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:122: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:132: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:135: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:138: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: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
Flavor: r-oldrel-macos-arm64
Version: 1.0.1
Check: tests
Result: ERROR
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) ───
paper_compute(...) not equal to `res`.
Component "PG_duration": Mean relative difference: 0.1764706
Component "PL_duration": Mean relative difference: 0.1764706
── Failure ('test-portfolio_compute.R:10:2'): portfolio_compute works (arg method) ──
portfolio_compute(investor, marketprices, method = "duration") not equal to portfolio_results[, c(1:5, 18:21)].
Component "PG_duration": Mean relative difference: 0.01597873
── Failure ('test-portfolio_compute.R:11:2'): portfolio_compute works (arg method) ──
portfolio_compute(investor, marketprices, method = "all") not equal to `portfolio_results`.
Component "PG_duration": Mean relative difference: 0.01597873
── Failure ('test-realized_compute.R:73:2'): realized_compute works (method = duration) ──
dplyr::bind_rows(...) not equal to res[, c(1, 14:17)].
Component "RG_duration": Mean relative difference: 0.09677419
Component "RL_duration": Mean relative difference: 0.09677419
Component "PG_duration": Mean relative difference: 0.1764706
Component "PL_duration": Mean relative difference: 0.1764706
── Failure ('test-realized_compute.R:85:2'): realized_compute works (method = all) ──
dplyr::bind_rows(...) not equal to `res`.
Component "RG_duration": Mean relative difference: 0.09677419
Component "RL_duration": Mean relative difference: 0.09677419
Component "PG_duration": Mean relative difference: 0.1764706
Component "PL_duration": Mean relative difference: 0.1764706
── Failure ('test-realized_duration.R:22:2'): realized_duration works (long) ───
realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff).
1/4 mismatches
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:25:2'): realized_duration works (long) ───
realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0).
1/4 mismatches
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:28:2'): realized_duration works (long) ───
realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
2/4 mismatches (average diff: 3)
[2] 31 - 28 == 3
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:31:2'): realized_duration works (long) ───
realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
2/4 mismatches (average diff: 3)
[1] 31 - 28 == 3
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:34:2'): realized_duration works (long) ───
realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
1/4 mismatches
[2] 31 - 28 == 3
── Failure ('test-realized_duration.R:37:2'): realized_duration works (long) ───
realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
1/4 mismatches
[1] 31 - 28 == 3
── Failure ('test-realized_duration.R:43:2'): realized_duration works (short) ──
realized_duration(...) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0).
1/4 mismatches
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:46:2'): realized_duration works (short) ──
realized_duration(...) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff).
1/4 mismatches
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:49:2'): realized_duration works (short) ──
realized_duration(-2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
2/4 mismatches (average diff: 3)
[1] 31 - 28 == 3
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:52:2'): realized_duration works (short) ──
realized_duration(-2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
2/4 mismatches (average diff: 3)
[2] 31 - 28 == 3
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:55:2'): realized_duration works (short) ──
realized_duration(-2, 15, 2, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
1/4 mismatches
[1] 31 - 28 == 3
── Failure ('test-realized_duration.R:58:2'): realized_duration works (short) ──
realized_duration(-2, 10, 2, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...).
1/4 mismatches
[2] 31 - 28 == 3
── Failure ('test-realized_duration.R:65:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff).
1/4 mismatches
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:68:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0).
1/4 mismatches
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:71:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...).
2/4 mismatches (average diff: 3)
[2] 31 - 28 == 3
[4] 17 - 14 == 3
── Failure ('test-realized_duration.R:74:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...).
2/4 mismatches (average diff: 3)
[1] 31 - 28 == 3
[3] 17 - 14 == 3
── Failure ('test-realized_duration.R:77:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...).
1/4 mismatches
[2] 31 - 28 == 3
── Failure ('test-realized_duration.R:80:2'): realized_duration works (allow_short = FALSE) ──
realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...).
1/4 mismatches
[1] 31 - 28 == 3
── Failure ('test-realized_duration.R:113: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:116: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:119: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:122: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:132: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:135: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:138: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: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
Flavor: r-oldrel-macos-x86_64