ABSTRACT

We will be working with the portfolio returns objects that were created in the Returns section. If you are starting a new R session and want to run the code to build those objects, navigate here:

www.reproduciblefinance.com/code/get-returns/

To simulate based on mean and standard deviation, we first assign our mean and standard deviation of returns to variables called mean_port_return and stddev_port_return. Those names might seem wordy but we never want to assign a variable with the name mean because mean is also the name of a function in R.