turtle_quant_1.strategies.helpers.support_resistance.stnry_gaussian_kde¶
turtle_quant_1.strategies.helpers.support_resistance.stnry_gaussian_kde
¶
Stationary Gaussian KDE support and resistance strategy.
StnryGaussianKde
¶
Bases: BaseSupResStrategy
Stationary Gaussian KDE support and resistance strategy.
Refer to: - https://github.com/neurotrader888/TechnicalAnalysisAutomation/blob/main/mp_support_resist.py - https://www.youtube.com/watch?v=mNWPSFOVoYA
This strategy identifies support and resistance levels by using Gaussian KDE to identify significant peaks in the market profile.
Initialize the StnryGaussianKde strategy.
Source code in src/turtle_quant_1/strategies/helpers/support_resistance/stnry_gaussian_kde.py
generate_historical_levels
¶
Generate Gaussian KDE levels for historical data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
DataFrame
|
DataFrame with OHLCV data containing columns: ['datetime', 'Open', 'High', 'Low', 'Close', 'Volume'] |
required |
symbol
|
str
|
The symbol being analyzed. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with Gaussian KDE levels. |
DataFrame
|
The columns are: ['datetime', 'level_values']. |