2. Första plots

The exercise was created 2024-03-25 by Makizon. Question count: 13.




Select questions (13)

Normally, all words in an exercise is used when performing the test and playing the games. You can choose to include only a subset of the words. This setting affects both the regular test, the games, and the printable tests.

All None

  • välja vilka kolumner som ska vara kvar i dataset "COST" COST <- COST[, c(1,6)]
  • kopiera dataset "COST" COST2 <- COST
  • byta namn på kolumner i dataset "COST" names(COST) <- c("date", "adj.close")
  • gör adj.close till timeseries COST$adj.close <- ts(COST$adj.close, start=c(2017,01), frequency=12)
  • plot för adj.close ts.plot(COST$adj.close, main="Adjusted Close vs Time", xlab="Time", ylab="Adjusted Close")
  • gör LOGADJCLOSE COST$LOGADJCLOSE <- log(COST$adj.close)
  • gör LOGRETURN för adj.close COST$LOGRETURN <- c(NA, diff(COST$LOGADJCLOSE))
  • gör LOGADJCLOSE till timeseries COST$LOGADJCLOSE <- ts(COST$LOGADJCLOSE, start=c(2017,01), frequency=12)
  • plot LOGADJCLOSE ts.plot(COST$LOGADJCLOSE, main="Adjusted Log Close vs Time", ylab="Log Close")
  • gör LOGRETURN till timeseries COST$LOGRETURN <- ts(COST$LOGRETURN, start=c(2017,01), frequency=12)
  • plot LOGRETURN ts.plot(COST$LOGRETURN, main="Log Return vs Time", ylab="Log Return")
  • lägg till en linje abline(h=0, lty=2, col="red")
  • varför gör man dom här plotsen i början? trender, stationarity

All None

Shared exercise

https://spellic.com/eng/exercise/2-forsta-plots.11989196.html

Share