Hi, i am supposed to use basic linear predictive regression model (shown below) to predict if the past return can be used to predict stock return. Data that i have provided is monthly stock price, dividends (12-month moving sums of dividends paid on the S&P 500 index). Array

I have tried executing following commands:
gen return = (100*(Index[_n]-Index[_n-1]+(D12/12))) / Index[_n-1]
gen lagreturn = return [_n-1]
reg return lagreturn

I appreciate all help, as i'm new to statistic analysis. I can also provide more information and data if necessary.