Book Image

NumPy: Beginner's Guide

By : Ivan Idris
Book Image

NumPy: Beginner's Guide

By: Ivan Idris

Overview of this book

Table of Contents (21 chapters)
NumPy Beginner's Guide Third Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
NumPy Functions' References
Index

Simple Moving Average


The Simple Moving Average (SMA) is commonly used to analyze time-series data. To calculate it, we define a moving window of N periods, N days in our case. We move this window along the data and calculate the mean of the values inside the window.