c_daily_traded_value_sma_252d#
- c_daily_traded_value_sma_252d(c_daily_traded_value)[source]
Calculate the 252-day simple moving average of the daily traded value.
- Parameters:
c_daily_traded_value (DataColumn) – The daily traded value.
- Returns:
The 252-day moving average of the daily traded value.
- Return type:
Notes
The 252-day moving average is computed as:
\[\mathrm{MA}_{252} = \frac{1}{252} \sum_{i=1}^{252} \mathrm{Daily\ Traded\ Value}_{i}\]In Excel, assuming your daily traded values are in column A starting at cell A2:
- In cell B253, enter:
=AVERAGE(A2:A253)
Drag the formula from cell B253 down to calculate the 252-day moving average for the rest of the rows.