OT .. Ali, you are treating an opportunity lost -- an opportunity cost -- as a loss, but opportunity cost is not an accounting concept. It is an economic one.
Imagine you were considering investing $1000 in either ABC or XYZ stock. You chose ABC and the stock goes nowhere ... while XYZ doubles. But you didn't lose $1000 on ABC. You just lost the opportunity to gain $1000 on XYZ. It's similar for a covered call.
If you write a naked call (for 100 shares) with a $20 strike and get a $3 premium, you lose $700 if the call is exercised when the stock is $30.
However, if you buy-write @ $20, -- simultaneously buy stock @ $20 and write its call with a $20 strike -- and get a $3 premium, you gain $300 if the call is exercised, no matter the stock price. So, even if the stock is $30 at the time of exercise, you didn't lose $700 -- you gained $300.
You might also consider the IRS tax treatment of a covered call (or buy-write) that is exercised.
"If a call you write is exercised and you sell the underlying stock, increase your amount realized on the sale of the stock by the amount you received for the call when figuring your gain or loss. The gain or loss is long term or short term depending on your holding period of the stock." IRS Publication 550, "Investment Income and Expenses", page 56 irs.gov
Ron |