move permno and month_year out of loop