Unique-word (UW) OFDM is a new OFDM variant that offers several advantages over cyclic prefix OFDM, such as better bit-error-rate (BER) performance in frequency selective channels and much lower out-of-band radiation. However, all results with respect to the BER performance are based on Monte-Carlo simulations only, and offer little insight in the behaviour of the system performance as function of its parameters. In this paper, we theoretically analyse the performance of the UW-OFDM system for both a deterministic channel and a fading channel, and offer a systematic way to generate the UW-OFDM signal to optimize the performance of the system. When the fading channel is known at the transmitter, we show that we can obtain a diversity order that is of the same order of magnitude as the theoretically maximum diversity order, but when the channel is not known at the transmitter, it will be very hard to achieve maximum diversity order, although the obtained diversity order is larger than one.