In the case of an activity engaged in by an individual or an S corporation, if such activity is not engaged in for profit, no deduction attributable to such activity shall be allowed under this chapter except as provided in this section.
If the gross income derived from an activity for 3 or more of the taxable years in the period of 5 consecutive taxable years which ends with the taxable year exceeds the deductions attributable to such activity (determined without regard to whether or not such activity is engaged in for profit), then, unless the Secretary establishes to the contrary, such activity shall be presumed for purposes of this chapter for such taxable year to be an activity engaged in for profit. In the case of an activity which consists in major part of the breeding, training, showing, or racing of horses, the preceding sentence shall be applied by substituting “2” for “3” and “7” for “5”.
A determination as to whether the presumption provided by subsection (d) applies with respect to any activity shall, if the taxpayer so elects, not be made before the close of the fourth taxable year (sixth taxable year, in the case of an activity described in the last sentence of such subsection) following the taxable year in which the taxpayer first engages in the activity.
If the taxpayer makes an election under paragraph (1), the presumption provided by subsection (d) shall apply to each taxable year in the 5-taxable year (or 7-taxable year) period beginning with the taxable year in which the taxpayer first engages in the activity, if the gross income derived from the activity for 3 (or 2 if applicable) or more of the taxable years in such period exceeds the deductions attributable to the activity (determined without regard to whether or not the activity is engaged in for profit).
If a taxpayer makes an election under paragraph (1) with respect to an activity, the statutory period for the assessment of any deficiency attributable to such activity shall not expire before the expiration of 2 years after the date prescribed by law (determined without extensions) for filing the return of tax under chapter 1 for the last taxable year in the period of 5 taxable years (or 7 taxable years) to which the election relates. Such deficiency may be assessed notwithstanding the provisions of any law or rule of law which would otherwise prevent such an assessment.