The variability of money velocity in a generalized cash-in-advance model