Session Ready
Exercise

Calculate ROE and P/B

Before we can analyze the relation between ROE and P/B, we have to first calculate these variables. In this exercise, we will use data for the Consumer Discretionary firms that are in the S&P 400 Midcap Index, which are stored in the cons_disc object. The values for ltm_eps, bvps, and price for each firm are also stored in cons_disc.

Instructions
100 XP
  • Calculate Return on Equity.
  • Calculate Price-to-Book ratio.
  • Remove missing values from cons_disc using complete.cases().