My friend works for an investment firm, and his colleague mistakenly double-submitted a long bid for stock on a very risky day. The entire firm was on edge the whole day, watching the stock price. In the end, the price went sky-high and the firm made a lot of money, so the friend was praised. However, he could easily have been in big trouble with the boss if the price had dropped. What is a term for this? Also, is there a term for the person who made the mistake?
Dumb Luck: the way in which something good happens completely by chance, without being planned or deserved. (Sometimes emphasized by adding sheer before it: Sheer dumb luck.)
He lucked out.
luck out: To be a benefactor of good fortune rather than fall victim to circumstance.
The term for the result of the stupid action could be happy accident, meaning a blunder that ultimately proved advantageous. However, this term is occasionally used as an informal euphemism for "unplanned pregnancy", so use with caution.
Although this does not coincide precisely with the concept you are trying to express, the word serendipity means "the luck of finding something pleasant when you do not expect it".
Well, there is one online dictionary that has followed fiction in defining pull a Homer this way.
There are some more widely-known, but also more less specifically defined, like "lucky skunk", "jammy bastard" and so on, that refer to the pure luck involved rather than the luck coming on the heels of a clearly incompetent act.
The person who submitted the risky trade is definitely a lucky fool. Actually the whole office is probably considered lucky fools, celebrating something that was so disruptive and risky.
Several eighteenth-century (or older) proverbs address this situation. James Kelly, Complete Collection of Scottish Proverbs (1721) lists two relevant sayings (with his comments beneath each):
More by good luck, than by good guiding.
Spoken when a Thing, ill managed, falls out well.
Give a Man Luck, and cast him in the Sea.
Spoken when a Man is unexpectedly fortunate.
John Ray, Compleat Collection of English Proverbs (1737) offers two other proverbs on the same theme:
Fortune favours fools; or, fools have the best luck.
He rose with his Arse upwards. (A sign of good luck.)