bollinger_bands
¤
bollinger_bands
¤
bollinger_bands(
series: Series | str = "close",
window: int = 0,
std: int | float = 0,
ma_mode: Literal["ema", "sma"] = "sma",
dataframe: DataFrame = None,
prefix: str = "bb_",
inplace: bool = False,
plot: bool | list[str] = False,
plot_kwargs: dict | None = None,
**kwargs
) -> dict[str, Series] | DataFrame
summary
Parameters:
-
series
(Series | str
, default:'close'
) –description. Defaults to "close".
-
window
(int
, default:0
) –description. Defaults to 0.
-
std
(int | float
, default:0
) –description. Defaults to 0.
-
ma_mode
(Literal["ema", "sma"]
, default:'sma'
) –description. Defaults to "sma".
-
dataframe
(DataFrame
, default:None
) –description. Defaults to None.
-
prefix
(str
, default:'bb_'
) –description. Defaults to "bb_".
-
inplace
(bool
, default:False
) –description. Defaults to False.
-
plot
(bool | list
, default:False
) –Flag or list of columns name. Defaults to False.
-
plot_kwargs
(dict | None
, default:None
) –description. Defaults to None.
Example
df.i.bollinger_bands(window=20, std=2.0, inplace=True, plot=True)
Raises:
-
RuntimeError
–description
Returns:
Source code in lettrade/indicator/volatility/bollinger_bands.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|