From Spanish boyar ('to float'), from boya ('buoy'), which came into English via French in the late 16th century (first recorded c. 1578). The figurative sense of resilient cheerfulness emerged in the early 19th century, extending the image of floating on difficulties rather than being pulled down by them.