# Weekly and Monthly Decomposition of Daily Time Series

I have a data set including daily prices and demand of a commodity. I am sure that, price and demand weekly and monthly changing. So it has a seasonality effect. How can I decompose it by using daily data ?

My data looks like this ;

The row number is 335 . So the last date is 2016-11-30.

I will try to catch a relationship between price and demand. But, not to face with a spurious regression, I have to decompose it first. Using weekly and monthly dummies is an option, but I want to use stl() or decompose() functions, or another one maybe.

But that one also does not work! I couldn't achieve to transform it to timeseries data!

• Please explain the statistical question here. If you are simply seeking R advice, the post is, it seems, off-topic. – Nick Cox Mar 6 '17 at 12:57
• Well, I am pretty new in this site. Should I ask R-based questions in somewhere else ? – maydin Mar 6 '17 at 13:05
• You should try as.ts(). The link below may help: anomaly.io/seasonal-trend-decomposition-in-r – Kyle Shank Jun 7 '17 at 17:39
• The problem is coming from the usage of daily data sets in R. The link you shared is related with montly or yearly data. Daily data is a problematic issue.. – maydin Jun 22 '17 at 7:51
• Daily data is not a problem for methods / software that I use . Are you still having a problem ? – IrishStat Sep 24 '18 at 14:44