Files
OpenBB/website/content/api/common/qa/spread/_index.md
Colin Delahunty 8731fbd692 Auto Generate API Documentation (#2360)
* Started auto doc generation

* Created a markdown document

* Added test changed to md

* Created working version of new documentation

* Made requested changes

* Generate docs for all

Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
2022-09-20 19:15:54 +01:00

1.2 KiB
Vendored

common.qa.spread

To obtain charts, make sure to add chart=True as the last parameter

Get underlying data

###common.qa.spread(data: pandas.core.frame.DataFrame, window: int = 14) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame]

Standard Deviation and Variance

Parameters
----------
data: pd.DataFrame
    DataFrame of targeted data
window: int
    Length of window

Returns
-------
df_sd: pd.DataFrame
    Dataframe of rolling standard deviation
df_var: pd.DataFrame
    Dataframe of rolling standard deviation

Getting charts

###common.qa.spread(data: pandas.core.frame.DataFrame, target: str, symbol: str = '', window: int = 14, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True)

View rolling spread

Parameters
----------
data: pd.DataFrame
    Dataframe
target: str
    Column in data to look at
target: str
    Column in data to look at
symbol : str
    Stock ticker
window : int
    Length of window
export: str
    Format to export data
external_axes: Optional[List[plt.Axes]], optional
    External axes (3 axes are expected in the list), by default None