There is a logical error in your conclusion - although each position produces taxable income (or loss) by itself, the amounts are totaled up, and your tax is calculated from the totals (across all your accounts). So they are considered as a portfolio.
In more detail, there are slight asymmetries introduced by the IRS: there are two different flavors of gains/losses - short term and long term - and they get accumulated separately, and at the end taxed differently. Long term gains even out with short term losses, and remaining losses can only be deducted up to 3k$, the rest to be used next year.
Overall, that doesn't change the concept of 'portfolio' taxation, it just limits a bit how you can use losses.