The Secretary shall prescribe such regulations with respect to gain or loss on positions which are a part of a straddle as may be appropriate to carry out the purposes of this section and section
263
(g). To the extent consistent with such purposes, such regulations shall include rules applying the principles of subsections (a) and (d) of section
1091 and of subsections (b) and (d) of section
1233.