Part of the transaction costs for your trading business is properly accounting for these transactions; if that is a huge amount of work and makes the transactions unprofitable, well, don't do them.
If you do complex transactions thousands of times per year, it would be reasonable to expect (and in many places be a legal duty) to figure out how you'll be accounting for these transactions in your books before the first transaction is made, and keep up to date bookkeeping for these operations continuously - not just making some reporting long after the fact. Like, such activities are so clearly above the level where either you hire a certified accountant or become a skilled accountant yourself, that's table stakes for doing such things. You're effectively running a business, so you're required to act like one, you're not permitted (generally, depends on jurisdiction) to just wing it.
If you do complex transactions thousands of times per year, it would be reasonable to expect (and in many places be a legal duty) to figure out how you'll be accounting for these transactions in your books before the first transaction is made, and keep up to date bookkeeping for these operations continuously - not just making some reporting long after the fact. Like, such activities are so clearly above the level where either you hire a certified accountant or become a skilled accountant yourself, that's table stakes for doing such things. You're effectively running a business, so you're required to act like one, you're not permitted (generally, depends on jurisdiction) to just wing it.