TNX vs S&P500

The average dividend yield of an S&P 500 stock is 1.85%. At the same time you can have a return of 2,85% if you buy the 10-year Treasury note . The first one carries risk, the latter is theoretically riskless.