Solutions: Forecasting share prices with AI-powered supercomputer
Nurazam Malim was just seven years old when he developed a love of computers. He was introduced to the world of computing and learnt basic programming at a young age because his father — who was a senior technician at an oil and gas facility in Miri, Sarawak, and repaired broken appliances on the side — had accepted a Commodore 64 home computer as payment for his services.
After finishing his secondary education, Nurazam spent four years studying electrical and electronic engineering at Chiba University in Japan. It was in the early 2000s and at the height of the personal computer boom. The country had become the centre for computational hardware.
After graduating from university, Nurazam worked at a multinational corporation in Japan, where he developed encryption models. After he obtained several patents for his work, he made a proposal to Malaysia’s Ministry of Defence to use one of his encryption models to enhance its cybersecurity levels, but it was turned down.
Nurazam was offered the position of security researcher by the Japanese government, but he could not accept it as he had to return to Malaysia, being a recipient of a scholarship. At that point, he already had plans to build a supercomputer, but lacked the capital to do so.
“I went back to Miri and set up an online trading business, where I imported information and communications technology components from Japan and supplied these to a local oil and gas company. Companies in this industry use a lot of Japanese parts, which put me at a bit of an advantage. But sooner or later, others could do the same thing because online trading had become quite common,” says Nurazam.
He soon realised that there was little support and few incentives for the IT sector in Sarawak compared with the agricultural and biotechnology industries. This, coupled with the challenges of running an online trading business, led him to set up Twistcode Technologies Sdn Bhd in Kuala Lumpur in 2006.
Twistcode started out by providing businesses with computational hardware and solutions. But instead of replacing old components with new ones, Nurazam built on top of the existing hardware and connected the parts using parallel computing as a cost-cutting measure for his clients.
Later, he applied for a loan from the Business Start-up Fund, launched by the Malaysian Technology Development Corporation, to develop solutions for Malaysia Genome Institution. Part of the funds went towards building the first version of his supercomputer, A.D.A.M (Accelerated Devices Always Massive), which he upgraded as time went on.
Twistcode now specialises in supercomputing. It provides sectors such as healthcare, financial, oil and gas, cybersecurity, safety and robotics with computer processing acceleration and artificial intelligence (AI) solutions.
“I love speed and a supercomputer means speedy computers. I cannot drive a car or ride a motorcycle to compete with the world’s best because I may lose an arm or my head. There were no supercomputers in Malaysia at the time. So, I hope to ‘drive’ a supercomputer to compete with the world’s best,” says Nurazam.
Today, A.D.A.M is the most powerful supercomputer in Southeast Asia and No 88 in the world, according to the latest High Performance Conjugate Gradients Benchmark, an index that ranks the top 500 computing systems across the globe. Twistcode’s supercomputer has been used to develop solutions for breast cancer detection, provide specialised cloud computing services, accelerate computer processes and assist in the evolution of a self-aware AI.
Five-day prediction tool
The company’s latest solution is OKANE.MY, an AI-powered forecasting platform hosted on A.D.A.M. Launched in May last year, the platform can predict market movements at least five days in advance.
It is able to analyse and forecast the price movements of all the stocks on Bursa Malaysia’s Main Market and selected counters on the ACE Market and Leading Entrepreneur Accelerator Platform (LEAP). It is also able to predict the price movements of stocks listed on bourses in Thailand, Singapore, Indonesia, Japan, Turkey and the UK.
When users look up a particular stock, a technical chart shows up. There is a prediction line at the end of the chart indicating whether the price will go up or down in the next five days, with the exact figures shown
According to Nurazam, OKANE.MY can provide predictions with up to 90% accuracy, based on its deviation away from its original forecast. “For example, we predict that a counter will go up by 100 points. But in reality, it will be about 80 points. So, there is a deviation. We do not have 100% accuracy yet,” he says.
The platform derives its ability to forecast from factors such as time-series historical data, fundamental analysis and sentiment analysis.
Using time-series historical data, the platform is able to produce a baseline for how a stock will perform based on its track record. “For example, if every December, the share price of a certain retail company has a slight uptick due to the festive season, we can predict that the same thing will happen [next year]. But that is only [based on] historical data,” says Nurazam.
The prediction model also uses fundamental analysis, looking at the company’s financial health by using indicators such as earnings per share, price-earnings ratios and dividend yields. “If the indicators are above a certain range, such as having a return on equity of more than 15%, it will produce a positive signal, which elevates the predicted share price and vice versa. We determine the range with the help of multiple sources such as online journals and consultations with remisiers. Once we have set up the parameters, the AI automatically evaluates the data,” he says.
Market news has a significant impact on companies’ share prices as well. So, the system relies heavily on sentiment analysis to provide more accurate forecasts. The platform does this using natural language processing, where it sources market news from Reuters and analyses the content to determine whether the news will have a positive or negative impact on stock prices.
“We look at how a particular move can result in a chain reaction. For example, if India wants to ban our palm oil, we could face an oversupply of the commodity. When there is an oversupply, palm oil price will fall and this does not benefit the farmers who plant oil palm trees. But it will be good for others because they can get cheaper palm oil,” says Nurazam.
“However, in the future, the farmers could stop producing palm oil because the profit margins are too low. If they choose to do so, palm oil prices will go up again [due to a shortage in production]. So, we must look at the sentiment analysis, and not just historical data.”
Pursuing higher levels of accuracy
According to Nurazam, OKANE.MY’s 80% to 90% accuracy is still below the 95% he is aiming for. But he is confident that the accuracy rate will increase over time.
“One of the reasons is that we train the AI every day [to predict stock movements], even though we do not need to do so. If we have a pre-trained model, we only need to [conduct] inference, which means inputting data and outputting results. The training part is the most time consuming and computationally intensive. But we need to do that to increase the accuracy,” says Nurazam.
To further improve the system’s accuracy, he looks forward to offering a premium subscription that will enlist the help of users to train the AI. The premium users will be able to customise their own models using their own predictions with the help of the platform’s algorithms. These models will then be shared with other users on the platform as an additional forecasting model, outside of the standard predictive model powered purely by AI.
“If the premium users expect prices to go up [higher than forecast by the algorithms], they can plot higher [prices on the chart]. Every time this happens, it forces the machine to learn. And if it encounters this pattern again [in the future], it will apply what it was taught,” says Nurazam.
Users will be able to rate the custom models with a zero to five-star score. Nurazam says there is a possibility of offering a revenue sharing option to premium users who are able to come up with a predictive model that is accurate enough and have garnered many followers.
“We want people who can do better than us, not only to get revenue from us but also to train the machine directly. No programming language is required,” he adds.
The premium subscription is scheduled for release by the end of this year. Currently, users are able to subscribe to the basic package — which offers five-day predictions based on time-series historical data, fundamental analysis and sentiment analysis — for RM129 a month or RM1,500 a year. Note that the platform does not provide stock recommendations.
Targeting B2B clients
According to Nurazam, running OKANE.MY alone takes up 60% of A.D.A.M’s computational capacity. So, other start-ups will find it hard to create a similar platform due to the sheer computational power the platform requires to keep the system running.
“For AI, when you have the [computational] power, you can do a lot of things because you do not foot the cost up front. For example, if you do not have computing power, one thing you have to leverage is cloud services, which are quite expensive. One server on these services can cost about RM15,000 a month. There is no way we can run our platform at that kind of cost,” he says.
“The platform will not make much money by itself. Even with a supercomputer, we will not make much money with cloud computing as a service. That is why our main objective is on-premise solutions. To survive long term, we have to reach out to the business segment. The institutions that want to use our services will not use OKANE.MY online. They will acquire one of our servers for their own investment arm.”
Nurazam says the company has received an enquiry from a local oil and gas company looking to adopt the AI model to help it determine the best time to buy and sell its natural gas assets. A local digital asset securities exchange is also interested in partnering the company to determine which cryptocurrency is worth mining at any given point in time.
“A local bank wants us to use our model to predict the best time to buy foreign currency. For example, many people travel overseas in November and they buy a lot of foreign currencies. So, when is the best time to buy foreign currencies in bulk?” says Nurazam, who plans to add forecasts for foreign currencies, cryptocurrencies and commodities for individual users in the future.
He is so confident in the platform that he uses his predictive model to invest his own money. He has also convinced his family to invest in the stock market based on the forecasts made by the AI.
“The biggest risk-taker would be my sister. She used her own money to trade some stocks [based on OKANE.MY’s predictions], but she had a paper loss of about RM1,200 just a month ago due to a technical glitch. Although her initial cost was RM10,000 or RM20,000, the loss was still considered a lot for a single day, just because of the technical glitch,” says Nurazam.
He says the glitch was caused by the trading suspension of certain stocks, which fed the training algorithm with missing or low-quality data, resulting in an inaccurate forecast. To solve this issue, he tweaked the training algorithm to normalise missing data and made it a point to never allow such incidents to happen again.
As for his sister, Nurazam has told her not to sell the stocks as she will be able to find the most opportune time to sell based on the predictive algorithm. Despite this incident, he says his sister has seen an accuracy rate of about 85%, with more positive responses coming from other beta testers.