शुरू करेंमुफ़्त में शुरू करें

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.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Equity Valuation in R

पाठ्यक्रम देखें

अभ्यास निर्देश

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

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Calculate ROE
cons_disc$roe <- ___

# Calculate Price to Book ratio
cons_disc$p_bv <- ___(cons_disc$bvps <= 0, ___, ___)

# Remove NA
cons_disc_no_na <- cons_disc[___, ]
head(cons_disc_no_na)
कोड संपादित करें और चलाएँ