One common case is that you are a freelancer but is moving to stay in Hong Kong for a few years with the option to stay permanently which will eventually depending on a few reasons. What you are most into is the relative low tax rate (on individual profits) that you can get while living in HK but this cannot be found in many other countries or regions in the world.
The question is the type of visa option you can have working as a freelancer. The simple answer is none (when you are doing freelanced work). If you are a programmer doing tech development projects that mostly require you to work remotely. i.e. You don’t even have to meet your clients face-to-face, but all the communication, operations, and work delivery can be done through the internet with tools such as VOIP, teamwork tools, content management system, etc.
Depending on your original nationality and the current passport you are holding, you may be already in Hong Kong without the need of a visa, and are already eligible to stay for at least 3 months or longer. This is the time opportunity for you to get familiar with the place, and build your people’s connections in HK. However, with such current status you are not legal allowed to work from Hong Kong, otherwise you will be risking yourself for penalty and/or imprisonment.
Everyone who does not have a Permanent Residence status must first apply and get approved for a work visa before he can legally work from Hong Kong. Surely, there is no employer for you to act as your sponsor for your working status to be legal in HK.
One solution is to go for the investment visa. This route may take some time. You will actually be required to submit a practical business plan and supporting letters from your potential clients (or real actual client, if you already have any). To make this option easier to get approved, you may have to actually lease an office in Hong Kong and hire people/employees locally. Surely, this is going to cost you some upfront investment. But when things all work out at the end, it is very worthwhile.
A second solution is to go through the QMAS (Quality Migrant Admission Scheme). This scheme is going to take longer time with a longer admission process, and will require the applicant to pass the point threshold. Certain countries are not eligible for this scheme. The aim of the scheme is to supply Hong Kong with highly skilled and/or talented individuals who may become eligible to settle/stay in HK for work. All successful applicants do not need to receive an offer from a local employer before their entry to Hong Kong.