I am new to time series analysis and I am trying out some codes seen in some tutorials. I am using stock prices as the time series data.
library(quantmod) aapl=getSymbols("AAPL",from="2015-01-01",auto.assign=F) is.ts(aapl) ts.aapl=as.ts(aapl) is.ts(ts.aapl) x=Cl(ts.aapl) head(x) plot(decompose(s)) plot(stl(x))
But its showing these errors
> plot(decompose(x)) Error in decompose(x) : time series has no or less than 2 periods > plot(stl(x)) Error in stl(x) : series is not periodic or has less than two periods
is the error is due to its lack of seasonality and trend?