Creating and decomposing a daily time series

Viewed 626

I have a number of observations for a stock price from 2017-07-28 to 2020-07-12 amounting to 743 entries. If I run the class command the output is xts and zoo. Since I want to implement an arima model, I am trying to decompose the ts using the decompose command. The code I used is

data.ts <- ts(stockprice, start = c(2017,07), frequency = 365.25)
price.de <- decompose(data.ts) 

If I plot the results however this is what I get is

enter image description here

I find the random part really weird so I think I made a mistake here. Could it be because the data is not really daily but only recorded on the days the market is open (working days)?

0 Answers
Related