I'm wondering if it is possible to develop a high-level mathematical algorithm that takes all the possible influencing variables in the market to estimate the future stock market change and build it into a complex computer program. Give thought to quantum computing.
It's not just possible, people are already doing this for years. It's called an automated trading system.
In fact the majority of trades on stock exchanges are performed by fully automatic systems nowadays, especially in the area of day-trading (holding stocks for very short amount of time to benefit from small price fluctuations). There is a whole industry of mathematicians, economists and computer scientists who try to build mathematic models to predict stock market developments and implement them in their trading systems.
These systems are not completely uncontroversial. They can trade very fast, but they can also make mistakes very fast. A bug in a trading system can easily lead to a loss of huge amounts of money in a very short amount of time. And when different high-frequency trading systems interact with each other on an open market, they can also cause very sudden market changes. There were multiple flash crash events in the past where automated systems suddenly caused a stock market crash with no apparent macro-economic trigger.
Will quantum computing be a game changer in this industry? I doubt it. Quantum computers are faster than regular computers at a very specific subset of mathematical problems, but much slower for most other calculations.
The short answer is yes. But it won't make you rich.
You would expect in a liquid market that profitable trading opportunities based on predictions of future prices would be eliminated by competitive trading which is more or less the case. And to the extent that you have the same information and same technology as other players you can make forecasts too. Though the sources of information and the technology used by large banks and hedgefunds would take some matching. If there are stable predictable trends they can't be tradable ones.
At business school I took a class in market forecasting using advanced modelling/trading techniques such as statistical arbitrage using neural networks. We could find theoretically profitable strategies but when you considered issues such as transactions costs it turned out - unsurprisingly if you think about it - for people other than big guys the transactions costs would wipe out the profits.
On less liquid and less sophisticated markets there may be opportunities. To give an example a family member of mine created a tool that found statistical mismatches in pricing of football results on spread-betting site. It producing a worthwhile profit but over time the returns have been declined as the quality of market pricing improves.
Raw computing power isn't really the constraint so quantum computers would be a bit of a red herring (thought there is a it of an arms race with other traders). The main constraint is how much data high quality information can you get your hands on and how much can you tell how other people would react to it.
This link is an example of statistical analysis applied to the financial markets:
A simpler ranking system could be developed based on the economic reports that currency traders follow. But investor emotion would be missing. For instance the current investor emotion is that interest rates are being lowered.