Detrending and deseasonalizing data with fourier series
QuantPy QuantPy
67.6K subscribers
17,728 views
0

 Published On Jul 13, 2022

This is Part 3 of a multi-part series on Pricing Weather Derivatives. In this video we take Daily Average Temperature (DAT) series from Sydney Observatory Hill starting from 1-Jan 1859 and attempt to de-trend and remove seasonal variation using fourier series. In timeseries this is also known as time series decomposition, where the terms are detrending and deseasonalizing data.

The denoised temperature time series reveals that temperatures have somewhat uniform peaks. This implies that we could use a first order fourier series model to estimate the seasonal variation in Daily Average Temperature.

For parameter estimation of the first order fourier series model, here we use xscipy.optimize.curve_fit which implements the Levenberg-Marquardt algorithm (LMA). This is a method of non-linear least squares and combines both the Gauss-Newton algorithm (GNA) and gradient descent methods.

Online written tutorial: https://quantpy.com.au/weather-deriva...

In this series we take a deep dive into a type of exotic financial products weather derivatives. Weather derivatives are financial instruments that can be used to reduce risk associated with adverse weather conditions like temperature, rainfall, frost, snow, and wind speeds.

Historical Data, Weather Observations for Sydney, Australia – Observatory Hill: http://www.bom.gov.au/climate/data/st...

★ ★ Code Available on GitHub ★ ★
GitHub: https://github.com/TheQuantPy
Specific Tutorial Link: https://github.com/TheQuantPy/youtube...

★ ★ QuantPy GitHub ★ ★
Collection of resources used on QuantPy YouTube channel. https://github.com/thequantpy

★ ★ Discord Community ★ ★
Join a small niche community of like-minded quants on discord.   / discord  

★ ★ Support our Patreon Community ★ ★
Get access to Jupyter Notebooks that can run in the browser without downloading python.
  / quantpy  

★ ★ ThetaData API ★ ★
ThetaData's API provides both realtime and historical options data for end-of-day, and intraday trades and quotes. Use coupon 'QPY1' to receive 20% off on your first month.
https://www.thetadata.net/

★ ★ Online Quant Tutorials ★ ★
WEBSITE: https://quantpy.com.au

★ ★ Contact Us ★ ★
EMAIL: [email protected]

Disclaimer: All ideas, opinions, recommendations and/or forecasts, expressed or implied in this content, are for informational and educational purposes only and should not be construed as financial product advice or an inducement or instruction to invest, trade, and/or speculate in the markets. Any action or refraining from action; investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied in this content, are committed at your own risk an consequence, financial or otherwise. As an affiliate of ThetaData, QuantPy Pty Ltd is compensated for any purchases made through the link provided in this description.

show more

Share/Embed