5tatefulNation / fin-sweep

0 stars 0 forks source link

Find the best data source #1

Open 5tatefulNation opened 2 weeks ago

5tatefulNation commented 2 weeks ago

We need to know where we can pull data from, so that we don't need to create, update, and maintain our own databases over time.

Consider

Tasks

5tatefulNation commented 2 weeks ago

QuickFS is what you already use to meet your needs, they have public API, and it's free up to 500 requests per day.

Still need to map out the data points that you need, and to play with the API a bit. The paid tier includes "200+" financial metrics - we'll have to see what's available for free. Unless you already pay for it, then we should be able to get an API key from your existing account.

https://quickfs.net/features/public-api https://quickfs.net/pricing

Let's not even worry about researching other data providers, unless we hit a wall somewhere.

jresidori commented 1 week ago

I added a file to retrieve data: /src/stock_data.py Here are the metrics that I am trying to retrieve:

ROI, PE ratio, and Earnings yield are not working. I wrote a script to view all the metrics on QuickFS. I pretty sure these three metrics were labeled incorrectly in "/src/stock_data.py".

We ran out of requests on QuickFS to check if the new labels worked. We might need to pay for better access to QuickFS's API or pivot to a service that can provide free data.

5tatefulNation commented 1 week ago

Also found these options:

Finazon: Finazon is a powerful API that provides access to a wide range of financial data. It offers real-time data, historical data, and various other features that can be beneficial for financial analysis and decision-making. It's a reliable choice for those who need comprehensive and accurate financial data.

Twelve Data: Twelve Data is another excellent API for accessing financial data. It provides real-time and historical stock data, forex data, cryptocurrency data, and more. It's known for its easy-to-use interface and extensive coverage, making it a good choice for both beginners and experienced users.

Alpha Vantage: Alpha Vantage offers free APIs for historical and real-time data on stocks, forex, and cryptocurrencies. It also provides data on options, making it a versatile choice for those interested in various types of financial data.

source: https://www.reddit.com/r/webdev/comments/151zk8y/is_there_any_free_stock_market_api_that_allows/

5tatefulNation commented 1 week ago

Let's also trim back the first use case to get something built and working. I read through the python script you wrote, and it gave me a better sense of what you're trying to build. It's dope, but ambitious for a first pass.

Instead of searching for all the companies that meet the financials criteria within the date range, let's build an app that just returns all the metrics you care about for a single search box.

5tatefulNation commented 1 week ago

Playing with the alpha vintage API. Here's all the data that gets returned for a ticker. Need to map the right ones into our API call.

Not all the data is coming in right, but you can play with something here: https://5tatefulnation.github.io/fin-sweep/

{ "Symbol": "GOOGL", "AssetType": "Common Stock", "Name": "Alphabet Inc Class A", "Description": "Alphabet Inc. is an American multinational conglomerate headquartered in Mountain View, California. It was created through a restructuring of Google on October 2, 2015, and became the parent company of Google and several former Google subsidiaries. The two co-founders of Google remained as controlling shareholders, board members, and employees at Alphabet. Alphabet is the world's fourth-largest technology company by revenue and one of the world's most valuable companies.", "CIK": "1652044", "Exchange": "NASDAQ", "Currency": "USD", "Country": "USA", "Sector": "TECHNOLOGY", "Industry": "SERVICES-COMPUTER PROGRAMMING, DATA PROCESSING, ETC.", "Address": "1600 AMPHITHEATRE PARKWAY, MOUNTAIN VIEW, CA, US", "OfficialSite": "https://abc.xyz", "FiscalYearEnd": "December", "LatestQuarter": "2024-06-30", "MarketCapitalization": "2021272191000", "EBITDA": "115478004000", "PERatio": "23.44", "PEGRatio": "1.255", "BookValue": "24.41", "DividendPerShare": "0.2", "DividendYield": "0.0049", "EPS": "6.97", "RevenuePerShareTTM": "26.35", "ProfitMargin": "0.267", "OperatingMarginTTM": "0.324", "ReturnOnAssetsTTM": "0.16", "ReturnOnEquityTTM": "0.309", "RevenueTTM": "328284013000", "GrossProfitTTM": "156633000000", "DilutedEPSTTM": "6.97", "QuarterlyEarningsGrowthYOY": "0.314", "QuarterlyRevenueGrowthYOY": "0.136", "AnalystTargetPrice": "203.91", "AnalystRatingStrongBuy": "15", "AnalystRatingBuy": "30", "AnalystRatingHold": "10", "AnalystRatingSell": "0", "AnalystRatingStrongSell": "0", "TrailingPE": "23.44", "ForwardPE": "21.23", "PriceToSalesRatioTTM": "6.16", "PriceToBookRatio": "6.68", "EVToRevenue": "5.93", "EVToEBITDA": "16.87", "Beta": "1.046", "52WeekHigh": "191.75", "52WeekLow": "120.07", "50DayMovingAverage": "173.32", "200DayMovingAverage": "156.3", "SharesOutstanding": "5859000000", "DividendDate": "2024-09-16", "ExDividendDate": "2024-09-09" }