Skip to content

Order of financial dates  #190

@promexio

Description

@promexio

Hi,
I do not get how the order of dates is established - let's run the following and have a look to the result - the dates are not sorted in a logical sequence, why? What am I doing wrong? Kr --Gabriel

ticker = 'AAPL'

yahoo_financials = YahooFinancials(ticker)

#print(yahoo_financials.get_financial_stmts('annual', 'cash')['cashflowStatementHistory'][ticker].keys())
cf = yahoo_financials.get_financial_stmts('annual', 'cash')['cashflowStatementHistory'][ticker]
bs = yahoo_financials.get_financial_stmts('annual', 'balance')['balanceSheetHistory'][ticker]
pl = yahoo_financials.get_financial_stmts('annual', 'income')['incomeStatementHistory'][ticker]

print(cf)
print(bs)
print(pl)

print("cashflow:")
for i, date in enumerate(cf):
    print(i,date)
print("..............")

print("balancesheet:")
for i, date in enumerate(bs):
    print(i,date)
print("............")

print("p&l:")
for i, date in enumerate(pl):
    print(i,date)


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions