Question: Attempting to create a dataset using the tidyquat package in R for the stocks TSLA, JNJ , GOOGL, and GE for Jan 1 , 2

Attempting to create a dataset using the tidyquat package in R for the stocks TSLA, JNJ, GOOGL, and GE for Jan 1,2018 to Dec 31,2022(using stocks <- c(TSLA,JNJ,GOOGL,GE)%>% tq_get(get =stock.prices, from =2018-01-01, to =2022-12-31)'). Then creating an equally weighted portfollio of these stock and using the adjusted price to calculate the monthy returns for the portfolio. Please provide R code for how to do this.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!