Final answer:
The doctrine being applied in this scenario is the sham transaction doctrine (option d). This doctrine allows a court to disregard a transaction if it is determined to be a sham or fictitious in nature.
Step-by-step explanation:
The doctrine being applied in this scenario is the sham transaction doctrine.
The sham transaction doctrine is a legal principle that allows a court to disregard a transaction if it is determined to be a sham or fictitious in nature. In this case, if a court determines that John's sale of the stock to his neighbor at a significantly below-market value was not a bona fide transaction and was done solely to recognize a loss for tax purposes, the court may disallow the loss.
It is important to note that the sham transaction doctrine is applied to prevent taxpayers from engaging in transactions that have no economic substance other than to manipulate their tax liability.