In 2015 Split of HPQ and HPE 47.15% basis to HPQ and 52.85% basis to HPE http://h30261.www3.hp.com/faq/separation-faqs.aspx
I just went through all the HPE spin offs for 2017
You can not have losses, they just reduce cost basis. A few Cash in Lieu (CIL) and a Seattle Co sale that yes you can have a large gain on that you do report, you then increase your basis in the new company Micro Focus by the basis you had allocated to Seattle Class A plus the gain recognized.
Took me a while to figure it all out. Here are links to HPE basis allocations.
There were 2 spinoffs/reorganizations from HPE this year.
1. was 3/31 Everett distribution, merged to CSC, and CSC is surviving company: HPE 75.1% of basis, Everett 24.9% and you got .085904 shares of Everett for every HPE. You may have CIL, Ultimately Everett named DXC Technologies.
2. 9/1 distribution Seattle Class A, Micro Focus. HPE basis 77.92%, Seattle Co 22.08% got 1 for 1 and Seattle co gets sold recognize a gain, no losses. Allocate the Seattle Co basis plus the gain (plus the loss) to ultimate shares of MicroFocus .13732611 Micro Focus ADS for every Seattle co.