Suppose I am long-term invested in some stocks or etfs.
Consider the following two situations:
1) stock market is high, my personal income from work is low. Is it a good idea to sell (part of) my stock, and buy it at (nearly) the same price? The idea is that the capital gains are realized at a convenient time so only little taxes are paid.
2) stock market is low (below buying price), personal income from work is high. Sell/rebuy (parts of) the stock to realize losses to lower tax burden from work income?
What are the risks?
Is there a way of "realizing" the gains and losses at a convenient time without actually selling/rebuying?