Skip to main content

cusum

Plots Cumulative sum algorithm (CUSUM) to detect abrupt changes in data

Source Code: [link]

openbb.qa.cusum(data: pd.DataFrame, target: str, threshold: float = 5, drift: float = 2.1, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None)

Parameters

NameTypeDescriptionDefaultOptional
datapd.DataFrameDataframeNoneFalse
targetstrColumn of data to look atNoneFalse
thresholdfloatThreshold value5True
driftfloatDrift parameter2.1True
external_axesOptional[List[plt.Axes]]External axes (2 axes are expected in the list), by default NoneNoneTrue

Returns

This function does not return anything


Examples

from openbb_terminal.sdk import openbb
df = openbb.stocks.load("AAPL")
openbb.qa.cusum(data=df, target="Adj Close")