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

Merge dev -> main for release 0.2.0rc3 #1238

Merged
merged 67 commits into from Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
1ed4b4b
For ETFs & Mutual Funds, add capitalGains
thirumalairajr Nov 11, 2022
9ba3d5a
Fixing issue 980 by changing default timestamp for start parameter in…
ppeloton Nov 13, 2022
ea95d71
Merge pull request #1169 from ppeloton/fix-issue-980
ValueRaider Nov 13, 2022
724118a
Major refactoring
Nov 8, 2022
f4b3348
Continued refactoring
fredrik-corneliusson Nov 10, 2022
fa7d743
Do persist requests_cache in tests.
fredrik-corneliusson Nov 13, 2022
e188c7e
Merge branch 'dev' into feature/add_capital_gains
thirumalairajr Nov 14, 2022
0f433d7
Add capital gains data only for MutualFund and ETF
thirumalairajr Nov 14, 2022
231d985
Merge branch 'feature/add_capital_gains' of github.com:thirumalairajr…
thirumalairajr Nov 14, 2022
c56e349
Align requirements.txt file with setup.py package dependencies.
fredrik-corneliusson Nov 14, 2022
6067d2a
Addressing PR review comments
thirumalairajr Nov 15, 2022
c6f760e
Fixed #1172 - exception if tz cache file was empty
fredrik-corneliusson Nov 15, 2022
f0b5db2
Merge pull request #1154 from fredrik-corneliusson/refactor_base_py
ValueRaider Nov 15, 2022
2970d94
Fix localizing midnight when non-existent (DST) #1174
ValueRaider Nov 16, 2022
1adc908
Merge branch 'dev' into feature/add_capital_gains
thirumalairajr Nov 16, 2022
c5c1567
Handle non existant columns while downloading
thirumalairajr Nov 17, 2022
82b99b5
Merge branch 'feature/add_capital_gains' of github.com:thirumalairajr…
thirumalairajr Nov 17, 2022
ca27d07
Migrating to get_info function
thirumalairajr Nov 17, 2022
e621189
Add glob try/except in threaded implementation.
Nov 18, 2022
a0c47c9
Merge pull request #1179 from fredrik-corneliusson/dev
ValueRaider Nov 19, 2022
0664010
Made fetching earnings_dates faster
fredrik-corneliusson Nov 20, 2022
80c659b
Addressing PR comments
thirumalairajr Nov 21, 2022
44e8d2b
Merge pull request #1166 from thirumalairajr/feature/add_capital_gains
ValueRaider Nov 21, 2022
20680b0
Lowered get earnings_dates limit and removed earnings_history API.
fredrik-corneliusson Nov 20, 2022
bd35693
Bugfix for PR #1166
ValueRaider Nov 21, 2022
96e4532
Merge pull request #1183 from fredrik-corneliusson/dev
ValueRaider Nov 21, 2022
566a38b
Fix financials index formatting
ValueRaider Nov 22, 2022
ab1476c
Restore financials nesting code (commented)
ValueRaider Nov 22, 2022
b3b36c5
Restore old financials as backup if new missing
ValueRaider Nov 22, 2022
b856041
Merge pull request #1177 from ranaroussi/fix/dst-nonexistent
ValueRaider Nov 22, 2022
379b87d
Moved financials formatting up into get()
ValueRaider Nov 23, 2022
dfb15e6
Unit tests for financials formatting
ValueRaider Nov 23, 2022
3b19ef1
camel2title(): restrict acceptable inputs
ValueRaider Nov 24, 2022
d7baa07
Get quote type from metadata instead info[] -> faster
ValueRaider Nov 25, 2022
50de008
Merge pull request #1193 from ranaroussi/fix/financials-formatting
ValueRaider Nov 26, 2022
e234b8c
#1207 Fixed regression issue with Python < 3.9
fredrik-corneliusson Nov 27, 2022
37ac9bd
#1209 Fixed pretty format alters cached dataframe
fredrik-corneliusson Nov 27, 2022
4064ec5
Move financials fallback logic into Ticker
ValueRaider Nov 27, 2022
80dc0e8
Merge branch 'dev' into feature/old-financials-backup
ValueRaider Nov 27, 2022
3c218b8
Merge pull request #1210 from fredrik-corneliusson/mydev_1209
ValueRaider Nov 27, 2022
0ee3d6d
Merge pull request #1208 from fredrik-corneliusson/mydev
ValueRaider Nov 27, 2022
9c249a1
Merge pull request #1203 from ranaroussi/fix/capital-gains-perf-regre…
ValueRaider Nov 28, 2022
5e333f5
#1213 Added test asserting no harmful requests are added to history c…
fredrik-corneliusson Nov 29, 2022
2eae33b
Fix a couple of minor issues in README
ymyke Nov 29, 2022
8bf7576
Merge pull request #1215 from fredrik-corneliusson/dev_verify_ticker_…
ValueRaider Nov 29, 2022
f93c3d7
Extend Yahoo duplication fix to intra-day
ValueRaider Nov 30, 2022
0cd5448
Merge pull request #1216 from ymyke/fix/readme-several
ValueRaider Nov 30, 2022
d963e3f
Fix dev merge ; Fix financials fallback fetch
ValueRaider Dec 1, 2022
e26a4c5
Improve handling dividends without matching price interval
ValueRaider Dec 1, 2022
0f6ad32
Merge pull request #1217 from ranaroussi/fix/Yahoo-duplication-fix
ValueRaider Dec 1, 2022
1aa3c3d
Merge pull request #1220 from ranaroussi/feature/improve-repair-zero
ValueRaider Dec 1, 2022
762d446
Default enable 'pretty' financials, explain in README
ValueRaider Dec 1, 2022
b3dbbc4
If fetching price history ending in future, don't use cache
ValueRaider Dec 6, 2022
4c89e8a
Account for data delay ; Remove debug code ; Fix session test
ValueRaider Dec 10, 2022
df9d456
Merge pull request #1221 from ranaroussi/feature/financials-format-de…
ValueRaider Dec 10, 2022
e91ffe4
Replace 'fallback' with 'legacy' arg
ValueRaider Dec 10, 2022
aeea232
Merge branch 'dev' into feature/old-financials-backup
ValueRaider Dec 10, 2022
791c845
Merge pull request #1194 from ranaroussi/feature/old-financials-backup
ValueRaider Dec 10, 2022
8f08381
Merge pull request #1232 from ranaroussi/fix/no-history-caching
ValueRaider Dec 10, 2022
6f60a78
Add `history_metadata` property
ymyke Dec 12, 2022
4c41ba0
Improve price repair
ValueRaider Dec 12, 2022
85ef53c
Store `_history_metadata` earlier and use that attribute for further …
ymyke Dec 13, 2022
6dca1ee
Don't repair prices if can't calibrate
ValueRaider Dec 13, 2022
11a3a9d
Raise min lxml & pandas, sync all reqs lists
ValueRaider Dec 10, 2022
46d5579
Merge pull request #1236 from ranaroussi/feature/improve-reconstruction
ValueRaider Dec 13, 2022
46dbed3
Merge pull request #1235 from ymyke/feature/add-history-metadata
ValueRaider Dec 13, 2022
df7af50
Merge pull request #1233 from ranaroussi/revise-reqs
ValueRaider Dec 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 30 additions & 19 deletions README.md
Expand Up @@ -59,7 +59,10 @@ msft.info
# get historical market data
hist = msft.history(period="max")

# show actions (dividends, splits)
# show meta information about the history (requires history() to be called first)
msft.history_metadata

# show actions (dividends, splits, capital gains)
msft.actions

# show dividends
Expand All @@ -68,20 +71,24 @@ msft.dividends
# show splits
msft.splits


# show capital gains (for mutual funds & etfs)
msft.capital_gains

# show share count
msft.shares

# show income statement
# show financials:
# - income statement
msft.income_stmt
msft.quarterly_income_stmt

# show balance sheet
# - balance sheet
msft.balance_sheet
msft.quarterly_balance_sheet

# show cash flow statement
# - cash flow statement
msft.cashflow
msft.quarterly_cashflow
# see `Ticker.get_income_stmt()` for more options

# show major holders
msft.major_holders
Expand All @@ -104,14 +111,15 @@ msft.recommendations
msft.recommendations_summary
# show analysts other work
msft.analyst_price_target
mfst.revenue_forecasts
mfst.earnings_forecasts
mfst.earnings_trend
msft.revenue_forecasts
msft.earnings_forecasts
msft.earnings_trend

# show next event (earnings, etc)
msft.calendar

# show all earnings dates
# Show future and historic earnings dates, returns at most next 4 quarters and last 8 quarters by default.
# Note: If more are needed use msft.get_earnings_dates(limit=XX) with increased limit argument.
msft.earnings_dates

# show ISIN code - *experimental*
Expand Down Expand Up @@ -140,6 +148,7 @@ msft.history(..., proxy="PROXY_SERVER")
msft.get_actions(proxy="PROXY_SERVER")
msft.get_dividends(proxy="PROXY_SERVER")
msft.get_splits(proxy="PROXY_SERVER")
msft.get_capital_gains(proxy="PROXY_SERVER")
msft.get_balance_sheet(proxy="PROXY_SERVER")
msft.get_cashflow(proxy="PROXY_SERVER")
msft.option_chain(..., proxy="PROXY_SERVER")
Expand All @@ -154,7 +163,7 @@ the Ticker constructor.
import requests_cache
session = requests_cache.CachedSession('yfinance.cache')
session.headers['User-agent'] = 'my-program/1.0'
ticker = yf.Ticker('msft aapl goog', session=session)
ticker = yf.Ticker('msft', session=session)
# The scraped response will be stored in the cache
ticker.actions
```
Expand All @@ -165,7 +174,6 @@ To initialize multiple `Ticker` objects, use
import yfinance as yf

tickers = yf.Tickers('msft aapl goog')
# ^ returns a named tuple of Ticker objects

# access each ticker using (example)
tickers.tickers['MSFT'].info
Expand Down Expand Up @@ -195,7 +203,7 @@ data = yf.download( # or pdr.get_data_yahoo(...
# fetch data by interval (including intraday if period < 60 days)
# valid intervals: 1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1mo,3mo
# (optional, default is '1d')
interval = "1m",
interval = "5d",

# Whether to ignore timezone when aligning ticker data from
# different timezones. Default is True. False may be useful for
Expand Down Expand Up @@ -289,12 +297,15 @@ To install `yfinance` using `conda`, see
### Requirements

- [Python](https://www.python.org) \>= 2.7, 3.4+
- [Pandas](https://github.com/pydata/pandas) (tested to work with
\>=0.23.1)
- [Numpy](http://www.numpy.org) \>= 1.11.1
- [requests](http://docs.python-requests.org/en/master/) \>= 2.14.2
- [lxml](https://pypi.org/project/lxml/) \>= 4.5.1
- [appdirs](https://pypi.org/project/appdirs) \>=1.4.4
- [Pandas](https://github.com/pydata/pandas) \>= 1.3.0
- [Numpy](http://www.numpy.org) \>= 1.16.5
- [requests](http://docs.python-requests.org/en/master) \>= 2.26
- [lxml](https://pypi.org/project/lxml) \>= 4.9.1
- [appdirs](https://pypi.org/project/appdirs) \>= 1.4.4
- [pytz](https://pypi.org/project/pytz) \>=2022.5
- [frozendict](https://pypi.org/project/frozendict) \>= 2.3.4
- [beautifulsoup4](https://pypi.org/project/beautifulsoup4) \>= 4.11.1
- [html5lib](https://pypi.org/project/html5lib) \>= 1.1

### Optional (if you want to use `pandas_datareader`)

Expand Down
26 changes: 17 additions & 9 deletions meta.yaml
@@ -1,5 +1,5 @@
{% set name = "yfinance" %}
{% set version = "0.1.58" %}
{% set version = "0.2.0" %}

package:
name: "{{ name|lower }}"
Expand All @@ -16,22 +16,30 @@ build:

requirements:
host:
- pandas >=0.24.0
- pandas >=1.3.0
- numpy >=1.16.5
- requests >=2.21
- requests >=2.26
- multitasking >=0.0.7
- lxml >=4.5.1
- appdirs >= 1.4.4
- lxml >=4.9.1
- appdirs >=1.4.4
- pytz >=2022.5
- frozendict >=2.3.4
- beautifulsoup4 >=4.11.1
- html5lib >=1.1
- pip
- python

run:
- pandas >=0.24.0
- pandas >=1.3.0
- numpy >=1.16.5
- requests >=2.21
- requests >=2.26
- multitasking >=0.0.7
- lxml >=4.5.1
- appdirs >= 1.4.4
- lxml >=4.9.1
- appdirs >=1.4.4
- pytz >=2022.5
- frozendict >=2.3.4
- beautifulsoup4 >=4.11.1
- html5lib >=1.1
- python

test:
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
@@ -1,10 +1,10 @@
pandas>=0.24.0
pandas>=1.3.0
numpy>=1.16.5
requests>=2.26
multitasking>=0.0.7
lxml>=4.5.1
lxml>=4.9.1
appdirs>=1.4.4
pytz>=2022.5
frozendict>=2.3.4
beautifulsoup4>=4.11.1
html5lib>=1.1
html5lib>=1.1
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -59,9 +59,9 @@
platforms=['any'],
keywords='pandas, yahoo finance, pandas datareader',
packages=find_packages(exclude=['contrib', 'docs', 'tests', 'examples']),
install_requires=['pandas>=1.1.0', 'numpy>=1.15',
install_requires=['pandas>=1.3.0', 'numpy>=1.16.5',
'requests>=2.26', 'multitasking>=0.0.7',
'lxml>=4.5.1', 'appdirs>=1.4.4', 'pytz>=2022.5',
'lxml>=4.9.1', 'appdirs>=1.4.4', 'pytz>=2022.5',
'frozendict>=2.3.4',
'beautifulsoup4>=4.11.1', 'html5lib>=1.1'],
entry_points={
Expand Down