This is the exact technique I used to save up and pay for a wedding and a house. Consider your savings/investments as one of your monthly bills. Set a maximum balance for your checking account, everything in excess of that goes into investments or retirement fund.
CobsterLock|4 years ago