This repository contains code to display metrics for UK disclosed short positions. You can see the output on my website: https://nikulpatel.dev/projects/uk_short_tracker/
The process is relatively straightforward:
- Download UK Short Disclosures from the FCA website
- The disclosures are identified by ISINs, so query OpenFIGI to get the underlying tickers
- Use these tickers to query for market data from Yahoo Finance
- For simplicity we save all data to a SQLite database in data.sqlite
- This is for keeping the most recent data for disclosures and shares outstanding since these are updated daily and cannot be historically queried
- (actually historical disclosures data is available but is difficult to work with. See the Notebooks/hist_scripting.ipynb notebook for more details)
- This is for keeping the most recent data for disclosures and shares outstanding since these are updated daily and cannot be historically queried
- Load the data, calculate all required metrics
- Use
pandas.style
to nicely format the tables as HTML and save as a json in output/output.json - Commit the changes to
data/
andoutput/
to the repository
This procedure is scheduled to run using GitHub actions every day using this workflow file.
(Some) inspiration for this project comes from another short tracker by Castellain Capital: https://shorttracker.co.uk/
This uses various sourcees of data to compile the report:
- FCA (for the short filings)
- Yahoo Finance (for stock prices + volume + shares outstanding)
- OpenFIGI (to find tickers given ISINs)
AFAIK I'm not breaking any rules by using data in this way. If I am, please let me know.
General code cleanup + refactoring.