Are these in a tax deferred account such as an IRA or 401(k), etc.? If so, no current tax consequence.
If in taxable accounts, will this be accomplished by actually selling some securities and buying others?
If the sell/buy is done in a taxable account, the purchase has no effect.
The sell will be on a security by security basis; short-term grouped together and long-term grouped together.
Each security will have sales price less basis and commission=gain/loss. The net groupings will result in overall gain/loss. If short-term is overall, that gain will be taxed at ordinary income rates. If long-term overall gain, that will be taxed at long-term rates.
Also, if you meet the threshold amounts, you may have the Net Investment Income Tax applied as well.
https://www.irs.gov/individuals/net-investment-income-tax
https://www.irs.gov/publications/p550
https://www.irs.gov/faqs/sale-or-trade-of-business-depreciation-rentals/sales-trades-exchanges/sales...
**Disclaimer: Effort has been made to offer correct information; but due to the discussion forum limitations, the poster disclaims any legal responsibility for the accuracy of the poster's response**