Probably not. You would have to determine that there is no reasonable expectation that you were going to recover your investment. The company you invested in filing bankruptcy would be a good indication you weren't going to recoup your investment, but it's not the only one.