Skip to content

Commit

Permalink
Improve dividend repair
Browse files Browse the repository at this point in the history
Improve dividend repair:
- detect wrong date
- detect split missing from coincident dividend
- improve detecting adjust contradicting price action
- improve detecting when Close has adjustment
  (remove phantoms before, then use AdjClose -> AdjLow deltas)

Stop negative 'Adj Close' triggering a 'sudden change' repair.
  • Loading branch information
ValueRaider committed Sep 29, 2024
1 parent 1890ff2 commit 3deab3c
Show file tree
Hide file tree
Showing 16 changed files with 6,309 additions and 4,006 deletions.
668 changes: 668 additions & 0 deletions tests/data/4063-T-1d-bad-div-fixed.csv

Large diffs are not rendered by default.

668 changes: 668 additions & 0 deletions tests/data/4063-T-1d-bad-div.csv

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions tests/data/AET-L-1d-100x-error-fixed.csv
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Date,Open,High,Low,Close,Adj Close,Volume,Dividends,Stock Splits
2022-06-06 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-06-01 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-31 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-30 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-27 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-26 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-25 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-24 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-23 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-20 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-19 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,0,0,0
2022-05-18 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,532454,0,0
2022-05-17 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,0,0,0
2022-05-16 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,0,0,0
2022-05-13 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,0,0,0
2022-05-12 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,0,0,0
2022-05-11 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,0,0,0
2022-05-10 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,0,0,0
2022-05-09 00:00:00+01:00,0.1455,0.1455,0.1455,0.1455,0.1455,0,0,0
2022-05-06 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-05 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-04 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-05-03 00:00:00+01:00,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0.145500004291534,0,0,0
2022-06-06 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-06-01 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-31 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-30 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-27 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-26 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-25 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-24 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-23 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-20 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-19 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,0,0,0
2022-05-18 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,532454,0,0
2022-05-17 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,0,0,0
2022-05-16 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,0,0,0
2022-05-13 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,0,0,0
2022-05-12 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,0,0,0
2022-05-11 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,0,0,0
2022-05-10 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,0,0,0
2022-05-09 00:00:00+01:00,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,14.5500001907349,0,0,0
2022-05-06 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-05 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-04 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
2022-05-03 00:00:00+01:00,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,14.5500004291534,0,0,0
25 changes: 0 additions & 25 deletions tests/data/AET-L-1wk-100x-error-fixed.csv.old

This file was deleted.

25 changes: 0 additions & 25 deletions tests/data/AET-L-1wk-100x-error.csv.old

This file was deleted.

Loading

0 comments on commit 3deab3c

Please sign in to comment.