diff --git a/toarstats/trends/utils.py b/toarstats/trends/utils.py
index 2ef7fc185c7aa1767b735362279a3418e7242ece..5f18082e173f88bf0416872752d2b67cc2f5be13 100644
--- a/toarstats/trends/utils.py
+++ b/toarstats/trends/utils.py
@@ -4,6 +4,8 @@ This module contains the following function:
 deseasonalize - calculate the trend using the requested method
 """
 
+import statsmodels.formula.api as smf
+
 
 def deseasonalize(data):
     """Deseasonalize the data.
@@ -13,4 +15,9 @@ def deseasonalize(data):
 
     :return: The deseasonalized data
     """
+    seasonal_cycle = smf.ols(
+        "value~np.cos(month*2*np.pi/12)+np.sin(month*2*np.pi/12)"
+        "+np.cos(month*4*np.pi/12)+np.sin(month*4*np.pi/12)",
+        pd.DataFrame({"value": data["value"], "month": data.index.month})
+    ).fit(method="qr").predict(pd.DataFrame({"month": range(1, 13)}))
     return data