Case Begins:
You have recently joined as a Portfolio Manager at Morgan Stanley. The first task assigned to you is to create a portfolio for a client who is interested in investing 1 million Euro in secondary markets. He wants the money to be “fully-invested”, but he is not aware of weight allocation in a scientific manner. Your employer has given you the responsibility to not only select the bunch of asset class for investment, but also allocate weight so as to garner more returns with limited risk.
After analyzing the market trends, you are bullish in your approach and have narrowed down to the three asset classes for selection of Portfolio Universe.
1. Stocks - Google, Tesla, Pfizer, Shell, AT&T
2. Forex - USDINR, EURUSD, USDCAD, USDCHF, NZDUSD
3. Commodities - Crude, Natural Gas, Gold, Wheat, Ethanol
Asset Tickr
Google GOOGL
Tesla TSLA
Pfizer PFE
Shell SHEL
AT&T T
USDINR USDINR
EURUSD EURUSD
USDCAD USDCAD
USDCHF USDCHF
NZDUSD NZDUSD
Crude WTI
Natural Gas NG
Gold XAU
Wheat W1
Ethanol EH

Note: Portfolio constraints from your supervisor
1. Portfolio should consist of 5 assets
2. Atleast one from Commodity and one from Forex
Historical Price Information
To constitute Portfolio you will require the Price series for the selected datasets. For your rescue, the system portal provides an easy way to download the closing price series. You just have to pass your “employee id” to number generator and it will generate the monthly historic price series for you.
Note: *Your employee id will be the student id at DCU **
Example -
Student Name - Thomas Edison
DCU Student No. - 1234567
emp id will be - 1234567
You have to pass on your DCU Student No. value to variable emp_id to generate the price series.
Kindly run the code chunk below after passing your Student No. to generate historical price series
{r} ####### enter your DCU Student id for the emp id variable emp_id <- 23260775 dig_count <- nchar(emp_id) - 3 rand_numb_init <- emp_id / (10 ^ dig_count) ################ Import date data #################### library(readxl) date_data <- read_excel(“Date.xlsx”) ############ Tickr symbols ##################### tickr_list <- c(“GOOGL”, “TSLA”,“PFE”,“SHELL”,“T”,“USDINR”,“EURUSD”,“USDCAD”,“USDCHF”,“NZDUSD”,“WTI”,“NG”,“XAU”,“W1”,“EH”) #### Historical Price series generation Portfolio Universe ############# set.seed(emp_id) raw_price_data <- matrix(,ncol = 1) multiplier <- seq(from = 3, to = 10, by = 0.5) for (i in 1:length(tickr_list)) { rand_price <- as.data.frame(runif(nrow(date_data), min=rand_numb_init, max= rand_numb_init * sample(multiplier,size = 1,replace = TRUE))) raw_price_data <- cbind(raw_price_data,rand_price) } raw_price_data <- raw_price_data[,-1] colnames(raw_price_data) <- tickr_list ######## Combining all the historical price along with Date ##3 price_data <- cbind(date_data,raw_price_data) writexl::write_xlsx(price_data,“Historical_Price_data.xlsx”)
Annual risk-free rate
Kindly run the code to generate the annual risk-free rate
{r} annual_rf <- abs(rnorm(1,mean = 0, sd = 0.75))/1000
Price to Earning Ratio
Kindly run the code to generate P/E ratio
{r} ##### Price to Earning Ratio P_E_ratio <- runif(ncol(raw_price_data), min=rand_numb_init * 5, max= rand_numb_init * 5 * sample(multiplier,size = 1,replace = TRUE))/100 names(P_E_ratio) <- tickr_list
, Case Detailing Ends ,
Rest of the questions have to be answered in context of the case study.
, Question Begins , Portfolio Universe Selection

Since, you have to make a Portfolio constituting of five assets only, you select the assets based on the basis of two strategies as shared below.

Strategy 1:

Step 1: Calculate the Reward to Risk - (Median Return/Standard Deviation)

Step 2: Rank the Reward to Risk for Assets, then choose the top five asset while maintaining the constraint (Atleast one Commodity and one Forex)

Note: In case of tie, you choose the asset with higher mean return.

Strategy 2:

Based on Price/Earning Ratio while maintaining the constraint (Atleast one Commodity and one Forex)

Note: After filtering the 5 assets, export the file either as .csv or .xlsx

Insert the code chunk below.