What is a moving average?
- User
What is a moving average?
- Assistant
A moving average (also called a rolling average or running average) is a statistical calculation used to analyze data by smoothing out short-term fluctuations and highlighting longer-term trends or cycles. It's widely used in finance (e.g., stock prices), time series analysis, signal processing, and forecasting.
How It Works
It computes the average of a fixed number of consecutive data points (called the window or period) and then "moves" the window forward one step at a time, recalculating the average.
Simple Moving Average (SMA) Example
Suppose you have daily stock prices: [10, 12, 11, 13, 14].