business-science / pytimetk

Time series easier, faster, more fun. Pytimetk.
https://business-science.github.io/pytimetk/
MIT License
697 stars 60 forks source link

Meta Issue: Technical Trading / Finance Module Wishlist #88

Open mdancho84 opened 1 year ago

mdancho84 commented 1 year ago

Need to discuss what all we want to add for version 0.3.0

mdancho84 commented 1 year ago

Time Series Filters and Singal Processing for Finance:

Time series filters are used in financial and quantitative analysis to extract meaningful information, trends, or components from financial time series data. Some filters are used to remove noise and smooth the data, while others are used to decompose time series into trend, seasonal, and residual components. Here are some commonly used filters:

  1. Moving Average (MA):

    • Computes the average of the data over a specific window. Used to smooth out short-term fluctuations and highlight longer-term trends.
    • Variants include Simple Moving Average (SMA), Exponential Moving Average (EMA), and Weighted Moving Average (WMA).
  2. Hodrick-Prescott Filter (HP Filter):

    • Decomposes a time series into trend and cyclical components. Commonly used in macroeconomic research to isolate the business cycle component.
  3. Bollinger Bands:

    • Based on SMA, these consist of three bands: the middle band being an n-period simple moving average (SMA), the upper band being the SMA plus x times an n-period standard deviation, and the lower band being the SMA minus x times an n-period standard deviation. It's used to identify overbought and oversold conditions in a financial instrument.
  4. Kalman Filter:

    • A recursive algorithm used to estimate the evolving state of a time series. It's especially useful when the time series is subject to noise.
  5. Decomposition:

    • Methods like STL (Seasonal-Trend decomposition using LOESS) or classical decomposition methods are used to decompose a time series into trend, seasonal, and residual components.
  6. Wavelet Transform:

    • Decomposes a time series into different frequency components. Useful for multi-resolution analysis.
  7. Gaussian Filter:

    • Uses Gaussian weights to smooth the time series data.
  8. Butterworth Filter:

    • A type of signal processing filter that is designed to have a frequency response which is as flat as possible in its pass-band.
  9. Savitzky-Golay Filter:

    • Used to smooth data and differentiate. It fits successive sub-sets of adjacent data points with a low-degree polynomial using linear least squares.
  10. Baxter-King Filter and Christiano-Fitzgerald Filter:

    • These are band-pass filters often used in macroeconomics to isolate business cycle frequencies.
  11. GARCH (Generalized AutoRegressive Conditional Heteroskedasticity):

    • Not a filter per se, but a model used to forecast volatility, which is inherently a filtering process.

These filters and methods serve various purposes, from simple visualization to sophisticated modeling and forecasting. The choice of a filter often depends on the specific objective of the analysis, nature of the data, and its underlying characteristics.

mdancho84 commented 1 year ago

More in Finance Filters:

https://x.com/pyquantnews/status/1718295654156619778?s=46&t=npiSgI5uPxafM5JqdAQNDw

mdancho84 commented 1 year ago

AlphaVantage has a nice list that we can work from: https://www.alphavantage.co/documentation/#technical-indicators

image

mdancho84 commented 1 year ago

Based on feedback from our Quant Science trading community: