1
$\begingroup$

I'm looking to seasonally adjust the price data I have using a moving average with a 12-month window size. As window 12 is being used, the first 11 values in the 'Oil_adjusted' column are being filled with NaN, as there is not enough data to calculate the average in these cases. I would like to know if it would be a bad measure to take 11 dates behind the date I want to calculate so that the dates I am interested in do not have NaN or another way to do the seasonal price adjustment.

$\endgroup$

1 Answer 1

0
$\begingroup$

My inclination would be to take the raw data for the 1st month of your data. The average of the first two months for the 2nd. The average of the first three months for the 3rd, etc.

This is the type of thing that is a judgement call, so there isn't a "right" or "wrong" method. The important thing is that you make clear what your methods are and can justify that your chosen method is logical and can withstand criticism.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.