Image source: Getty Images Stock market investing during volatile market conditions is particularly challenging. It is difficult to identify good investments when uncertainty in the market can lead to selloffs resulting in significant losses. As of this writing, the S&P/TSX Composite Index is down by 7.9% from its 52-week high. The Canadian benchmark index has recovered to this point after rallying upward in the last few weeks. Despite the recent rally, analysts and economists predict the onset of a recession this year. Considering the possibility of a recession looming overhead, investing in dividend stocks might be the best way to put your capital to work in the market. Even if a downturn leads to losses through declining valuations, the dividend income can keep providing you with returns while you wait for the dust to settle. If you bet on the right stocks, you can recover the losses from market volatility through capital gains when the market calms down. Picking the right high-quality dividend stocks is essential for this purpose. I will discuss two top-notch dividend stocks you can buy as long-term, income-generating assets for your self-directed portfolio. Toronto-Dominion Bank Toronto-Dominion Bank (TSX:TD) is one of the top Canadian bank stocks to consider if you want to add high-quality dividend stocks to your portfolio. The Toronto-based $163.86 billion market capitalization financial services giant is among Canada’s Big Six banks and is one of the best dividend-paying stocks on the TSX. Boasting a dividend-paying streak of almost two centuries, it is one of the first Canadian publicly traded companies to distribute a share of its profits to shareholders. As of this writing, TD Bank stock trades for $89.95 per share, boasting a juicy 4.27% dividend yield. It offers the highest-yielding returns among its peers in the Big Six, but that is not the only reason to consider adding it to your portfolio. The bank has a significant presence in the Canadian and international markets. It is currently purchasing First Horizon Bank for $13.4 billion — a move that will add $85 billion worth of assets under its belt. It also has plans to purchase Cowen, another financial institution that will expand its presence further. With plenty of growth on the horizon, a stable dividend history, and high-yielding dividends at current levels, it can be an excellent buy-and-hold investment. Canadian National Railway Canadian National Railway (TSX:CNR) is another staple in many dividend-income portfolios for Canadian investors. A Canadian Dividend Aristocrat of the highest order, it has been increasing shareholder dividends for around half a century. It means that CN Railway stock does not just pay its shareholders regularly. It also increases its payouts each year without fail. The $112.43 billion market capitalization railway giant is the only North American railroad connecting three coasts, giving it an edge in the industry. While CN Railway stock does not offer much in terms of growth potential, it compensates for it through its reliable dividend history. It plays a crucial role in the North American economy by transporting goods from coast to coast in Canada and its significant presence in the U.S. As of this writing, CN Railway stock trades for $166.65 per share and boasts a 1.76% dividend yield. Granted, the dividend yield is not high, but it is sustainable, reliable, and virtually guaranteed. Foolish takeaway For new investors, financial advisors typically recommend beginning by investing in low-cost index funds that diversify their money across several securities, limiting capital risk. However, it’s important to understand that the lower the risk there is, the fewer returns you’ll get. If you want to be bold by picking individual stocks, investing in high-quality stocks that keep risk to a minimum while offering better returns than low-cost index funds can be a better approach. TD Bank stock and Canadian National Railway stock can be two excellent buy-and-hold assets for this purpose.