Commit Graph

647 Commits (main)

Author SHA1 Message Date
Value Raider 0713d93867 Bump version to 0.2.28 2023-08-13 13:05:02 +01:00
Value Raider 67e81a8f9a Fix TypeError: 'FastInfo' object is not callable #1636 2023-08-13 13:01:53 +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
Value Raider 93a7ee6161 Fix circular import in utils.py
Commit a4d7d6 introduced a circular import into utils.py
2023-08-05 12:54:12 +01:00
Value Raider 5b0cb60cf5 Bump version to 0.2.27 2023-08-03 21:24:07 +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
Value Raider 93b6e024da Improve bad-split-repair on multiday intervals
Improve bad-split-repair on multiday intervals
Switch some repair log msgs from warning -> info
2023-07-31 18:19:42 +01:00
ValueRaider d5282967ce
Merge pull request #1606 from DanielGoldfarb/main
option_chain() return underlying data that comes with the options data
2023-07-27 15:10:13 +01:00
Ricardo Prins a4d7d6c577 PEP 8 changes + minor performance improvements 2023-07-25 21:01:46 -06:00
ValueRaider f9080c22a5
Merge pull request #1630 from ricardoprins/dev
Adjust PEP 8 + minor improvements + f-strings in base.py
2023-07-25 16:50:01 +01:00
Ricardo Prins 32e1d479b1 Remove last _pd 2023-07-23 18:37:09 -06:00
Ricardo Prins 5729ce3cb6 Remove .formats and adjust imports 2023-07-23 18:28:30 -06:00
ValueRaider d0b2070036 Fix merging 1d-prices with out-of-range divs/splits 2023-07-23 15:20:57 +01:00
ValueRaider f99677ed1e Fix typo in Ticker.history(30m) 2023-07-22 16:52:50 +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
ValueRaider ddf0cf19cd Bump version to 0.2.26 2023-07-21 12:56:10 +01:00
ValueRaider 1bd819ac4d
Merge pull request #1371 from ranaroussi/hotfix/proxy
Fix proxy arg passthrough
2023-07-21 01:01:14 +01:00
ValueRaider 693565a85b Bump version to 0.2.25 2023-07-18 13:45:55 +01:00
ValueRaider 957051e0e8
Merge pull request #1605 from ranaroussi/dev
sync dev -> main
2023-07-18 12:02:19 +01:00
ValueRaider 46f53f9957 Port proxy fix to relocated 'FastInfo' 2023-07-17 18:34:00 +01:00
ValueRaider 056b84d8fe
Merge branch 'main' into hotfix/proxy 2023-07-17 18:29:04 +01:00
Ricardo Prins 835dbd9629 Fix failure when using single ISIN as a ticker 2023-07-17 08:49:39 -06:00
ValueRaider 07a4594455 Dev version 0.2.25b1 2023-07-14 21:55:29 +01:00
Daniel Goldfarb 736c03ac5b options_chain() return underlying data that comes with the options data 2023-07-14 15:17:17 -04:00
ValueRaider adfa2e9beb
Merge pull request #1604 from ranaroussi/main
sync main -> dev
2023-07-14 20:11:45 +01:00
ValueRaider b286797e8c Bump version to 0.2.24 2023-07-14 15:52:33 +01:00
ValueRaider 61c89660df Optimise info fetch, improve test 2023-07-14 15:29:55 +01:00
Value Raider 31af2ab1d5 Fix recently-fixed info[] missing data 2023-07-13 22:20:42 +01:00
Value Raider 21c380fa61 Bump version to 0.2.23 2023-07-13 20:54:56 +01:00
signifer-geo 11d43eb1a1
Update quote.py
dead code deleted
2023-07-14 04:29:59 +09:00
signifer-geo 509a109f29
Update quote.py
It fixes the error: unauthorized, invalid crumb
2023-07-14 03:11:24 +09:00
Lukas Vojt d424d027ac
update docstrings for start parameter
requested here
https://github.com/ranaroussi/yfinance/pull/1576#issuecomment-1616599633
2023-07-06 08:17:07 +00:00
Lukas Vojt 0789b690a4
fix: start year on history
timestamp of 1900 is older than 100 years,
so yahoo responds with error:

GDEVW: 1d data not available for startTime=-2208994789 and
endTime=1687780922. Only 100 years worth of day granularity data are
allowed to be fetched per request.

this should fix it,
something similar was proposed here:
https://github.com/ranaroussi/yfinance/pull/648

 # Please enter the commit message for
your changes. Lines starting
2023-06-26 18:43:35 +02:00
ValueRaider 6055566de8 Bump version to 0.2.22 2023-06-24 19:42:18 +01:00
ValueRaider e771cfabb6 Fix unhandled 'sqlite3.DatabaseError'
... also move '_TzCacheException' logging from level ERROR to INFO, because users don't need to know
2023-06-24 16:57:06 +01:00
ValueRaider 5b676f803b Bump version to 0.2.21 2023-06-21 23:15:37 +01:00
ValueRaider 1cb0b215c4
Merge branch 'main' into dev 2023-06-21 23:13:12 +01:00
ValueRaider 1ce9ce2784 Fix financials ; Remove broken decryption & scraping 2023-06-21 14:49:16 +01:00
ValueRaider cd4816e289 Post-merge tidy price-repair logging 2023-06-20 17:46:06 +01:00
ValueRaider 02c1c60f3b
Merge branch 'dev' into feature/fix-Yahoo-bad-div-split-adjustments 2023-06-20 17:39:19 +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 801f58790a
Merge pull request #1562 from ranaroussi/fix/logging-behaviour
Fix logging behaviour
2023-06-19 23:26:14 +01:00
ValueRaider 080834e3ce Update README#logging ; remove 'info fixed' message 2023-06-19 23:25:36 +01:00
ValueRaider 4e7b2094d0 Logging: improve appearance, fix propagation
Various important changes to yfinance logging:

Remove handler from YF logger as breaks standard logging practice.

Improve 'download' log message grouping

Move custom DEBUG log formatting into 'yf.enable_debug_mode()', which if called adds the handler. The custom DEBUG log formatting is:
- 'MultiLineFormatter' improves appearance of multi-line messages in any logging mode. Adds leading indent to all lines below first, to align with the first line which is indented by %levelname%.
- Whitespace padding is added to end of %levelname% string up to 8 characters. This resolves different level strings e.g. INFO & DEBUG creating different indents. But this only automatically applies to first line of message - for multi-line messages, 'MultiLineFormatter' extracts amount of padding and applies to all other lines.
- Add leading indent proportional to function depth, because DEBUG generates a lot of messages particularly when repairing price data - same function can be called recursively. Implemented in 'IndentLoggerAdapter', a simple wrapper around the logger object.
- 'log_indent_decorator' inserts 'Entering/Exiting %function%' debug messages, helps organise.
2023-06-19 19:42:02 +01:00
ValueRaider abbe4c3a2f Fix merge future div/split into prices 2023-06-19 11:41:53 +01:00
ValueRaider 9e21b85043
Merge branch 'dev' into feature/fix-Yahoo-bad-div-split-adjustments 2023-06-17 12:49:01 +01:00