Sell your index funds, but preserve control over the same number of shares you sold by buying call options. You could sell and put the money in treasuries for a year, but that would expose you to the risk that you sold at the bottom and then the market takes off without you and then you can't afford the same number of shares you had before.
E.g.
1) Sell 1000 shares SPY for $357.50, net credit $357,500.
2) Buy 10 December 15, 2023 call option contracts, controlling 1000 shares. At the 355 strike these will cost you about $47.50 per share. net debit $47,500.
3) Park the net (357,500-47,500=) $310,000 in an account at TreasuryDirect.gov and buy 1 year treasuries. Their current yield is around 4.2%, so your $310k will earn about $13,020 in the 12 months before you need it to buy a home.
4) After you make your cash offer and secure the home purchase, take out a mortgage to recover your $310k in cash. Buy your 1000 shares of SPY back.
a) If the price of SPY has fallen a lot, the call options you purchased will expire worthless, but you might be glad you only lost (47,500/357,500=) 13.3% if for example the stock market lost 30%.
b) If the price of SPY has appreciated a lot - i.e. more than $47.50/share - the call options you purchased will have gained in value. If the price of SPY is greater than your $355 strike price, the options will be worth CurrentPrice - 355 at their time of expiration. E.g. if SPY is $450/share, your calls will be worth (450-355=) $95 at expiration. If you sell them sometime before expiration, they will be worth that plus some amount of time value. You sell or execute your call options, and then combine those proceeds with the mortgage money and buy back about 1000 shares of SPY (it's unlikely you'll have exactly enough to buy exactly 1000 shares, but it's a rough hedge we're doing). Now you're back approximately where you started even though the market ran off without you.
The upside is that no matter what happens in the market, the most you can lose is the 13.3% of your portfolio you spent on call options, minus the 4.2% you earned in risk-free interest. There is a firm floor on your losses beyond that point, no matter how bad it gets. Plus if there is a recession, there's a nice double play possibility because house prices will be depressed and there might be lots of foreclosures selling on the courthouse steps for cash only.
Pro Tips:
-You can dramatically reduce the cost of time value by buying very long duration options. E.g. a SPY call at 355 has $46.39 of time value if it expires in 429 days, but the same strike expiring in 828 days has $63.44 in time value. As an annualized percentage of the strike price, the longer-duration option is cheaper.
-Options are very expensive right now due to high market risk and volatility. So it's not the ideal time to buy options, but your schedule is dictating things.
-An alternative would be to hold the 1,000 shares of SPY but sell a covered call at a very low strike price. This would extract most of your cash from the investment and hedge you against losses, but it would be kinda pointless because it would not protect you from the possibility that stocks go up dramatically. You'd still be selling at the bottom, even if your shares were not called away for a year or two.
-Instead of treasuries you could invest in corporate bonds with one year remaining, and maybe then you earn 5% or 6% instead of 4.2%. This would be the traditional way to plan for a big purchase, but it doesn't protect you from the possibility of stocks going up without you.
-MMM did an article this year about using margin to buy a house. Check out that option, but be aware that margin rates have gone way up just like everything else.