The system that exists in Germany has you pay 25% Abgeltungssteuer even on unrealized gains but those taxes can be deducted when you sell. Only in the event you sell at net loss do you not get that back.
States are in dire need of liquidity. Just look at global debt.