Use the Yahoo Finance API to get info on stocks of interest and report on them
Yahoo has a Finance section on their website for info on stock prices.
They make this data available via a free public API - no auth needed.
For help on using the Yahoo API endpoints, see the SyncWith tool:
That interface lets you build and execute queries in the browser, showing your URLs and sample output.
This project uses the quote endpoint to get detailed info on stocks and the chart endpoint for a timeline of values.
Install Python 3 - see Gist.
Create a virtual environment:
$ python -m venv venv
Activate it:
$ source venv/bin/activate
Install packages into it:
$ make install
Update config.py for custom stock ticker values. You have to edit the file directly, but as a follow-up a config file outside of version control will be supported later.
Run the reports:
$ make run
See output CSVs written to app/var.
You can then put those in Google Sheets or Google Data Studio to make your graphs. Or try a Python or JS-based graphing solution.
Licensed under MIT by MichaelCurrin.