Yes, the government influences the market through regulation and by creating and empowering agencies to monitor and enforce rules.
A classic example of this in the United States is the Securities Act of 1934, which established the rules and governance of how stocks, bonds and debentures are traded on the secondary market (this is where the securities are up from re-sale post the primary issuance).
The law also created the SEC (Securities and Exchange Commission) which regulates the securities market by enforcing rules around corporate reporting, proxy solicitations, tender offers and insider trading.