# How to get the formulas used by seasonal_decompose for Trend and Seasonality

I'm trying to use decomposition to forecast into the future. From my reading I understand that I can do this by adding a trend formula to a seasonality formula. I know that I can decompose a time series with this:

import statsmodels.api as sm

trend = result.trend
seasonal = result.seasonal
residual = result.resid


The trend, seasonal and residual variables are arrays of numbers. I've searched google and the documentation for seasonal_decompose and haven't found a way to see/get access to the formulas used to calculate the numbers for trend and seasonal.

From my understanding, I need those formulas in order to be able to make projections. Do you know of a way to get those formulas from seasonal_decompose? Is there another function or method that works better for this?

• Triple exponential smoothing (other name Holt-Winters method) does the same thing and is well described in internet. – keiv.fly Dec 5 '18 at 20:59
• @keiv.fly Awesome, that is exactly what I needed. I just didn't know that that term existed. I see tons of content on how to use it. Thank you. – Jarom Dec 5 '18 at 21:35