Tax Year Prior to 2020: should file tax for minor if loss a lot in stock

My son's custodial account lost about $4000

My son did not earn any money in 2018

Can or should I file a tax return in order to take advantage of $4000 carryover loss?