ComenzarEmpieza gratis

New stocks description (2)

Now that you know what the new stocks look like, you want to find out if any of them provide diversification benefits to your existing portfolio. You can do this by looking at the correlation of each stock to our portfolio, visualized through regression lines.

In this exercise, you are provided with four individual series containing the return of the same four stocks:

  • Goldman Sachs (gs)
  • Coca-Cola (ko)
  • Walt Disney (dis)
  • Caterpillar (cat)

The return of your existing portfolio in portfolio are also available in your workspace. Now it's your turn to analyze the relationships!

Este ejercicio forma parte del curso

Visualizing Time Series Data in R

Ver curso

Instrucciones del ejercicio

  • Draw the scatterplot of gs against the portfolio
  • Add a regression line in red and twice as thick as normal
  • On a single graphical window, draw the scatterplots and the regression lines of the four stocks against the portfolio in the order given in the assignment text; add a regression line in red and twice as thick as normal to each plot

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Draw the scatterplot of gs against the portfolio


# Add a regression line in red


# Plot scatterplots and regression lines to a 2x2 window












Editar y ejecutar código