mrhappyasthma / IsThisStockGood

A tool for evaluating companies using the Rule #1 investing principles.
http://www.isthisstockgood.com
22 stars 10 forks source link

Suggestion: Include other stocks instead of just US ones #49

Closed Jaykingamez closed 3 months ago

Jaykingamez commented 2 years ago

Title.

Perhaps the input should be customized. The first will be a dropdown selector allowing the user to choose the market of the stock. The second will be a text input where the user can type the ticker of the stock.

mrhappyasthma commented 2 years ago

I've considered this, but it's tricky to find reliable (free) sources of data for other markets. The current implementation relies on three sites for the main datapoints for the computation (Yahoo, Morningstar, MSN Money). If any of them are missing data, most of the calculations cannot be completed.

Since I don't do a lot of non-US investing, I haven't done a lot of searching. But the action items would probably be:

  1. Play around with the different markets and see which of the existing sites have inadequate data.
  2. Find replacement websites to scrape to grab the missing data (conditionally based on the market)
  3. Update the UI to add the drop-down that you mentioned for selecting the market
benninkcorien commented 2 years ago
  1. Alpha Vantage has a free API that might work.

(And can I add a general thank you for making this, and putting it on github!)

mrhappyasthma commented 2 years ago

Thanks for the pointer. I'll look in to Alpha Vantage when I have some time and play around with their APIs.

Jaykingamez commented 2 years ago

Let me also thank you for making this, was looking to code one myself but found this :)

Looking at the Morningstar API, perhaps it can be updated

http://financials.morningstar.com/ajax/exportKR2CSV.html?t=x:y

For instance, if one searches cd projekt red on Morningstar https://www.morningstar.com/stocks/xwar/cdr/analysis XWAR is the x, and cdr is the y

http://financials.morningstar.com/ajax/exportKR2CSV.html?t=xwar:cdr would also give you ten years of financial data.

A "Referer" header must also be added on. https://financials.morningstar.com

Benefits: Could search for every stock globally

Problem: There seems to be no structure to x, while Y is the ticker, which leaves two options.

  1. Users have to manually search for whatever morningstar designated as X, while typing the ticker as Y
  2. Scrape from Morningstar what is x (a bit more complicated and will need some work) The first will be a dropdown selector allowing the user to choose the market of the stock. The second will be a text input where the user can type the ticker of the stock.

But for now, I have been just using ADRs to look at international stocks. I must thank you again for making this tool!

mrhappyasthma commented 2 years ago

Looks like morningstar has moved a lot of their APIs and put them behind a paywall. many of the queries that were working before now return "The report is no longer supported".

I fell back to using an older site, that is also US only for now. Just to keep the web page functional. But I think it's overdue to find a more reliable and robust data source.

I still haven't found time to dig deeply in to Alpha Vantage, but I will one of these weekend.

losgrandes commented 1 year ago

Looks like MSN Money provides data for markets outside US. Below example for CCC company from Poland:

Get the company SecID: https://services.bingapis.com/contentservices-finance.csautosuggest/api/v1/Query?query=ccc Get financial data once we have SecId: https://services.bingapis.com/contentservices-finance.financedataservice/api/v1/KeyRatios?stockId=aqbuvh

mrhappyasthma commented 3 months ago

The code is now working primarily off of MSNMoney, so I believe this is fixed per losgrandes comment above.

https://github.com/mrhappyasthma/IsThisStockGood/commit/4ae7c2744ad7d1d386c5b28acf3700f9b1e75ef7