N.Y. Comp. Codes R. & Regs. tit. 20, § 154.8
(c) A net operating loss, sustained in the year the change of resident status occurs, may be a carry-back or a carry-over to another taxable year under the following conditions:
(a) Change of resident status from resident to nonresident.
Where the Federal income tax return of an individual or of a trust, for a taxable year in which such individual or trust changes resident status from that of a resident to a nonresident, includes a net operating loss deduction, the amount of net operating loss deduction for Federal income tax purposes will be considered a net operating loss deduction on the New York State income tax return for the period of residence. Any excess of the amount of the net operating loss deduction not applied on the New York State income tax return for the period of residence may be applied on the New York State income tax return for the period of nonresidence, but only to the extent that such excess is based solely on items of income, gain, loss and deduction derived from or connected with New York State sources (see section 132.7 and Part 138 of this Title).
(b) Change of resident status from nonresident to resident.
In computing the New York adjusted gross income of an individual to be reported on the New York State personal income tax return for the period of nonresidence or in computing the New York taxable income of a trust for the period of nonresidence, any net operating loss deduction must, as required by section 132.7 and Part 138 of this Title, be based solely on items of income, gain, loss and deduction derived from or connected with New York State sources. For purposes of this section, the source of the net operating loss must be determined by reference to the source of the items of income, gain, loss and deduction for the year or years in which the net operating loss was sustained. A net operating loss deduction may be applied to the New York State income tax return for the period of residence in the amount which would be allowed as a net operating loss deduction for Federal income tax purposes, computed, in accordance with Federal rules and practice applicable to net operating loss deductions, as if a Federal income tax return had been filed for the period of residence.