CommencerCommencer gratuitement

Broad analysis

To check whether a company is doing well financially, you should check how it compares to its competitors in the same industry.

In this exercise, you'll compute the companies' average debt-to-equity ratio, asset turnover ratio, current ratio, and gross margin over several years.

You'll also compute the average of these ratios in the FMCG, Tech, and Real Estate industries over several years and see how the companies' ratios compare to their industry average.

Cet exercice fait partie du cours

Analyzing Financial Statements in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Compute average by company in each industry
company_avg = statement_info.pivot_table(index=____, values=["debt_to_equity"
                  ,"current_ratio"
                  ,"asset_turnover", "gross_margin"]).reset_index()
# Compute average in industry
industry_avg = statement_info.pivot_table(index=____, values=["debt_to_equity"
                  ,"current_ratio"
                  ,"asset_turnover", "gross_margin"]).reset_index()


industry_avg["company"] = "average"
plot_df = pd.concat([company_avg, industry_avg])
Modifier et exécuter le code