401(k) “loans” are actually a distribution of your own money that must be paid back with
interest. The amount taken is no longer invested and will not rise or fall with the rest of your portfolio. Failure to repay the loan will be considered a premature distribution subject to income tax and a 10% penalty on the amount taken. Repayment terms are generally nonnegotiable.
Diversification helps you spread risk throughout your portfolio, so investments that do poorly may be balanced by others that do relatively better. Neither diversification nor rebalancing can ensure a profit or protect against a loss.