There's no known way to determine exactly when a crash will happen, though there are signals that sometimes precede them, by varying amounts of time. The only certainty is that given enough time one will. The trouble is "given enough time" can be quite a lot of time.
Would you be prepared to invest in something that dropped in value year after year after year in the hope that one day it will come good? How long would you wait before giving that up as a bad idea? How much could you have made from investing in an index fund for all that time? And even if there is a crash, your investments will recover eventually, provided you can just wait it out.
To answer your question though there are funds that hedge against stock market crashes, these are known as tail risk or black swan funds. Most are only open to institutional investors, which are generally those with at least $1M of investable assets and often significantly more, for instance the best known black swan fund is probably Universa but someone commenting on that article states:
old 2009 info: The firm has a $25 million minimum investment requirement
Other black swan funds such as AHL Tail Protect Fund have also not done well given the length of time since the last black swan event. This one is also only open to institutional investors.
The Man Group, a London-based alternative investment management business, has seen its AHL Tail Protect Fund lose 45% of its value since it 2009 launch, according to Man Group data reported by the Journal.
If, even after all those warnings you still want to try it there there's a black swan ETF that you probably can invest in if you wish. This one appears to bet only 10% of itself on a black swan, leaving the other 90%'s growth to make up for the yearly value drop of that 10% when the black swan doesn't happen. Now that you know what to search for you may be able to find other similar funds, you should not choose this one merely because I've provided a link to it here.