then such loss shall be treated as an ordinary loss. For purposes of section
172 (relating to the net operating loss deduction) any amount of loss treated by reason of this section as an ordinary loss shall be treated as attributable to a trade or business of the taxpayer.