Exercise

Plot P/B vs. ROE

Now that you have calculated the ROE and P/B multiples for the midcap Consumer Discretionary firms, we can now plot the P/B multiple (y-axis) vs. ROE (x-axis). We then add a trendline to the plot to visually demonstrate the trend, if any, between the two variables. The data for roe and p_bv are in the cons_disc dataset.

Instructions

100 XP
  • Set the x-axis range to make sure the entire range of ROE values are covered using min() and max().
  • Set the y-axis range to make sure the entire range of P/B values are covered using min() and max().
  • Plot the P/B vs. ROE data and label the x-axis "Return on Equity" and y-axis "Price-to-Book".
  • Add a trendline using the regression model using abline().