dependabot

This commit is contained in:
Miha Kralj
2024-09-26 10:44:09 -07:00
parent 71f49e8815
commit 148f0ea846
60 changed files with 7437 additions and 1304 deletions
+17 -29
View File
@@ -1,39 +1,27 @@
## AFIRMA: Adaptive Filtering Integrated Recursive Moving Average
# AFIRMA: Autoregressive Finite Impulse Response Moving Average
### Concept
## Concept
AFIRMA combines elements of simple moving averages (`SMA`) with adaptive filtering techniques from signal processing. It aims to provide a more responsive indicator that can quickly adjust to market changes while maintaining stability.
AFIRMA indicator is a hybrid moving average that combines the benefits of digital filtering and cubic spline fitting to provide a smooth and accurate representation of price movement without significant time lag.
### Origin
## Origin
AFIRMA (Adaptive Filtering Integrated Recursive Moving Average) was developed by Clive Bowsher and Roland Meeks in their 2008 paper titled "*The Dynamics of Economic Functions: Modeling and Forecasting the Yield Curve.*" It was created as an improvement over traditional moving averages, designed to adapt more quickly to changes in financial time series data.
The AFIRMA indicator is based on the principles of digital signal processing and curve fitting. It was developed to address the limitations of traditional moving averages, which often suffer from time lag or fail to accurately track price movements.
### Key Features
## Key Features
1. **Adaptive Nature**: AFIRMA adjusts its behavior based on recent price movements, allowing it to respond more quickly to significant changes.
2. **Error-based Adaptation**: It uses the error between its last output and the current input to determine how much to adapt.
3. **Customizable Sensitivity**: The alpha parameter allows fine-tuning the indicator's responsiveness.
- **Digital Filter**: The AFIRMA indicator uses a digital filter to smooth out price movements.
- **Cubic Spline Fitting**: The latest candlesticks are smoothed using cubic spline fitting with the least square method to ensure a seamless transition.
- **Combined Moving Average**: The indicator combines the digital filter and cubic spline fitting to create a smooth moving average that accurately tracks prices without time lag.
- **Customizable Parameters**: The AFIRMA indicator allows users to adjust the Periods, Taps, and Window parameters to fine-tune the indicator's performance.
### Usage
## Advantages
1. **Trend Identification**: AFIRMA can help identify the start or end of trends more quickly than traditional moving averages.
2. **Signal Generation**: Traders may use crossovers of AFIRMA with price or other indicators to generate buy/sell signals.
3. **Dynamic Support/Resistance**: The AFIRMA line can act as a dynamic support or resistance level.
4. **Volatility Analysis**: The adaptive nature of AFIRMA can provide insights into market volatility.
- **Accurate Price Tracking**: The AFIRMA indicator provides a smooth and accurate representation of price movement without time lag.
- **Hybrid Approach**: The combination of digital filtering and cubic spline fitting provides a unique and effective approach to moving average calculation.
### Advantages
## Considerations
- More responsive to market changes compared to traditional moving averages.
- Reduces lag typically associated with moving averages.
- Customizable through its `alpha` parameter to suit different market conditions or trading styles.
### Considerations
- **Adaptive Factor**: Alpha serves as the base adaptive factor. It has a range between 0.0 and 1.0 that determines how quickly the AFIRMA responds to changes in the input data.
- **Error Sensitivity**: Alpha is used in calculating the adaptive factor, which is based on the error between the current input and the last AFIRMA value.
- **Balancing Stability and Responsiveness**: A smaller alpha (closer to 0.0) makes the AFIRMA more stable but less responsive to recent changes.
A larger alpha (closer to 1) makes the AFIRMA more responsive to recent changes but potentially more volatile.
- **Fine-tuning the Indicator**:
- In trending markets, a higher alpha might be preferred to capture price movements more quickly.
- In ranging markets, a lower alpha might be better to reduce false signals from price noise.
- **Adaptive Nature**: The use of alpha allows AFIRMA to adapt its behavior based on recent price movements. When there are significant changes (large errors), the adaptive factor increases, allowing AFIRMA to adjust more quickly.
**Complexity**: The AFIRMA indicator is a complex filter that requires some understanding of digital signal processing and curve fitting to use it right.
- **Parameter Optimization**: Finding the optimal parameters for the AFIRMA indicator may require some experimentation and testing.
- **Computational Resources**: The AFIRMA indicator is computationally more intensive than traditional moving averages due to the use of cubic spline fitting.