A stock-buying strategy to beat inflation and generate income