Switch index to count

# run to switch index to count
spx_ts2 <- spx_ts %>% drop_na()
spx_ts2 <- spx_ts2 %>% 
  mutate(count = 1:length(spx_ts2$time)) %>%
  update_tsibble(index = count)

STL Decomposition of SPX500 - weekend gaps filled

spx_ts2 %>%
  model(STL(close ~ season(period = 276))) %>%  
  components() %>%
  autoplot() + 
  labs(title = "STL Decomposition of SPX500 - time index ignored") +
  theme_bw()