SIGN IN SIGN UP
TheAlgorithms / Python UNCLAIMED

All Algorithms implemented in Python

219160 0 1 Python

Add Simple Moving Average (SMA) Calculation (#9300)

* Add Simple Moving Average (SMA) Calculation

This commit adds a Python script for calculating the Simple Moving Average (SMA) of a time series data.

The script also includes a doctest that verifies the correctness of the SMA calculations for a sample dataset.

Usage:
- Run the script with your own time series data and specify the window size for SMA calculations.

* Update financial/simple_moving_average.py

Co-authored-by: Tianyi Zheng <[email protected]>

* Update financial/simple_moving_average.py

Co-authored-by: Tianyi Zheng <[email protected]>

* Update financial/simple_moving_average.py

Co-authored-by: Tianyi Zheng <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update simple_moving_average.py

* Update financial/simple_moving_average.py

* Update simple_moving_average.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Tianyi Zheng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
B
Berat Osman Demiralay committed
d051db1f14cbb0edd2b0db1e4edef76cce6c7823
Parent: 417b7ed
Committed by GitHub <[email protected]> on 10/23/2023, 1:25:07 PM