Moving average is like counting how many candies you have every day and finding out the average number of candies you have over a certain period of time. Let's say you want to know the average number of candies you have over the last five days. You would count how many candies you have each day, add them up, and then divide that number by five to get the average.
In the same way, moving average is a way to find out the average of something over a certain period of time. But instead of candies, we are looking at numbers in things like stocks or weather temperatures.
For example, if we want to find out the moving average of a stock over the last five days, we would add up the closing price of the stock for each of the past five days and then divide that number by five. That gives us an average price for the stock over the last five days.
The reason why we use moving average instead of just looking at the stock price for a single day is that stock prices can go up and down a lot on a daily basis. Moving average helps us see the bigger picture of how the stock has been performing over a longer period of time.
So, moving average is like finding out the average number of candies you have every day, but instead of candies, we are looking at numbers in things like stocks or temperature. It helps us get a better understanding of how something has been performing over time.