Aan de slagGa gratis aan de slag

Load the PortfolioAnalytics package

The package PortfolioAnalytics will be used throughout this course for portfolio optimization and analysis. We will use the indexes dataset that is included with the PortfolioAnalytics package for the remaining exercises in this chapter. In this exercise, we will load the package and prepare the data for the portfolio optimization problem in the next exercise.

Deze oefening maakt deel uit van de cursus

Intermediate Portfolio Analysis in R

Cursus bekijken

Oefeninstructies

  • Load the PortfolioAnalytics package.
  • Load the indexes dataset.
  • Subset the indexes dataset to use the first four columns and assign to a variable named index_returns.
  • Print the head of the index_returns.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Load the package


# Load the data


# Subset the data


# Print the head of the data

Code bewerken en uitvoeren