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: bool = False)

Parameters

NameTypeDescriptionDefaultOptional
datapd.DataFrameDataframeNoneFalse
targetstrColumn of data to look atNoneFalse
thresholdfloatThreshold value5True
driftfloatDrift parameter2.1True
external_axesboolWhether to return the figure object or not, by default FalseFalseTrue

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")