Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync dev -> main #2034

Merged
merged 29 commits into from
Aug 22, 2024
Merged

sync dev -> main #2034

merged 29 commits into from
Aug 22, 2024

Conversation

ValueRaider and others added 26 commits July 19, 2024 16:07
Signed-off-by: Steven Bischoff <[email protected]>
Remove erroneous print statement
Fix error on empty options chain
using .get() is safer than [key] and allows effective way to return non-None variable
use dict.get() to safely access key in Holders
Tidy messages sent to logging.INFO
Use logging's 'extra' argument to make YF log formatting programmatic.
Reclassify some YF price-repair log messages, so that repairs (or repair fails) are level INFO.
…-and-logging

Prices: improve exceptions and logging
- return empty set rather than raising an exception
Handle faulty response object when getting news.
Solution that checks the offset of the opening time of the stock exchange (mod 30 minutes) and adds it to the quotes
The new dividend repair logic looks for too big/small dividends/adjusts.
Because it analyses prices, it needs prices to be consistent - this means
for some exchanges, prices are converted to major currency e.g. pence -> £.
These exchanges are: .L, .TA, .JO
Also, multiday intervals are created by resampling adjusted 1d intervals.

Related change:
- _fix_prices_sudden_change() now fixes dividends with prices

Other repair fixes:
- add basic repair function to fix_Yahoo_returning_live_separate() to handle simple 100x price errors within same week/month
- fix _fix_prices_sudden_change() false positive on real massive price drop (clue = massive volume spike)
- price reconstruct fixes:
  - calibration: stop NaNs breaking, and detect currency unit mixup
  - fix a Pandas warning
Fix detecting div_adj_exceeds_prices.
Fine-tune fixing div_too_big.
Unit tests.
@ValueRaider ValueRaider changed the title dev -> main sync dev -> main Aug 22, 2024
@ValueRaider ValueRaider marked this pull request as ready for review August 22, 2024 15:12
@ValueRaider ValueRaider merged commit 0193cec into main Aug 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants