yahoo-finance

Google Sheets IMPORTXML XPath - Imported Content is empty

余生颓废 提交于 2020-08-06 06:06:50
问题 I'm attempting to parse the ' PEG Ratio ' value of a stock from Yahoo Finance into a Google Sheet, but seeing an error. URL used: https://finance.yahoo.com/quote/ABBV/key-statistics?p=ABBV Cell Expression used: =IMPORTXML("http://finance.yahoo.com/quote/ABBV/key-statistics?p=ABBV", "//td[@data-reactid='132']") Error: ' #N/A ' value ( Error: Imported Content is empty ) Value expected is 1.28 (at the time of posting this query) - from Yahoo Finance > Statistics tab > PEG Ratio table (td has a,

Google Sheets IMPORTXML XPath - Imported Content is empty

不打扰是莪最后的温柔 提交于 2020-08-06 06:05:26
问题 I'm attempting to parse the ' PEG Ratio ' value of a stock from Yahoo Finance into a Google Sheet, but seeing an error. URL used: https://finance.yahoo.com/quote/ABBV/key-statistics?p=ABBV Cell Expression used: =IMPORTXML("http://finance.yahoo.com/quote/ABBV/key-statistics?p=ABBV", "//td[@data-reactid='132']") Error: ' #N/A ' value ( Error: Imported Content is empty ) Value expected is 1.28 (at the time of posting this query) - from Yahoo Finance > Statistics tab > PEG Ratio table (td has a,

Can't save data from yfinance into a CSV file

两盒软妹~` 提交于 2020-07-22 14:51:01
问题 I found library that allows me to get data from yahoo finance very efficiently. It's a wonderful library. The problem is, I can't save the data into a csv file. I've tried converting the data to a Panda Dataframe but I think I'm doing it incorrectly and I'm getting a bunch of 'NaN's . I tried using Numpy to save directly into a csv file and that's not working either. import yfinance as yf import csv import numpy as np urls=[ 'voo', 'msft' ] for url in urls: tickerTag = yf.Ticker(url) print

Can't save data from yfinance into a CSV file

那年仲夏 提交于 2020-07-22 14:49:28
问题 I found library that allows me to get data from yahoo finance very efficiently. It's a wonderful library. The problem is, I can't save the data into a csv file. I've tried converting the data to a Panda Dataframe but I think I'm doing it incorrectly and I'm getting a bunch of 'NaN's . I tried using Numpy to save directly into a csv file and that's not working either. import yfinance as yf import csv import numpy as np urls=[ 'voo', 'msft' ] for url in urls: tickerTag = yf.Ticker(url) print

AttributeError: module 'yahoo_finance' has no attribute 'download'

非 Y 不嫁゛ 提交于 2020-07-16 10:22:05
问题 import yahoo_finance as yfinance raw_data = yfinance.download (tickers = "^GSPC ^FTSE ^N225 ^GDAXI", #The time #series we are interested in - (in our case, these are the S&P, FTSE, NIKKEI and DAX) start = "1994-01-07", #The starting date of our data set end = "2019-09-27", #The ending date of our data set (at the time of # upload, this is the current date) interval = "1d", #The distance in time between two recorded observations. #Since we're using daily closing prices, we set it equal #to "1d

AttributeError: module 'yahoo_finance' has no attribute 'download'

那年仲夏 提交于 2020-07-16 10:21:41
问题 import yahoo_finance as yfinance raw_data = yfinance.download (tickers = "^GSPC ^FTSE ^N225 ^GDAXI", #The time #series we are interested in - (in our case, these are the S&P, FTSE, NIKKEI and DAX) start = "1994-01-07", #The starting date of our data set end = "2019-09-27", #The ending date of our data set (at the time of # upload, this is the current date) interval = "1d", #The distance in time between two recorded observations. #Since we're using daily closing prices, we set it equal #to "1d

AttributeError: module 'yahoo_finance' has no attribute 'download'

北城以北 提交于 2020-07-16 10:21:22
问题 import yahoo_finance as yfinance raw_data = yfinance.download (tickers = "^GSPC ^FTSE ^N225 ^GDAXI", #The time #series we are interested in - (in our case, these are the S&P, FTSE, NIKKEI and DAX) start = "1994-01-07", #The starting date of our data set end = "2019-09-27", #The ending date of our data set (at the time of # upload, this is the current date) interval = "1d", #The distance in time between two recorded observations. #Since we're using daily closing prices, we set it equal #to "1d

Matplotlib different colors for bar graph based on value

假装没事ソ 提交于 2020-05-29 10:31:06
问题 I'm plotting returns for sectors and all the stocks in them. I would like to have the values > 100 to be green, and < 100 to be red. Here's my code: sector_lst = ['XLK','XLF','XLE'] ## etc. for i in sector_lst: fig = plt.figure(figsize=(12, 8)) for x in sectordict[i]: #sectordict[i] is all the stocks in a sector (so AAPL, GOOG, etc. for tech) if pct_change[x] > 1: pct_change[sectordict[i]].plot(kind='bar',color='g') ##if pct_chg < 1 else: pct_change[sectordict[i]].plot(kind='bar',color='r')

Fetching 1 minute bars from Yahoo Finance

白昼怎懂夜的黑 提交于 2020-02-26 13:05:53
问题 I'm trying to download 1 minute historical stock prices from Yahoo Finance, both for the current day and the previous ones. Yahoo (just like Google) supports up to 15 days worth of data, using the following API query: http://chartapi.finance.yahoo.com/instrument/1.0/AAPL/chartdata;type=quote;range=1d/csv The thing is that data keeps on changing even when the markets are closed! Try refreshing every minute or so and some minute bars change, even from the beginning of the session. Another

Extract financial fundamental from Yahoo finance with excel

房东的猫 提交于 2020-02-08 10:06:05
问题 Yahoo changed his structure for the financials (fundamental) report. In the past (last month) at the page https://finance.yahoo.com/quote/AAPL/financials?p=AAPL&guccounter=1 I could download the information regarding the financial Income Statement or Balance Sheet or Cash Flow in VBA Excel as a table. Now they have updated the "new" version that appears as a table but I cannot extract it con VBA Excel. There someone that can help me? If you need I can post the code in VBA regarding the old