JerBouma / FinanceToolkit

Transparent and Efficient Financial Analysis
https://www.jeroenbouma.com/projects/financetoolkit
MIT License
2.84k stars 347 forks source link

[IMPROVE] Period columns are not aligned with fiscal year reporting #95

Closed laurynasas closed 9 months ago

laurynasas commented 9 months ago

Hello!

For some companies (such as Apple) fiscal year does not align with the calendar year. This is a common practice among many retail and technology companies, as it allows for a more consistent comparison of year-over-year performance, particularly in industries where sales can be highly seasonal.

I believe we should use fiscal year periods for fetching the reports instead of calendar year, what do you think?

Example:

companies = Toolkit(
    tickers=['AAPL'], 
    api_key=FMP_KEY, 
    start_date="2023-01-01",
    quarterly=True,
)

print(companies.get_statistics_statement())

returns:

date                                                          2023Q1                                             2023Q2                                             2023Q3
Reported Currency                                                USD                                                USD                                                USD
CIK ID                                                        320193                                             320193                                             320193
Filling Date                                              2023-05-05                                         2023-08-04                                         2023-11-03
Accepted Date                                    2023-05-04 18:03:52                                2023-08-03 18:04:43                                2023-11-02 18:08:27
Calendar Year                                                   2023                                               2023                                               2023
Period                                                            Q2                                                 Q3                                                 Q4
SEC Link           https://www.sec.gov/Archives/edgar/data/320193...  https://www.sec.gov/Archives/edgar/data/320193...  https://www.sec.gov/Archives/edgar/data/320193...
Document Link      https://www.sec.gov/Archives/edgar/data/320193...  https://www.sec.gov/Archives/edgar/data/320193...  https://www.sec.gov/Archives/edgar/data/320193...

the documents and periods would not align with the date columns.

Thanks a lot!

JerBouma commented 9 months ago

Hi @laurynasas, I purposely did it the other way around. Apple's Q4 2023 (July - September 2023) is adjusted to Q3 2023 so that it allows for proper comparison between other companies (given that it matches up with the calendar period Q3). This is done for all companies that have a deviating calendar year. You wouldn't be able to compare e.g. Microsoft to Apple as easily as you see here:

image

I need to write these adjustments down in a Q&A I believe to prevent confusion. Do you disagree with this method?

laurynasas commented 9 months ago

Yeah, it makes sense, it helps with the fair comparison, thanks for the explanation!