As we all know, comparing stocks is often an essential process when deciding where to invest our money. If we don't have an expensive tool like Bloomberg or something else, we have to open several tabs from Yahoo Finance or another website and jump back and forth to compare some key values of different stocks. This little tool aims to solve this problem by making it easier to access and compare raw data.
β 01-09-2022 03:10pm To my regret, the underlying API is no longer available, I may try to switch to an alternative one. Hopefully the following pictures and source code can give a good impression of the project. Here you can see a snapshot on how the used API looked like: https://web.archive.org/web/20220408141905/https://www.yahoofinanceapi.com/ β
β 01-09-2022 03:17pm There is a new alternative linked below in the installation guide. β
- install needed packages
pip install -r requirements.txt
- β discontinued β create an account at https://www.yahoofinanceapi.com/dashboard to get your
API TOKEN
- β new alternative β create an account at https://financeapi.net/dashboard to get your
API TOKEN
- write the API TOKEN into
service/.env
- write the API TOKEN into
- run
python app.py
(I recommend adding an alias for more convenient use) - you can do 100 free requests a day
- list of commands:
help
to show all commands and instructionsclear
to clear the terminalmarket
to get a market overviewquit
to end the programsymbol name
, finds the symbol for a given stockname, for example symbol Microsoftname symbol
, returns the companys name, for example name MSFTprice symbol
, returns the current pricemarketcap symbol
, returns the companys valuationtrailingpe symbol
, returns the P/E Ratio based on last 12 monthforwardpe symbol
, returns the P/E Ratio based on estimated earningyeareps symbol
, returns yearly earnings per sharetrailingeps symbol
, returns last twelve month earnings per shareyearpe symbol
, returns yearly P/E Ratiotwoav symbol
, returns the twohundred day average pricedivyield symbol
, returns the dividend yieldcmp symbol_1,...,symbol_n
, compares multiple stocks in a table