If you want to invest in the stock market, whether over a shorter period of 1 to 2 years or over a longer period of 10 or 20 years or longer you need to take some precautions and have a written investment plan with a risk management strategy incorporated in your plan.
Others have said that 1 to 2 years is too short to invest in the stock market as the stock market can have a correction and fall by 50%. But it doesn't matter if you invest for 1 year or if you invest for 50 years, the stock market can still fall by 50% just before you plan to withdraw your funds.
What you need to figure out is a way to get out before the market falls by 40% to 50%. A simple way to do this is to use technical indicators to warn you when a market trend is starting to change and that it is time to get out of the market.
Two simple indicators you can use on a market index are the Rate of Change (ROC) indicator and the 100 week Moving Average (MA). Below is a 10 year weekly chart of the S&P500 with these two indicators charted. They show good times to get into the market and good times to get out.
If you are using the 100 week MA you would buy in when the price crosses above the MA line and sell when the price crosses below the MA line.
If you are using the ROC indicator you would buy in when the ROC indicator crosses above the zero line and sell when the ROC indicator crosses below the zero line.
So your investment plan could be to buy an Index ETF representing the S&P500 when the ROC moves above zero and sell when it crosses below zero. You can also place a trailing stop loss of 10% to protect you in case of a sudden fall over a couple of days. You can manage your investments in as little as 10 minutes per week by checking the chart once per week and adjusting your stop loss order.
If you want to progressively add to your investment each month you could check the charts and only add any new funds if both the ROC is above zero and sloping upwards. Another option for adding new funds could be if the price is above the MA and moving further away from the MA. All these rules should be incorporated into your investment plan so that you are not basing your decisions based on emotions.
There are many other Technical Analysis Indicators you could also learn about to make better educated decisions about your stock market investments. However, what I have provided here is enough for anyone to test over different indexes and time frames and do their own paper trading on to gain some confidence before placing any real money on the table.