140 Commits

Author SHA1 Message Date
Mike Reiche
4c34487149 Revert disabling earnings test 2024-01-09 08:50:00 +01:00
Mike Reiche
15321bd097 Merge remote-tracking branch 'yfinance/main' into bugfix/data-types-2 2024-01-09 08:42:43 +01:00
Value Raider
61c4696c65 Add new data to README, remove deprecated stuff, fix tests, v0.2.35
Ticker.recommendations*:
- add to README
- organise their unit tests
- remove redundant recommendations_history

Remove deprecated arguments from Ticker.history

Fix 'bad symbol' behaviour & tests
Fix some prices tests

Bump version 0.2.35
2024-01-07 00:33:59 +00:00
ValueRaider
49d8dfd544 Merge pull request #1815 from ranaroussi/dev
sync dev -> main
2024-01-06 16:18:20 +00:00
Value Raider
9021fe52b4 Fix _get_ticker_tz() args, were being swapped. Improve its unit test 2023-12-17 18:35:29 +00:00
Unit
24f53e935d added calendar events
added events from calendarEvents module
returning data is dict
test upgraded and passed
2023-12-16 13:35:04 +01:00
ValueRaider
a6790606ef Merge pull request #1774 from coskos-ops/fix/complementaryinfo
Fixed incorrect code for ticker complementary info retrieval
2023-12-14 17:57:26 +00:00
ValueRaider
a914647fa4 Merge pull request #1772 from JuliaLWang8/feat/holders-insiders
Feat/Holders insider data
2023-12-13 22:13:24 +00:00
Julia L. Wang
dc957eeb0e Implementation of holders data 2023-12-13 16:57:13 -05:00
ValueRaider
f8d65d0def Merge pull request #1773 from bot-unit/feature/upgrades_downgrades
add upgrades downgrades
2023-12-13 20:59:58 +00:00
Vishnu Akundi
4a5616d5c4 Added Fix and Unit Test for Issue 2023-12-12 11:29:58 -05:00
Filip Kostic
8fdf53233f Fixed issue #1305. Added test case to test for trailingPegInfo statistic retrieval 2023-12-10 17:54:08 -05:00
Unit
4175885747 add upgrades downgrades
add upgrades/downgrades (recommendations history)
return data is pandas dataframe
add test for upgrades/downgrades data
2023-12-10 22:35:53 +01:00
ValueRaider
580502941a Merge pull request #1766 from JuliaLWang8/pandas-future-proofing
Pandas future proofing
2023-12-10 20:33:46 +00:00
ValueRaider
c60e590bd7 Merge pull request #1768 from ranaroussi/fix/price-repair-and-tests
Minor fixes for price repair and related tests
2023-12-09 21:45:25 +00:00
Value Raider
f7825c1c3a Minor fixes for price repair and related tests
Minor fixes for price repair and related tests:
- update out-of-date test, remove delisted ticker
- fix Numpy type mismatch error
2023-12-09 19:40:20 +00:00
Marco Carvalho
fb2006b814 add ruff 2023-12-09 13:18:35 +00:00
Julia L. Wang
9b9158050a Pandas future proofing (tested)
Changed fillna, iloc, and added test changes
2023-12-08 04:26:04 -05:00
Unit
a3ac9fc72d added recommendations
added valid modules for quote summary request
added _fetch method for fetching quote summary
added fetch recommendationTrend
2023-12-02 15:46:17 +01:00
ValueRaider
af9a356fd5 Merge pull request #1745 from ranaroussi/main
sync main -> dev
2023-11-19 11:10:03 +00:00
ValueRaider
4d4e56cdc8 Merge pull request #1657 from ranaroussi/feature/cookie-and-crumb
Add cookie & crumb to requests
2023-11-18 12:54:24 +00:00
Value Raider
4466e57b95 Add cookie & crumb to requests
Add cookie & crumb to requests. Involves several changes:
- fetch cookie & crumb, obviously.
- two different cookie strategies - one seems to work better in USA, other better outside.
- yfinance auto-detects if one strategy fails, and switches to other strategy.
- cookie is stored in persistent cache folder, alongside timezones. Refetched after 24 hours.

To have this work well with multithreading (yfinance.download()) requires more changes:
- all threads share the same cookie, therefore the same session object. Requires thread-safety ...
- converted data class to a singleton with "SingletonMeta":
 - the first init() call initialises data.
 - but successive calls update its session object - naughty but necessary.
- thread locks to avoid deadlocks and race conditions.
2023-11-13 19:35:12 +00:00
Value Raider
b696add360 Restore 'earnings_dates' unit tests 2023-11-09 20:18:32 +00:00
Mike Reiche
ba3c1b5ac6 Merge remote-tracking branch 'yfinance/dev' into bugfix/data-types-2
# Conflicts:
#	yfinance/base.py
2023-10-21 12:44:39 +02:00
Mike Reiche
ba977a16a2 Added tests 2023-10-12 08:53:16 +02:00
rickturner2001
4c1669ad9d Refactored tests for Ticker with proxy
Ticker proxy refactor
2023-10-01 21:08:49 -04:00
ValueRaider
38f8ccd40a Merge pull request #1709 from ranaroussi/feature/tz-cache-lazy-load
Feature/tz cache lazy load
2023-10-01 22:39:19 +01:00
Value Raider
cc1ac7bbcc Fix cache on read-only filesystem, + tests 2023-10-01 21:17:59 +01:00
rickturner2001
75449fd0ac Merge branch 'dev' into fix-testing 2023-10-01 15:08:12 -04:00
rickturner2001
bd52326091 Fix testing: Fixed broken tests and refactored code 2023-09-30 18:23:03 -04:00
Value Raider
62b2c25da8 Disable broken Ticker tests 2023-09-27 21:45:46 +01:00
Value Raider
7618dda5d0 Hopefully fix TZ cache exception blocking import
Hopefully fix TZ cache exception blocking import. Also:
- relocate cache init lock
- add test for setTzCacheLocation()
2023-09-27 21:34:59 +01:00
Value Raider
fad21dfeac Enhance testing - use new cache folder 2023-09-23 13:41:59 +01:00
Value Raider
d3dfb4c6a8 Fix merging events with intraday prices
If Yahoo returns intraday price data with dividend or stock-split event in future, then this broke the merge.
Fix is to discard out-of-range events.
Assumes that if user requesting intraday then they aren't interested in events.
2023-09-19 19:35:03 +01:00
ValueRaider
c9dd582dd8 Merge branch 'main' into dev 2023-08-13 12:40:11 +01:00
Value Raider
4f9b05a546 Fix price repair: 100x & calibration
Price repair fixes and improvement

Fixes:
- fix reconstruction mis-calibration with tiny DataFrames
- fix detecting last-active-trading-interval when NaNs in DataFrame
- redesign mapping 100x signals to ranges:
  - no change for signals before last-active-trading-interval
  - but for signals after last-active-trading-interval, process in reverse order

Improvements:
- increase max reconstruction depth from 1 to 2. E.g. now 1wk can be repaired with 1h (1wk->1d->1h)
2023-08-13 10:54:57 +01:00
ValueRaider
1a97c22874 Merge pull request #1635 from ranaroussi/hotfix/prices-events-merge
Fix merging 1d-prices with out-of-range divs/splits
2023-08-03 21:20:29 +01:00
Value Raider
cc87608824 Fix multithread error 'tz already in cache' 2023-08-02 19:29:06 +01:00
ValueRaider
e8fdd12cb1 Merge branch 'dev' into feature/price-repair-improvements 2023-07-31 18:30:00 +01:00
ValueRaider
d0b2070036 Fix merging 1d-prices with out-of-range divs/splits 2023-07-23 15:20:57 +01:00
ValueRaider
4a1e1c4447 Merge branch 'dev' into feature/price-repair-improvements 2023-07-22 20:34:56 +01:00
ValueRaider
6a613eb114 Improve price repair
Several improvements to price repair

Repair 100x and split errors:
- Handle stocks that recently suspended - use latest ACTIVE trading as baseline
- Improve error identification:
  - Restrict repair to no older than 1 year before oldest split
  - To reduce false positives when checking for multiday split errors,
    only analyse 'Open' and 'Close' and use average change instead of nearest-to-1
  - For weekly intervals reduce threshold to 3x standard deviation (5x was too high),
    and for monthly increase to 6x
  - For multiday intervas, if errors only detected in 1 column then assume false positive => ignore

Repair missing div-adjust:
- Fix repair of multiday intervals containing dividend

Price reconstruction:
- Move to after repairing 100x and split errors, so calibration works properly
- Fix maximum depth and reduce to 1
- Restrict calibration to 'Open' and 'Close', because 'Low' and 'High' can differ significantly between e.g. 1d and day-of-1h

Miscellaneous:
- Deprecate repair='silent', the logging module handles this
- Improve tests for 100x and split errors
- New test for 'repair missing div adjust'
2023-07-22 15:09:38 +01:00
Ricardo Prins
0503240973 Adjust PEP 8 + minor improvements + f-strings 2023-07-21 20:33:47 -06:00
Ricardo Prins
aa9a0286a1 Add missing comment to test_dailyWithEvents 2023-07-21 14:25:46 -06:00
Ricardo Prins
a2bde88c36 Adjust PEP 8 + minor improvement 2023-07-20 22:44:36 -06:00
ValueRaider
056b84d8fe Merge branch 'main' into hotfix/proxy 2023-07-17 18:29:04 +01:00
ValueRaider
61c89660df Optimise info fetch, improve test 2023-07-14 15:29:55 +01:00
ValueRaider
1ce9ce2784 Fix financials ; Remove broken decryption & scraping 2023-06-21 14:49:16 +01:00
ValueRaider
27ea9472c1 Price repair improvements
Improve split-repair of multi-day intervals. Because split error can occur within a multi-day interval, e.g. mid-way through week, need to repair each OHLC column separately

Increase robustness of repair 'Adj Close'

Limit price-repair recursion depth to 2
2023-06-20 17:37:19 +01:00
ValueRaider
9e21b85043 Merge branch 'dev' into feature/fix-Yahoo-bad-div-split-adjustments 2023-06-17 12:49:01 +01:00