You can detach your investment at any time. If the investment period has not expired, then you will need to pay a penalty for the early detachment of the investment.
To detach an investment without a penalty, just wait until the investment expires.
You can do this on Saturday at 01 UTC after the end of the investment period.
If you have not detached investments at the end of the term specified by the trader, then they are automatically invested for a new term with the same period.