The stock market is a mechanism where investors buy and sell shares of publicly owned…