yahoo-finance

Python - How to avoid error (Exceptions) in Pandas while still getting data ?

帅比萌擦擦* 提交于 2019-12-24 16:42:59
问题 I'm currently using Pandas to get options data from yahoo. It works fine until there is a stock that does not have options, at which point the program crashes. I attempted to create exceptions and just have it pass but without luck. How can I have the program identify stocks with no options and just skip? Thanks. The error I get is this: RemoteDataError: Data not available Here's the code (I used a stock with no options to test--> 'GHC'): from pandas_datareader.data import Options import

Finding security name from yahoo finance using matlab

老子叫甜甜 提交于 2019-12-24 15:23:14
问题 If I type: txt=urlread('http://download.finance.yahoo.com/d/quotes.csv', 'get',{'s', 'AAPL', 'f', 'sl1d1t1c1ohgv', '', '.csv'} ) in matlab, I get the output: "AAPL",430.195,"7/16/2013","4:00pm",+2.755,426.43,430.71,424.17,7616916 However I want to get the name of the security, in addition to the ticker symbol. I believe 'n' is the way to signify this but I haven't been able to get it to work. Is this possible? 回答1: How about just adding 'n' to the 'f' parameter's value?: txt=urlread('http:/

How should I properly use Selenium

馋奶兔 提交于 2019-12-22 00:45:31
问题 I'm trying to get one number from Yahoo Finance (http://finance.yahoo.com/quote/AAPL/financials?p=AAPL), Balance Sheet, Total Stockholder Equity. If I inspect the element I get this: <span data-reactid=".1doxyl2xoso.1.$0.0.0.3.1.$main-0-Quote-Proxy.$main-0-Quote.0.2.0.2:1:$BALANCE_SHEET.0.0.$TOTAL_STOCKHOLDER_EQUITY.1:$0.0.0">119,355,000</span> I would like to get, scrap the number: 119,355,000. If I understand correctly, web page is coded in Java Script and I need to use Selenium to get to

Yahoo fetching currency in Matlab?

泪湿孤枕 提交于 2019-12-21 21:28:45
问题 Does anyone know how to get a range of dates that works for fetching currency pairs from Yahoo? The code below works fine for capturing the latest rates needed? I am looking for a complete time series or matrix of the same info for a range of dates. I tried using the examples from Mathworks.com but get errors displayed below. This code works fine: Connect = yahoo; k = {'USDJPY=X' 'USDEUR=X' 'USDCAD=X' 'USDGBP=X'}; data = fetch(Connect, k) where USDJPY=X = USD to JPY USDEUR=X = USD to EUR etc.

Yahoo! Finance API, how to get historical intraday data for one particular day?

夙愿已清 提交于 2019-12-21 09:16:36
问题 I found an online article about how to download historical intraday data from Yahoo at : http://www.quantshare.com/sa-426-6-ways-to-download-free-intraday-and-tick-data-for-the-us-stock-market But how to get one particular day's historical intraday data for a stock ? For example how to get one-minute interval data for IBM on 2013-01-31 ? Besides Yahoo, is there any other place that has one particular day's historical intraday data for free ? 回答1: You cannot retrieve a single, unique session

read.csv(“http://ichart.finance.yahoo.com/table.csv?s=SPY”) Not Working

試著忘記壹切 提交于 2019-12-19 10:16:36
问题 I have been using the following command for a long time without problem: spy <- read.csv("http://ichart.finance.yahoo.com/table.csv?s=SPY") But in the past few days it started to throw the following error: Warning messages: 1: In file(file, "rt") : "internal" method cannot handle https redirection to: 'https://ichart.finance.yahoo.com/table.csv?s=SPY' 2: In file(file, "rt") : "internal" method failed, so trying "libcurl" I've updated my RStudio, R and all packages to the most up-to-date

https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in (“ARSARS”)&env=store://datatables.org/alltableswithkeys

Deadly 提交于 2019-12-19 09:07:40
问题 I have been using the following URL for the past 3 years without issue. However, it has stopped returning results. URL: https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("ARSARS")&env=store://datatables.org/alltableswithkeys Now returns the following: <?xml version="1.0" encoding="UTF-8"?> <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="0" yahoo:created="2017-11-02T09:33:25Z" yahoo:lang="en-AU"> <results/> </query><!-- total:

How can get ' USDJPY'(currency rates) with pandas and yahoo finance?

浪尽此生 提交于 2019-12-18 16:48:43
问题 I am learning and using the pandas and python. Today, I am trying to make a fx rate table, but I got a trouble with getting the pricess of 'USDJPY'. When I get a prices of 'EUR/USD', i code like this. eur = web.DataReader('EURUSD=X','yahoo')['Adj Close'] it works. But when I wrote jpy = web.DataReader('USDJPY=X','yahoo')['Adj Close'] the error message comes like this: --------------------------------------------------------------------------- IOError Traceback (most recent call last) in () --

Getting stock's historical data

被刻印的时光 ゝ 提交于 2019-12-18 10:46:09
问题 We would like to check on stock's historical data, using HTTP request, and get JSON. Using the yahoo API ,I found it hard to not only clearly understand the HTTP request fields, but also to get the data of a certain day (not average for each day, but the values during a certain day), with this : http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.historicaldata%20where%20symbol%20%3D%20%22AAPL%22%20and%20startDate%20%3D%20%222012-09-11%22%20and%20endDate%20%3D%20

converting daily stock data to weekly-based via pandas in Python

别来无恙 提交于 2019-12-18 10:30:20
问题 I've got a DataFrame storing daily-based data which is as below: Date Open High Low Close Volume 2010-01-04 38.660000 39.299999 38.509998 39.279999 1293400 2010-01-05 39.389999 39.520000 39.029999 39.430000 1261400 2010-01-06 39.549999 40.700001 39.020000 40.250000 1879800 2010-01-07 40.090000 40.349998 39.910000 40.090000 836400 2010-01-08 40.139999 40.310001 39.720001 40.290001 654600 2010-01-11 40.209999 40.520000 40.040001 40.290001 963600 2010-01-12 40.160000 40.340000 39.279999 39