Yahoo finance API returns different values - yahoo-finance

I'm using yahoo.finance.quotes but the values I get for FDC are different than when I search for FDC plus one more.
FDC and GOOG: then FDC Change: -0.55
ONLY FDC: FDC Change: +0.41
Any ideas why?

It has been reported by others that the data is both delayed and inconsistent.
For example if you refresh, and inspect the "LastTradeWithTime" key value, you get different quotes from different times of day, for no apparent reason.
In your example the data is from 13-Jun vs 14-Jun.

Related

Tableau desktop: Get the latest value from a list of values recorded by the time of the day

I'm using Tableau Desktop 2022.0.4
This is what my data looks like (filtered by date):
I would like to be able to get the value associated with the max value of time for the selected date. In the example above will be 46.1 (associated with 15). Times of the day with their values can be different each day. The source is filtered by date.
I have tried using FIXED but I cannot understand completely how to use it or if it is the right thing to use for this situation.
Thank you for your help with this.

Google Sheets: API To Get Crypto Prices and History?

As GOOGLEFINANCE() seems very limited in the cryptocurrencies it supports, are there any (free?) APIs that I can use to get data from?
Although I use GF() for ETH and BTC, I'm specifically looking for Price and Historical Closing Prices on ADA (Cardano).
I've searched the forum for suggestions, there aren't many and most are old. Binance's API seemed OK, but it gives prices in USDT instead of USD.
If anyone is interested, I found an API that offers a free key, although limited in the number of daily calls you can make: CoinAPI.
It seems very powerful, with quotes available in most currencies. So far, I've managed to get a current price:
Formulas shown in brown.
(1) shows the raw data returned, a two rows delimited by semi-colons.
(2) wraps a QUERY() around IMPORTDATA(), using offset 1 plus param 0, to not return the header row, then wraps all that in SPLIT() to separate the delimited text into columns.
(3) wraps (2) with INDEX() so I can get just the Price in the 4th col.
As this value will not automatically update like GOOGLEFINANCE(), I think I'll need to set a Trigger to do that.
I've also retrieved historical data, but I've yet to figure out how to split multiple rows of delimited text from the IMPORTDATA() function.
[Edit] See the solution to splitting multiple rows by #player0 at https://stackoverflow.com/a/69055990/190925.

Google Sheets COUNT/FILTER function

I'm having some trouble getting these functions to work. I'm not even sure if they're the ones that I should be using, but here is the following information I can provide. I had previously opened a topic, but I was getting responses about my confusing query. So, hopefully this one is better explained.
I have data in the following fields: A1:N7, as well as A12:L18.
I need a function to check all of the fields and add up the amount of times certain numbers show up. The numbers that need to be checked are: <90, 90-99.99, 100-109.99, and =>100.
First off, I can use this formula to count the <90 and =>100 values in all the fields, which works.
=COUNTIFS(A1:N7,"<90")
However, I'm unsure how to appropriately add the results from A12:L18 into it. My attempts have failed. Likewise, for the ranged functions, I'm completely lost. I've tried something like this:
=COUNT(FILTER(A1:N7,A1:N7>=90,A1:N7<=99.99))
Yet, this always returns 0 as the result. In addition, like the above formula I don't know how I'd nest in a way to check the additional fields in A12:L18.
An old thread, but I came across it trying to solve a similar problem.
Using the original example:
=COUNT(FILTER(A1:N7,A1:N7>=90,A1:N7<=99.99))
I was also getting zero until I realised COUNT returns the number of NUMERIC values in the range. Assuming the result range isn't numeric, I tried:
=COUNTA(FILTER(A1:N7,A1:N7>=90,A1:N7<=99.99))
and got the result I was expecting.
You just need count rows your matrix with ROWS()
=ROWS(FILTER(...))
Does this formula work as you want:
={"<90",COUNTIF({A1:N7;A12:N18},"<90");"90-99.99",COUNTIFS({A1:N7;A12:N18},">=90",{A1:N7;A12:N18},"<100");"100-109.99",COUNTIFS({A1:N7;A12:N18},">=100",{A1:N7;A12:N18},"<110");"=>110",COUNTIF({A1:N7;A12:N18},">=110")}
I made an example sheet where you can see it working: https://docs.google.com/spreadsheets/d/1BPexh5syksapZ9rd_brAa3NkN28LXAvB6dVMLEkM2r0/edit#gid=0

JIRA REST API different datetime format

With JIRA REST API there is at least 2 ways to get an issue:
/jira/rest/api/2/issue/{issueIdOrKey}
/rest/api/2/search?jql
I use both of them in my project but they return a slightly different results for updated field for the same issue.
Get by key: 2014-07-18T17:53:02.594+0300
Search: 2014-07-18T17:53:02.000+0300
By some reason milliseconds in search response are not set. It looks like a bug for me, but maybe there is configuration setting or something?
PS: I have the latest JIRA version (6.2.6)
JQL search results are generally fetched directly from the Lucene index, which stores timestamps with only millisecond resolution, whereas fetching the actual issue gets the date directly from the jiraissue table in the database, which can have sub-millisecond resolution (at least depending on your configured database).
EDITED: I see that I misread the precision above: the timestamp returned by getting the issue returns only milliseconds (vs nanoseconds) and the JQL query returns only integer seconds (vs milliseconds), so the Lucene data type linked above is not relevant.
However, the answer is still the same: JQL gets the result from Lucene, while an issue fetch gets the value directly from the database. On further investigation of why the Lucene index is not returning milliseconds: in the JIRA source in BaseFieldIndexer.indexDateField, JIRA calls LuceneUtils.dateToString(date) to convert the created field into a value that is indexable by Lucene. The dateToString method explicitly converts the field into an integer number of seconds (lopping off any milliseconds in the process), and it then converts the number to a String representation for indexing purposes.
Odd! I checked this with a 6.2 instance and also got a difference:
JQL: updated: 2014-07-11T19:34:04.000-0500
Key: updated: 2014-07-11T19:34:04.768-0500
I bet the code that returns the list of issues from a search uses a different date formatter that clears the milliseconds, whereas the one that returns the data from a single issue doesn't do that. I don't know of any configuration setting that would affect that.
I recommend filing it as a minor bug at http://jira.atlassian.com/browse/JRA
Minor because any code that is checking something based on ms seems unwise.

Getting adjusted price information from Yahoo! Finance API for multiple symbols in one call

I would like to get the adjusted price (adjusting for splits and dividends) for a group of stock symbols using Yahoo! Finance. It looks like the historical prices call is limited to one symbol at a time. Could please let me know if there is a way to get multiple symbols in one call?
I would like to get this data so I can do some back testing on that data. Since I may require quite a few symbols (say 500-1000), it will be easier if I can make just a few batch calls to Yahoo!'s servers instead of making one call per symbol everyday.
Another way of getting the adjusted price is to use their daily stock price api and adjust it manually using dividend and splits information (they allow multiple symbols for their daily stock quotes). Unfortunately I cannot find any way to get splits information from the http call (guessing based on 50% or 200% is one option but if you deal with penny stocks, this can be dangerous and cannot figure out uneven splits). Also, the dividend information returned by it is not easy to decode. They seem to be returning the total over 4 quarters and the dividend date doesn't really correspond with the actual dividend date based on the historical price. The various options for the call can be found here: http://www.gummy-stuff.org/Yahoo-data.htm
Any suggestions on getting adjusted price for multiple symbols? Or Am I unnecessarily worrying about making 100s of calls to Yahoo! everyday? Ideally I would like to download all the required data within a couple of hours each day - that would be 10-20 calls per minute. Is that too much? I couldn't find any documentation on the permissible number of requests per second.
I am open to other places where I can get similar data. However, since I am just trying to learn the basics of quant trading and not trade, I would prefer free downloads.
Thanks
-e
This is an old question, but I did find a source where split data is available. Not sure how comprehensive these announcements are though:
http://biz.yahoo.com/c/09/s1.html
In the url, the "09" part is the year (2009), and the "s1" part is the month (s1 = Jan, s2 = Feb., s3 = Mar., etc.)
It isn't a nice clean CSV, but the format of the page is consistent and should be parseable. Just make a query each day for the current month, parse the page, and process any splits that you didn't see the day before.
ETA: And another source (probably less reliable than Yahoo, but can be queried by ticker):
http://getsplithistory.com/
I am not sure which language you are using but I have a sample in C#. I think it will give you the idea at least or may be help some one else
private string BASE_URL = "http://query.yahooapis.com/v1/public/yql?q=" + "select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20({0})" + "&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";
Collection<Quote> quotes;
string symbolList = String.Join("%2C", quotes.Select(w => "%22" + w.Symbol + "%22").ToArray());
string url = string.Format(BASE_URL,symbolList);
XDocument doc = XDocument.Load(url);
Parse(quotes,doc);
What we are doing here is appending "," to each array item then passing that symbol list to yahoo. I have successfully fetched prices for 700 symbols in each call. Hitting yahoo servers for each ticker is a pain. I fetch stock prices for all of 6500+ tickers everyday. Earlier it use to take 3 hours now it is less than 2 mins.....sweet
Source link for that code is here - http://www.jarloo.com/get-yahoo-finance-api-data-via-yql/
P.S. Please get a api key to work smoothly. The above url is a public link where tables are timed out most of the time. Once you get an api key then your url will be (minus "public")
http://query.yahooapis.com/v1/yql

Resources