msfinance offers Pythonic way to download stocks financial data from morningstar.com/stocks
pip install msfinance
#!/usr/bin/python3 -u
import msfinance as msf
stock = msf.Stock(
database='msf_database.db3',
)
print(stock.get_income_statement('aapl', 'xnas'))
print(stock.get_balance_sheet_statement('aapl', 'xnas'))
print(stock.get_cash_flow_statement('aapl', 'xnas'))
print(stock.get_growth('aapl', 'xnas'))
print(stock.get_operating_and_efficiency('aapl', 'xnas'))
print(stock.get_financial_health('aapl', 'xnas'))
print(stock.get_cash_flow('aapl', 'xnas'))
- More examples are placed in examples directory. Add msfinance path to environment variable: PYTHONPATH, and run examples directly
- Get all tickers symbol of each exchange here
- Get all tickers numbers of Heng Seng Index here
- Add 'Last Updated' to database record
- Add support for pip package
- Add tickers from HK exchanges
- Add docs in docs directory for readthedoc.io
- Add multiprocessing for speed up
- More robust error handling
- Add more statistics valuations