Loosing your job does not mean that you will be asked to leave Hong Kong. However, you do need to approach the Immigration Department to change employers (submit an employment visa application) or establish/join a new business (investment visa application).
Fore more – watch Stephen Barnes explain the details in this informative video.