There is no guaranteed way to avoid losses due to volatility. However, you can diversify your portfolio by investing in a variety of assets, including both stocks and bonds. In addition to asset allocation, you can also limit your exposure to volatile assets by investing only a small portion of your portfolio in them.