Reputation: 67
I started learning python and am currently working with yahoo_fin to look at financial data.
I can use stock_info.get_income_statement() to get the annual income statements but I was wondering if anyone knew of a way to get the quarterly income statement that you can view on yahoo's site.
Is this possible using yahoo_fin or do I need to use a different library?
Upvotes: 1
Views: 3533
Reputation: 193
from yahoofinancials import YahooFinancials
data = YahooFinancials('MSFT')
income_stat = data.get_financial_stmts(frequency = 'quarterly', statement_type =
'income')
After getting data, you might need to process it for better presentation
Upvotes: 2
Reputation: 1229
Try the get_data
function with arguments start_date
and end_date
.
get_data(ticker, start_date = None, end_date = None, index_as_date = True)
Downloads historical price data of a stock into a pandas data frame.
from1999 = get_data('msft' , start_date = '01/01/1999')
few_days = get_data('msft' , start_date = '01/01/1999' , end_date = '01/10/1999')
Upvotes: 1