Question: I would like to know whether there is any way I can run an absolutely unknown executable file without being hacked even if the file contains a lot of malicious code. Is there any program in which I can run it without putting myself in any risk?

Answer: 
Barring NSA-level attacks that alter hard drive firmware and the like, there is a relatively simple and cheap solution. 

* Buy an extra hard drive that include some sort of free "clone" or "migration" software, or a linux "repair" bootable thumb drive.
* Clone your system's hard drive to the new drive then unplug the new drive.
* Unplug the internet source (router, modem, etc) to stop exfiltration
* Install/run your un-trusted EXE as much as needed.
* Reboot and wipe the main hard drive from a bootable thumb drive.
* Clone the copy back to the main box and reboot.

This lets you run code in your normal setup, locally (w/o net), and be rest assured that no harm will come to your machine or data. You could still get hit with a targeted attack that uses something like fan-based exfiltration, but if you're just worried about ransomware, spyware, or a virus, the copy and restore method is very effective.

Use this routine on an extra $100 computer (refurb on newegg or ebay) if the EXE needs internet.
You cannot.

If you use OS-level virtualization solution (sandboxes, containers, selinux), the malware can use local privilege escalation exploit.
If you use hardware virtualization the malware can exploit vulnerabilities in the hypervisor (and other underlying software including OS, bios and firmwares (a lot of devices have firmwares flashable, this allow creation of extremely persistent rootkits)) and fault injection like RowHammer.
If you use an emulator, the malware can try to exploit a vulnerability in the emulator.

So you need a separate physical machine and if you need to analyse binaries automatically you need the software on the analysing machine to be not vulnerable.

Now forget everything written above because it is not a real life scenario (unless you are high-value target for intellegence agencies). A hardware virtualization solution (for example QubesOS) should be enough, if you cut it from devices (no OpenGL passthrough, no PCI passthrough, no USB passthrough, no access to storage, etc ...)