Questions tagged [yahoo-finance]

Yahoo! Finance is a service from Yahoo! that provides financial information. It is the top financial news and research website in the United States. PLEASE NOTE : THE RELATED API HAS BEEN DISCONTINUED BY YAHOO.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
11 views

Downloading macroeconomic data into a dataframe (python)

I have a dataframe with daily price data of a financial asset within a specific time interval. I downloaded it directly from Yahoo Finance using a library. I also need to download macroeconomic data, ...
Alejandro Trujillo's user avatar
0 votes
0 answers
20 views

How to get historical price of options with strike price Y relative to being set at day X in python?

I've recently been using yahoofinance to backtest a trading algorithm I made. The problem is, there are certain elements that I am trying to code in the algorithm that should be easily possible, but ...
Hello's user avatar
  • 1
1 vote
1 answer
35 views

Consume data from Yahoo Screener via requests

I ran a query on the Yahoo Screener at: https://finance.yahoo.com/screener/equity/new DevTools shows that the data came back as JSON via: https://query2.finance.yahoo.com/v1/finance/screener?crumb=...
Alfred Wallace's user avatar
-6 votes
0 answers
20 views

Android Application to get live stocks price like what we get in broker application

I am making a own project where I want to get the live price of a security in a app that update constantly like all stock brokers app we use, trying to use kiyv and yahoo_fin. A help will be much ...
niladri biswas's user avatar
0 votes
2 answers
38 views

How to loop over list of tickers and create variable based on the looped list value

I am trying to import several tickers dataframes to PowerBi but i cannot find a way to create variables with the name of the ticker. Here is my code: import time import pandas as pd from datetime ...
Maximilien Ollier's user avatar
0 votes
0 answers
32 views

Cannot get si.tickers_sp500() when using pandas 2.1.0

I am trying to make an trading algorithm, and was trying to obtain tickers from stock_info from yahoo_fin. On pandas 1.5.3, it works but on pandas 2.1.0 it gives me only dashes ['----', '-----', '-----...
chem1kal's user avatar
  • 101
0 votes
0 answers
67 views

Creating an array with only the Nth element of another array in Python

I am pulling data from Yahoo Finance and trying to build two arrays. One with the 1-week close of a stock and another one with only the close of the 50th week of the first one. With that, I want to ...
Joao Paulo's user avatar
0 votes
0 answers
43 views

Retrieving data from yahoo finance with VBA

I wish to extract data from Yahoo Finance and populate it into an Excel spreadsheet. I'd like each stock to be represented by a single line, detailing the Ticker, Company Name, Stock Price, and ...
Zaiga's user avatar
  • 43
-1 votes
1 answer
38 views

Is it possible to get just the price from a specific day?

This is what I have done so far: import yfinance as yf import pandas as pd print(yf.download("META", start="2023-08-14", end="2023-08-15")['Adj Close']) Output: Date ...
k07's user avatar
  • 29
1 vote
1 answer
53 views

how to scrape selected values from yahoo finance key statistics page using R, following API removal

Now that yahoo finance appears to have removed their api, I need some code to scrape selected values from the key statistics page. e.g. for url [https://uk.finance.yahoo.com/quote/IPX.L/key-statistics?...
user22322433's user avatar
0 votes
0 answers
36 views

Pandas / Numpy "No module named 'numpy.core._multiarray_umath'"

I'm using yahoo_fin and installing it automaticly installs pandas and numpy. Which is fine and my program runs smoothly. However, I go to bed wake up and run my program again this morning, and get ...
Gabe Kutner's user avatar
0 votes
1 answer
56 views

'TypeError: string indices must be integers' on Using web.DataReader with yahoo Finance API

import pandas_datareader as webreader import pandas as pd import matplotlib.pyplot as plt # Set the API data_source = "yahoo" # Set the API parameters date_today = "2020-01-01" #...
pink_ai's user avatar
0 votes
1 answer
34 views

Is this scraper limited to 99 records or is there a bug?

Here's a scraper. It scrapes for records dated from a start date to 2023 July 1. If I set the start date to May 1, it returns the expected quantity of records. If I set it to January 1, it gives me ...
H2ONaCl's user avatar
  • 10.7k
0 votes
1 answer
67 views

How to extract the live price, price change, and percentage change from yahoo finance using python?

I need to scrape data for over 2000 tickers using data that can be found on this page: https://finance.yahoo.com/quote/AAPL. I was able to get the code down for the volume, bid price, etc., but have ...
user65325's user avatar
0 votes
0 answers
115 views

Stock Data with yahoo

Hello this is my Code and no Matter what i try it just dosent work. It always gives me the error :" AttributeError: 'DataFrame' object has no attribute 'calls'" #max.Länge: 7 Tage import ...
schnjopi's user avatar
0 votes
1 answer
41 views

How do I fix this error in IMPORTXML in Google Sheets?

I am trying to import current price of a fund from sg.finance.com.yahoo into Google sheets. The ticker is an ISIN code. I have checked and identified the url (it is, in this case, https://sg.finance....
Worminger's user avatar
0 votes
1 answer
92 views

when there is no data available on yahoo finance, is it possible to return N/A instead of there being an error?

I'm trying to collect several pieces of data for a company at one time, yet one piece being missing results in an error. Is it possible to prevent this by returning 'N/A' instead? import yfinance as ...
k07's user avatar
  • 29
0 votes
1 answer
37 views

is there a way to only take the data from the most recent period?

i'm trying to take the fcf from the most recent year but i am provided with the last four. is it possible to only receive the most recent? this is what i tried: import yfinance as yf comp = yf.Ticker(&...
k07's user avatar
  • 29
1 vote
1 answer
43 views

Is it possible to automate the adding of tickers to sector lists rather than adding individual ones?

Is it possible to automate the adding of tickers to sector lists rather than adding individual ones by iterating through the database of available tickers listed in the USA? I'm not sure how i would ...
k07's user avatar
  • 29
1 vote
1 answer
143 views

How can i create a list full of all tickers of companies in a specific industry?

How would I be able to iterate through the yfinance database and append all companies within specific industries into specific lists? y = int(input("number of tickers:")) def info(x): ...
k07's user avatar
  • 29
0 votes
0 answers
95 views

AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'?

I am trying to download the PE Ratio for 'AAPL' and got the above error. The following is my code: import yahoo_fin.stock_info as si ticker = 'AAPL' table = si.get_quote_table(ticker) print(table) Are ...
Kevin Luo's user avatar
-1 votes
1 answer
243 views

Web Scraping Yahoo Finance Python

I am trying to gather yahoo finance data for a given ticker symbol in a Dataframe from the income statement, balance sheet, and cash flow reports.(URL's provided below) I used this function from ...
Bash's user avatar
  • 39
0 votes
1 answer
281 views

What parameters are missing in the Query record for Yahoo Finance API in Power Query?

The following Yahoo Finance API endpoint recently stopped working when I called it using the Web.Contents connector from Power Query. The result of calling this API appoint from Power Query is that I ...
FloresCapitalSolutions's user avatar
1 vote
1 answer
125 views

Scraping the analysis page from yahoo-finance with python and beautifulsoup?

I am trying to make a python script using Beautiful Soup that scrapes https://finance.yahoo.com/quote/PLTR/analysis?p=PLTR the symbols on my excel sheet will loop through the URL and grab the ...
LegendaryHands's user avatar
0 votes
1 answer
57 views

Is there an easy way to automate the process of retrieving stock data from yahoo?

I've been trying to automate the process of retrieving data so it will be much faster. Rather than doing this: #Technology apple= yf.Ticker("aapl") microsoft= yf.Ticker("msft") ...
davids_73's user avatar
0 votes
0 answers
389 views

how to get dividend data from yahoo finance to google sheets

I try to get dividend data from yahoo finance to google sheets In my understanding it should use importxml I copy url and xpath from browser for this function this is my code =IMPORTXML("https://...
David D's user avatar
0 votes
0 answers
67 views

Error when calling tq_get function of the tidyquant package for dividend data of Yahoo Finance (when some symbols have no dividend data)

My code: pacman::p_load("tidyverse","tidyquant") setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) '%&%' <- function(a,b) paste(a,b) Stocks<-c("MSFT",...
gilberke's user avatar
0 votes
3 answers
895 views

Has there been a recent update to the yahoo_fin library; I'm getting an assertion error?

I've been using the yahoo_fin library for several weeks (the same version from 2021 with no new updates). My program doesn't work now, but neither does a simple request. I'm getting an assertion error....
Brandon Jacobson's user avatar
1 vote
1 answer
52 views

Unpivot yahoo finance multiple ticker download

I am trying to unpivot a yahoo finance download. import yfinance as yf import pandas as pd from datetime import date today = date.today() data = yf.download("AAPL WMT", start="2023-05-...
Stix's user avatar
  • 39
0 votes
1 answer
209 views

No data found for this date range, symbol may be delisted

I tried to pull data on a stock symbol using the Yahoo finance python module. I checked the other questions that are on a similar topic and most of them say to try to run the program during market ...
Cauder's user avatar
  • 2,177
1 vote
0 answers
17 views

Quantmod is not pulling Yahoo finance data for me anymore [duplicate]

I have been using the same code for nearly two years which have reliably returned stock information for me. Couple of days ago I started to get the following error message: "Error in open....
Gabor's user avatar
  • 35
1 vote
1 answer
246 views

Trying to use IMPORTHTML or IMPORTXML to get price value from https://finance.yahoo.com/quote/GSPX.L/ in Google Sheets

I'm trying to use IMPORTHTML or IMPORTXML to get price value from https://finance.yahoo.com/quote/GSPX.L/ or in fact from any site that will give me a relatively up-to-date number. I used to be able ...
booms's user avatar
  • 23
-1 votes
1 answer
263 views

Reading JSON from Yahoo Finance

I have an issue regarding the data from a JSON. Link to example JSON: Example for Apple I am using this code: function yFinance(symbol) { const url = 'https://query2.finance.yahoo.com/v10/finance/...
Bruno M.'s user avatar
0 votes
0 answers
71 views

yahooquery premium user not logging in

I am using yahooquery version is 2.3.1 and when running the below code I get an error. I installed yahooquery[premium]. I am certain my username and pw are correct. Any help is appreciated. Here is ...
NOLA_Max's user avatar
5 votes
8 answers
3k views

Yahoo Finance V7 API now requiring cookies? (Python)

url = 'https://query2.finance.yahoo.com/v7/finance/quote?symbols=TSLA&fields=regularMarketPreviousClose&region=US&lang=en-US' headers = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) ...
Justin's user avatar
  • 111
18 votes
9 answers
9k views

Yahoo Finance API - GET quotes returns "Invalid Cookie"

For the past few years, I've been using the following link to fetch a full current quote for the symbols in the query: https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL All of a sudden, ...
Biff Downhill's user avatar
0 votes
2 answers
96 views

Downloading data from a dataframe

I'm trying to download a dataframe from Yahoo Finance. For this I use a code below: `import yahoo_fin.stock_info as si import pandas as pd import yahoo_fin.stock_info as si import pandas as pd ...
frimt1's user avatar
  • 1
0 votes
0 answers
69 views

An error "regularMarketOpen" while downloading data from Yahoo Finance

I'm trying to download data from Yahoo Finance using yfinance package. I use a code below: import yfinance as yf import pandas as pd fang = ['FB','AMZN','NFLX','GOOG'] tickers = [yf.Ticker(ticker) ...
jrpars1's user avatar
  • 35
0 votes
1 answer
176 views

get ESG scores from yesg [duplicate]

I am trying to get total esg scores from 2016-2021 for all companies in S&P500, but not every ticker has esg scores and some of them does not have data for 2016-2021. My current code look like ...
anonim's user avatar
  • 67
1 vote
1 answer
105 views

An empty dataframe in output

Updated post. I'm trying to get data from the balance sheet in Yahoo Fianance using yahoo_fin package. For downloading data I use the code below: import yahoo_fin.stock_info as si import pandas as pd ...
jrpars1's user avatar
  • 35
0 votes
0 answers
188 views

Downloading fundamental data for multiple stocks from Yahoo Finance

I've tried to download financial data from Yahoo Finance using yahoo_fin package. I would like to ask is it possible to download historical data of Return on Assets, Market Capitalization and Total ...
jrpars1's user avatar
  • 35
1 vote
0 answers
22 views

Why it cannot get tickers data by lapply with getSymbol function?

When I run the R code below, the tickerd_data only get the name of "AAPL" and "MSFT" as a list. library(quantmod) tickers <- c("AAPL","MSFT") tickers_data &...
konglr's user avatar
  • 35
2 votes
1 answer
176 views

Invalid synthax in df while fetching ESG data from Yahoo Finance [duplicate]

Updated post for csv file structure. csv file has the following structure: Symbol AAL AAON AAPL ABCB Tickers does not have quotation marks. I have a problem with my code in Python. I am trying to ...
jrpars1's user avatar
  • 35
0 votes
1 answer
156 views

Daily FX price data from yahoo finance seems to have dates that are off by i day

When i go to the GBPUSD=X 1m chart page of yahoo finance i see the following which broadly matches the chart i see from from bloomberg except the dates in the yahoo finance chart are 1 day offset (...
EndlesslyLearning's user avatar
0 votes
0 answers
23 views

WebScraping with Python isn't updating value

I've been trying to get the dividend values of inputted stock tickers and add them to a dictionary using webscraping and python to do so from yahoo finance. However, I am getting the incorrect output. ...
Nico's user avatar
  • 19
1 vote
2 answers
116 views

Scrape ticker sector information from Yahoo finance

I got an error message when I try to scrape the "Sector" from a ticker in Yahoo finance. I tried to follow the library manual advising to select the correct parent and child info from the ...
Matiouz123's user avatar
0 votes
0 answers
28 views

How to synchronise multiple stock price with one time series?

I have downloaded stock prices like following: # install and load the 'quantmod' package install.packages("quantmod") library(quantmod) tickers <- c ("III.L", "ABBN.SW&...
Tural Karimov's user avatar
0 votes
0 answers
421 views

Pull Data from Yahoo Finance [duplicate]

I'm trying to scrape data from Yahoo Finance into a Google Sheet. More specifically, this page: https://finance.yahoo.com/quote/AAPL/key-statistics/ From this page, I'm trying to scrape the value for &...
JohnTroublultra's user avatar
0 votes
0 answers
39 views

Matplotlib.pyplot FuncAnimation not working

I was trying out a personal project where I used bs4 to get some stock data from yfinance which would then be plotted using matplotlib, in real-time. However, the plot doesn't render for some reason. ...
Shimron Alakkal's user avatar
0 votes
0 answers
185 views

Problem with getting data from Yahoo finance with python

I am trying to get data from Yahoo finance but keep getting the same error that says: TypeError Traceback (most recent call last) <ipython-input-23-3fd0d552ddbc> ...
Ayham's user avatar
  • 190

1
2 3 4 5
27