Skip to content

Commit caf29f7

Browse files
authored
Merge pull request #3016 from ranaroussi/dev
sync dev -> main
2 parents 107598a + b339c4e commit caf29f7

37 files changed

Lines changed: 2984 additions & 529 deletions

‎doc/source/advanced/price_repair.rst‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,28 @@ Requires date range include 1 day after stock split for calibration - sometimes
4545

4646
..
4747
48+
Unexplained split-like adjustment
49+
---------------------------------
50+
51+
Sometimes Yahoo multiplies all prices before a date by a split-like ratio, and divides Volume by it, but no split happened near that date.
52+
The ratio need not match any split, and can't be measured from ``1d`` data because the real price change across that date is unknown.
53+
So it is measured against ``1h`` data, which does not have the error, then repaired like a bad stock split.
54+
So only repaired within the last 2 years. A genuine crash is also in ``1h`` data, so is not repaired.
55+
56+
.. code-block:: text
57+
58+
# SOXS ORIGINAL:
59+
Close Volume
60+
2026-05-21 00:00:00-04:00 1243.500000 1714514
61+
2026-05-22 00:00:00-04:00 1159.500000 1883589
62+
2026-05-26 00:00:00-04:00 62.900002 40368300
63+
64+
# SOXS REPAIRED:
65+
Close Volume
66+
2026-05-21 00:00:00-04:00 82.900000 25717710
67+
2026-05-22 00:00:00-04:00 77.300000 28253835
68+
2026-05-26 00:00:00-04:00 62.900002 40368300
69+
4870
Missing data
4971
------------
5072

‎doc/source/reference/examples/tickers.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,12 @@
77
tickers.tickers['AAPL'].history(period="1mo")
88
tickers.tickers['GOOG'].actions
99

10+
# fetch an attribute for all tickers at once, in parallel
11+
tickers.info # dict: symbol -> info dict
12+
tickers.calendar # DataFrame: one row per ticker
13+
14+
# fewer threads are gentler on Yahoo's rate limit
15+
tickers.get_info(threads=2, progress=True)
16+
1017
# websocket
1118
tickers.live()

‎meta.yaml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ requirements:
2020
- pandas >=1.3.0
2121
- numpy >=1.16.5
2222
- requests >=2.31
23-
- multitasking >=0.0.7
2423
- lxml >=4.9.1
2524
- platformdirs >=2.0.0
2625
- pytz >=2022.5
@@ -36,7 +35,6 @@ requirements:
3635
- pandas >=1.3.0
3736
- numpy >=1.16.5
3837
- requests >=2.31
39-
- multitasking >=0.0.7
4038
- lxml >=4.9.1
4139
- platformdirs >=2.0.0
4240
- pytz >=2022.5

‎pyproject.toml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ dependencies = [
3636
# curl_cffi 0.17: security updates
3737
"curl_cffi>=0.17",
3838
"lxml>=4.9.0",
39-
"multitasking>=0.0.7",
4039
"numpy>=1.16.5",
4140
"pandas>=1.3.0",
4241
"peewee>=3.16.2",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Date,Open,High,Low,Close,Adj Close,Volume,Dividends,Stock Splits
2+
2025-09-15 00:00:00-04:00,962.5,984.2999877929688,851.5,962.5,962.5,9864,0.0,0.0
3+
2025-09-16 00:00:00-04:00,939.0,1006.25,908.4500122070312,916.0,916.0,4226,0.0,0.0
4+
2025-09-17 00:00:00-04:00,951.0,1030.0,873.0,873.5,873.5,7068,0.0,0.0
5+
2025-09-18 00:00:00-04:00,877.0,908.4500122070312,862.0,876.75,876.75,1800,0.0,0.0
6+
2025-09-19 00:00:00-04:00,875.0,993.9500122070312,863.5,981.5,981.5,7394,0.0,0.0
7+
2025-09-22 00:00:00-04:00,975.0,981.0,886.0,927.5,927.5,4764,0.0,0.0
8+
2025-09-23 00:00:00-04:00,914.0,934.5499877929688,818.0,845.0,845.0,4298,0.0,0.0
9+
2025-09-24 00:00:00-04:00,853.5,968.5,825.5,956.75,956.75,5522,0.0,0.0
10+
2025-09-25 00:00:00-04:00,951.0,988.5,906.0,911.0,911.0,3356,0.0,0.0
11+
2025-09-26 00:00:00-04:00,945.0,974.0,917.0,952.5,952.5,7912,0.0,0.0
12+
2025-09-29 00:00:00-04:00,73.5,123.0,55.0,102.25,102.25,725780,0.0,0.0
13+
2025-09-30 00:00:00-04:00,89.0,97.5,75.0,76.5,76.5,98206,0.0,0.0
14+
2025-10-01 00:00:00-04:00,73.0,74.0,63.0,68.0,68.0,61912,0.0,0.0
15+
2025-10-02 00:00:00-04:00,69.5,77.0,68.5,77.0,77.0,33010,0.0,0.0
16+
2025-10-03 00:00:00-04:00,75.5,84.5,74.5,77.0,77.0,32826,0.0,0.0
17+
2025-10-06 00:00:00-04:00,77.5,80.5,75.5,76.0,76.0,18682,0.0,0.0
18+
2025-10-07 00:00:00-04:00,75.0,84.0,75.0,82.0,82.0,23032,0.0,0.0
19+
2025-10-08 00:00:00-04:00,81.5,85.0,78.0,78.5,78.5,15068,0.0,0.0
20+
2025-10-09 00:00:00-04:00,80.0,80.0,75.5,77.5,77.5,8502,0.0,0.0
21+
2025-10-10 00:00:00-04:00,77.5,77.5,70.0,71.5,71.5,16670,0.0,0.0

‎tests/data/KALA-1h-no-bad-level-shift.csv‎

Lines changed: 141 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Date,Open,High,Low,Close,Adj Close,Volume,Dividends,Stock Splits
2+
2026-08-21 00:00:00-04:00,15.0000005960464,15.2500003576279,13.7500002980232,13.7500002980232,13.7500002980232,51560,0,0
3+
2026-08-24 00:00:00-04:00,13.5000005364418,14.2000004649162,12.5,13.7500002980232,13.7500002980232,109708,0,0
4+
2026-08-25 00:00:00-04:00,13.7999996542931,14.3999993801117,13.5000005364418,14.3500000238419,14.3500000238419,29418,0,0
5+
2026-08-26 00:00:00-04:00,14.1000002622604,14.7499993443489,13.7999996542931,14.4500002264977,14.4500002264977,39334,0,0
6+
2026-08-27 00:00:00-04:00,14.2499998211861,15.4499992728233,14.0000000596046,15.2500003576279,15.2500003576279,55160,0,0
7+
2026-08-28 00:00:00-04:00,15.0999993085861,15.5000001192093,14.1499996185303,14.6500006318092,14.6500006318092,28030,0,0
8+
2026-08-31 00:00:00-04:00,14.4999995827675,15.0000005960464,14.2499998211861,14.4999995827675,14.4999995827675,40982,0,0
9+
2026-09-01 00:00:00-04:00,14.6999999880791,15.0000005960464,14.1000002622604,14.3500000238419,14.3500000238419,24742,0,0
10+
2026-09-02 00:00:00-04:00,14.4999995827675,14.6999999880791,13.6000007390976,13.7999996542931,13.7999996542931,27898,0,0
11+
2026-09-03 00:00:00-04:00,14.2499998211861,14.3999993801117,13.7999996542931,13.9500007033348,13.9500007033348,30248,0,0
12+
2026-09-04 00:00:00-04:00,14.1000002622604,14.3999993801117,13.6500000953674,13.6999994516373,13.6999994516373,26572,0,0
13+
2026-09-08 00:00:00-04:00,14.0000000596046,14.0499994158745,12.8499999642372,12.8999993205071,12.8999993205071,46142,0,0
14+
2026-09-09 00:00:00-04:00,12.9999995231628,13.7500002980232,11.2499997019768,13.6500000953674,13.6500000953674,108008,0,0
15+
2026-09-11 00:00:00-04:00,16.5000006556511,16.5000006556511,16.5000006556511,16.5000006556511,16.5000006556511,0,0,0
16+
2026-09-14 00:00:00-04:00,,,,,,0,0,0.02
17+
2026-09-15 00:00:00-04:00,13.6899995803833,14.460000038147,12.7299995422363,12.7700004577637,12.7700004577637,510600,0,0
18+
2026-09-16 00:00:00-04:00,12.8000001907349,13.4899997711182,12.1400003433228,12.5100002288818,12.5100002288818,489200,0,0
19+
2026-09-17 00:00:00-04:00,12.6300001144409,13.0249996185303,12.085000038147,12.4099998474121,12.4099998474121,461700,0,0
20+
2026-09-18 00:00:00-04:00,12.2299995422363,12.7370004653931,12.0530004501343,12.2200002670288,12.2200002670288,388400,0,0
21+
2026-09-21 00:00:00-04:00,12.0803003311157,12.1499996185303,11.4200000762939,11.7200002670288,11.7200002670288,220724,0,0
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Date,Open,High,Low,Close,Adj Close,Volume,Dividends,Stock Splits
2+
2026-08-21 00:00:00-04:00,0.30000001192092896,0.3050000071525574,0.2750000059604645,0.2750000059604645,0.2750000059604645,2578000,0.0,0.0
3+
2026-08-24 00:00:00-04:00,0.27000001072883606,0.2840000092983246,0.25,0.2750000059604645,0.2750000059604645,5485400,0.0,0.0
4+
2026-08-25 00:00:00-04:00,0.2759999930858612,0.2879999876022339,0.27000001072883606,0.28700000047683716,0.28700000047683716,1470900,0.0,0.0
5+
2026-08-26 00:00:00-04:00,0.28200000524520874,0.29499998688697815,0.2759999930858612,0.289000004529953,0.289000004529953,1966700,0.0,0.0
6+
2026-08-27 00:00:00-04:00,0.2849999964237213,0.3089999854564667,0.2800000011920929,0.3050000071525574,0.3050000071525574,2758000,0.0,0.0
7+
2026-08-28 00:00:00-04:00,0.3019999861717224,0.3100000023841858,0.28299999237060547,0.2930000126361847,0.2930000126361847,1401500,0.0,0.0
8+
2026-08-31 00:00:00-04:00,0.28999999165534973,0.30000001192092896,0.2849999964237213,0.28999999165534973,0.28999999165534973,2049100,0.0,0.0
9+
2026-09-01 00:00:00-04:00,0.2939999997615814,0.30000001192092896,0.28200000524520874,0.28700000047683716,0.28700000047683716,1237100,0.0,0.0
10+
2026-09-02 00:00:00-04:00,0.28999999165534973,0.2939999997615814,0.2720000147819519,0.2759999930858612,0.2759999930858612,1394900,0.0,0.0
11+
2026-09-03 00:00:00-04:00,0.2849999964237213,0.2879999876022339,0.2759999930858612,0.27900001406669617,0.27900001406669617,1512400,0.0,0.0
12+
2026-09-04 00:00:00-04:00,0.28200000524520874,0.2879999876022339,0.27300000190734863,0.27399998903274536,0.27399998903274536,1328600,0.0,0.0
13+
2026-09-08 00:00:00-04:00,0.2800000011920929,0.2809999883174896,0.25699999928474426,0.257999986410141,0.257999986410141,2307100,0.0,0.0
14+
2026-09-09 00:00:00-04:00,0.25999999046325684,0.2750000059604645,0.22499999403953552,0.27300000190734863,0.27300000190734863,5400400,0.0,0.0
15+
2026-09-11 00:00:00-04:00,0.33000001311302185,0.33000001311302185,0.33000001311302185,0.33000001311302185,0.33000001311302185,0,0.0,0.0
16+
2026-09-14 00:00:00-04:00,,,,,,0,0.0,0.02
17+
2026-09-15 00:00:00-04:00,13.6899995803833,14.460000038146973,12.729999542236328,12.770000457763672,12.770000457763672,510600,0.0,0.0
18+
2026-09-16 00:00:00-04:00,12.800000190734863,13.489999771118164,12.140000343322754,12.510000228881836,12.510000228881836,489200,0.0,0.0
19+
2026-09-17 00:00:00-04:00,12.630000114440918,13.024999618530273,12.085000038146973,12.40999984741211,12.40999984741211,461700,0.0,0.0
20+
2026-09-18 00:00:00-04:00,12.229999542236328,12.737000465393066,12.053000450134277,12.220000267028809,12.220000267028809,388400,0.0,0.0
21+
2026-09-21 00:00:00-04:00,12.080300331115723,12.149999618530273,11.420000076293945,11.720000267028809,11.720000267028809,220724,0.0,0.0
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Date,Open,High,Low,Close,Adj Close,Volume,Dividends,Stock Splits,Capital Gains,Repaired?
2+
2026-05-11 00:00:00-04:00,86.5,87.7,81.5,82.0,80.05546875,30072405,0.0,0.0,0.0,True
3+
2026-05-12 00:00:00-04:00,87.5,99.1,85.5,89.5,87.3776123046875,51990390,0.0,0.0,0.0,True
4+
2026-05-13 00:00:00-04:00,83.8,89.8,81.4,83.5,81.5198974609375,35608395,0.0,0.0,0.0,True
5+
2026-05-14 00:00:00-04:00,84.3,86.3,81.2,82.7,80.7388671875,25492320,0.0,0.0,0.0,True
6+
2026-05-15 00:00:00-04:00,91.3,93.9,88.0,92.3,90.11121419270833,40280955,0.0,0.0,0.0,True
7+
2026-05-18 00:00:00-04:00,87.7,104.7,86.8,99.5,97.14047037760416,41146485,0.0,0.0,0.0,True
8+
2026-05-19 00:00:00-04:00,106.4,110.7,93.7,99.3,96.94521484375,53918775,0.0,0.0,0.0,True
9+
2026-05-20 00:00:00-04:00,93.0,93.5,85.1,85.4,83.37484537760416,28284345,0.0,0.0,0.0,True
10+
2026-05-21 00:00:00-04:00,86.5,87.8,82.1,82.9,80.93412272135417,25717710,0.0,0.0,0.0,True
11+
2026-05-22 00:00:00-04:00,80.0,80.6,75.0,77.3,75.4669189453125,28253835,0.0,0.0,0.0,True
12+
2026-05-26 00:00:00-04:00,69.0,69.5,61.900001525878906,62.900001525878906,61.40840148925781,40368300,0.0,0.0,0.0,False
13+
2026-05-27 00:00:00-04:00,58.29999923706055,69.0999984741211,58.29999923706055,65.30000305175781,63.75149154663086,53730730,0.0,0.0,0.0,False
14+
2026-05-28 00:00:00-04:00,64.9000015258789,68.30000305175781,61.0,63.099998474121094,61.60365676879883,35310780,0.0,0.0,0.0,False
15+
2026-05-29 00:00:00-04:00,61.099998474121094,64.9000015258789,59.099998474121094,63.29999923706055,61.79891586303711,30771930,0.0,0.0,0.0,False
16+
2026-06-01 00:00:00-04:00,65.5,67.4000015258789,60.5,62.599998474121094,61.11551284790039,33069110,0.0,0.0,0.0,False
17+
2026-06-02 00:00:00-04:00,58.0,59.29999923706055,51.5,51.70000076293945,50.473995208740234,48050000,0.0,0.0,0.0,False
18+
2026-06-03 00:00:00-04:00,48.79999923706055,53.5,48.20000076293945,49.099998474121094,47.93565368652344,63441940,0.0,0.0,0.0,False
19+
2026-06-04 00:00:00-04:00,55.70000076293945,58.099998474121094,50.0,52.0,50.766883850097656,66575950,0.0,0.0,0.0,False
20+
2026-06-05 00:00:00-04:00,58.599998474121094,68.5,57.900001525878906,68.4000015258789,66.7779769897461,97269150,0.0,0.0,0.0,False
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Date,Open,High,Low,Close,Adj Close,Volume,Dividends,Stock Splits,Capital Gains
2+
2026-05-11 00:00:00-04:00,1297.5,1315.5,1222.5,1230.0,1200.83203125,2004827,0.0,0.0,0.0
3+
2026-05-12 00:00:00-04:00,1312.5,1486.5,1282.5,1342.5,1310.6641845703125,3466026,0.0,0.0,0.0
4+
2026-05-13 00:00:00-04:00,1257.0,1347.0,1221.0,1252.5,1222.7984619140625,2373893,0.0,0.0,0.0
5+
2026-05-14 00:00:00-04:00,1264.5,1294.5,1218.0,1240.5,1211.0830078125,1699488,0.0,0.0,0.0
6+
2026-05-15 00:00:00-04:00,1369.5,1408.5,1320.0,1384.5,1351.668212890625,2685397,0.0,0.0,0.0
7+
2026-05-18 00:00:00-04:00,1315.5,1570.5,1302.0,1492.5,1457.1070556640625,2743099,0.0,0.0,0.0
8+
2026-05-19 00:00:00-04:00,1596.0,1660.5,1405.5,1489.5,1454.17822265625,3594585,0.0,0.0,0.0
9+
2026-05-20 00:00:00-04:00,1395.0,1402.5,1276.5,1281.0,1250.6226806640625,1885623,0.0,0.0,0.0
10+
2026-05-21 00:00:00-04:00,1297.5,1317.0,1231.5,1243.5,1214.0118408203125,1714514,0.0,0.0,0.0
11+
2026-05-22 00:00:00-04:00,1200.0,1209.0,1125.0,1159.5,1132.0037841796875,1883589,0.0,0.0,0.0
12+
2026-05-26 00:00:00-04:00,69.0,69.5,61.900001525878906,62.900001525878906,61.40840148925781,40368300,0.0,0.0,0.0
13+
2026-05-27 00:00:00-04:00,58.29999923706055,69.0999984741211,58.29999923706055,65.30000305175781,63.75149154663086,53730730,0.0,0.0,0.0
14+
2026-05-28 00:00:00-04:00,64.9000015258789,68.30000305175781,61.0,63.099998474121094,61.60365676879883,35310780,0.0,0.0,0.0
15+
2026-05-29 00:00:00-04:00,61.099998474121094,64.9000015258789,59.099998474121094,63.29999923706055,61.79891586303711,30771930,0.0,0.0,0.0
16+
2026-06-01 00:00:00-04:00,65.5,67.4000015258789,60.5,62.599998474121094,61.11551284790039,33069110,0.0,0.0,0.0
17+
2026-06-02 00:00:00-04:00,58.0,59.29999923706055,51.5,51.70000076293945,50.473995208740234,48050000,0.0,0.0,0.0
18+
2026-06-03 00:00:00-04:00,48.79999923706055,53.5,48.20000076293945,49.099998474121094,47.93565368652344,63441940,0.0,0.0,0.0
19+
2026-06-04 00:00:00-04:00,55.70000076293945,58.099998474121094,50.0,52.0,50.766883850097656,66575950,0.0,0.0,0.0
20+
2026-06-05 00:00:00-04:00,58.599998474121094,68.5,57.900001525878906,68.4000015258789,66.7779769897461,97269150,0.0,0.0,0.0

0 commit comments

Comments
 (0)