mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 21:42:22 +00:00
* Fix plot look when using eval and add query to choices (#3881) * convert index to datetime and update choices * uncomment economy integration test * fix treasury concat bug * fix datasets concat on duplciates * Lock ruff version so that new lints dont break our CI (#3905) * Lock ruff version so that new lints dont break our CI * Bumped pre-commit ruff version * Update sma.md Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com> Co-authored-by: James Maslek <jmaslek11@gmail.com>
745 B
Vendored
745 B
Vendored
title, description
| title | description |
|---|---|
| sma | OpenBB SDK Function |
sma
Gets simple moving average (SMA) for stock
Source Code: [link]
openbb.ta.sma(data: pd.Series, length: int = 50, offset: int = 0)
Parameters
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | pd.Series | Dataframe of dates and prices | None | False |
| length | int | Length of SMA window | 50 | True |
| offset | int | Length of offset | 0 | True |
Returns
| Type | Description |
|---|---|
| pd.DataFrame | Dataframe containing prices and SMA |