US Tax rules dictate that investments can be written off when an investment has become entirely worthless. This is a different standard than when an investment may be written down for financial accounting purposes.
The wind-down process can sometimes last many months. In these cases, the formal tax write off may occur substantially after a company first announces that it is shutting down.