1. Using R, construct time series (line) plots for both stock prices and return series. R functions ts.plot or plot can create the plot. Describe the patterns and compare the plots.

Respuesta :

Answer:

The code in R for the time series is given as below.

Step-by-step explanation:

As the complete question is not presented thus a sample code for the variables is given as below

# Libraries

library(ggplot2)

library(dplyr)

library(plotly)

library(hrbrthemes)

# Load dataset

filepath=" Your dataset path here in csv format"

data <- read.table("filepath", header=T)

data$date <- as.Date(data$date)

# plot

data %>%

 ggplot( aes(x=date, y1=value1,x=date, y2=value2)) +

   geom_line(color="#69b3a2") +

   ylim(0,22000) +

   theme_ipsum()