Not necessarily. I'd often run into this in Fallout New Vegas, and would offset the issue of the trader not having enough caps by also buying things I did needed as well as selling what I had.
Realistically, it would make sense for the traders to have a limited amount of Dukes (refreshing when the store stock changes every few days), as I doubt they'd just have an unlimited amount of currency on hand.