Neural Networks for Finance

Let’s start with, what is an Artificial Neural Network?

An Artificial Neural Network or ANN is a software program that mimics the human brain’s ability to classify patterns or to make predictions or decisions based on past experiences. The human brain relies on inputs from the five senses, while the artificial neural network uses inputs from data sets. ANN have three or more layers of neurons. The first layer of neurons, called the input layer, has one neuron for each input to the network. Each neuron in the input layer is connected to every neuron in a hidden area. The hidden area occasionally consists of more than one layer, in which case each neuron in the first hidden layer will be connected to every neuron in the second hidden layer. The last layer in the hidden layer is connected to the outer layer. The strength of the connection between the various neurons varies with the weights allocated to each of the inputs. To start with a neural network, you would typically define a function that would map any value to a value between 0 and 1. This is called a “Sigmoid” function.

This function will be run at every neuron of our network, it is useful in converting probability out of numbers. Then after you add the input, you would like to seed them to make them deterministic as you would be adding random weights. Then you would add the synapses (synapses are the connection between each neuron in one layer to another neuron in another layer). Each synapse has a random weight attached to it. As you train this neural network, the error rate will go down as the allocation of weights which were initially random would autocorrect to a more accurate value.

Selection of appropriate inputs is one of the biggest challenges while designing a neural network. Selecting which inputs will impact NIFTY 50 is a relatively tougher job than selecting inputs for which mortgage application is most likely to default. Because both inputs and target outputs used in time series forecasting are very noisy (the data has a lot of random movement that has nothing to do with the trend). The data used in rating mortgage application are usually more generalized. If there is no income in that month, the person will default. However, in a time series forecast, the NIFTY 50 could go down today and come back up tomorrow and remain up for two months. Is it possible to claim that this fall in NIFTY 50 just noise? Credit Card customer search is another domain where neural networks are used because they require very specific customers to sustain. This ideal customer should spend heavily and not use revolving credit line. Hence, per card revenue will be below per card cost which will result in a lower breakeven point. This is crucial for a bank as the incidental & incremental exceed the revenue resulting in a non-profitable business. Therefore, implementing neural networks to distribute credit cards will maximize profits.

MJ futures claims that they achieved a return of 199.2% over a 2-year period using neural networks. Neural networks can identify trends in data that humans might not notice. For example, Dean Barr and Walter Loick at LBS Capital Management using a neural network with 6 inputs. One of these inputs is the ADX, which indicates the directional movement over the previous 18 days. Two more of these inputs are the current value of the S&P 500, and the net change in the S&P 500 value from 5 days prior. It has also been observed that with a network with 3 hidden layers and 20-40-20 neurons in hidden layers was the optimized network with an accuracy of 94.08% for validation dataset.

One of the most common mistakes that most traders make is taking Standard Deviation as their volatility in all their calculations. However, this is a backwards-looking figure and not an accurate anticipation of the future. To solve this figure an implied volatility could be used or volatility using an Artificial Neural Network. This was done in Shaikh A. Hamid and Abraham Habib’s paper on “Financial Forecasting with Neural Networks”, where they discovered that volatility forecasts as per ANN are more accurate than Barone-Adesi and Whaley (BAW) for pricing American options on futures.

  1. They started by selecting appropriate inputs. Technical price data on Treasury bonds was fed along with fundamental data that also effects the market could also be added like fed rates, GDP, money supply, Inflation rate, CPI& Inter-market inputs.
  2. Then they moved on to processing the input data by scaling it between 0 to 1 and normalizing the data.
  3. Specifying a network is the next step. Therefore, they used a feed forward back propagation network. For the input, they took 11 neurons and twice as many in the second layer (In total there are 3 layers).
  4. Then they trained the network with enough historical data.
Author
Neil Jha
Team Leader – Fintech
(M.Sc. Finance, NMIMS – Mumbai. Batch 2018-20)

Connect with Neil on LinkedIn

Artificial Intelligence in Finance: A Genesis

Artificial Intelligence (AI) started as the branch of computer science that aimed to make the computers follow logical steps to do some of the basic functions that the humans perform using common sense and has evolved from imitation, extension, augmentation and finally aims to reach human-level AI. In 1956 John McCarthy used the coinage ‘Artificial Intelligence’ and proposed a summer research project on the subject at the Dartmouth college involving scientists of psychology, mathematics, computer science and information theory; marking the beginning of AI as a science and engineering of making intelligent machines and recognizing it as a field of research. Technologies driving AI have since evolved from conventional programming using logical steps, heuristics using neural networks, machine learning using big data analytics to the ability of self-evolution. As a part of AI, machines simulate human intelligence processes like learning (acquire information and the rules for using that information), reasoning (using rules to reach approximate or definite conclusions) and self-correction to find application in expert systems, speech recognition and machine vision.

Kai Fu Lee classifies AI revolution in four waves. The first wave was the internet AI which began about 15 years ago but matured around 2012 and was mostly about using AI algorithms as recommendation engines. Some of the common applications of these are in recommending streaming videos in YouTube and likely next purchase on Amazon. Many users find internet experience getting better and becoming addictive often because of a successful AI recommending algorithm working in the background. Companies like Google, YouTube, Baidu, Amazon and Alibaba made substantial financial gains using internet AI. Another major application of internet AI is in using algorithms as editors giving real time news that is customised to a user, digital reporter and a virtual robot cop that reports fake news.

The use of neural networks, Deep learning and Machine learning in financial services has recently exponentially gone up, with there being “Robo-advisor’s”, such as “Wealthfront”. Traditional financial advisors have high fees, minimum account balances etc. However, in “Wealthfront”, they use risk assessment algorithms to ascertain risk and create highly individualized plans. The created portfolio is also continuously monitored and periodically churned to give the highest return.

The use of neural networks is also used to find cointegrated pairs for pairs trading. As after implementing a rolling Beta, the pair which was once cointegrated for a time period might not be so in the future and might not mean revert. And using machine learning on previously cointegrated pairs that stopped mean reverting.

Even Bank Of America Merril Lynch is implanting enterprise software fintech HighRadius’s Artificial Intelligence solution to speed up stock receivables reconciliation for the banks big business clients. While, some might look at Artificial Intelligence as a path to a brighter future with greater efficiency. There are others like Elon Musk, who refer to the future of Artificial Intelligence as an “immortal dictator”. This might sound hypocritical of him as he created an AI that defeated some of the best DOTA 2 players in the world. This is one of the greatest milestones that AI has ever crossed. IBM’s Deep blue computer defeated one of the best chess players in the world Garry Kasparov in 1997. And In 2016, AlphaGo defeated Lee Se-dol at the board game Go. This further pushed China to peruse AI as the board game GO which was the pride of China.These fears regarding AI are not applicable to the use in Finance; As they are not true while using “narrow AI”, such as in Financial Services.

The second AI wave was the business AI, that makes use of legacy systems data that was already being labelled and stored by traditional companies like the insurance companies covering data on accident claims and frauds, banks on loans and repayment rates, hospitals on diagnosis and survival rates etc. and structured corporate data like historic stock prices, credit card usage, mortgage defaults etc. Early instances of business AI have clustered heavily in the financial sector because it naturally lends itself to data analysis since it runs on structured information and has a clear metric that needs to be optimized. AI, therefore, is ideally applied for optimization for maximisation of the bottom line.

AI finds application in computational finance where an automated intelligent agent is applied for pattern recognition and use it to discover patterns in the stock prices for accurate prediction. Although major companies like Palantir and IBM offered big-data consultancy since 2004, major capabilities in the field emerged after the adoption of deep learning in 2013. Companies like Element AI of Canada and 4th Paradigm of China entered the competition offering algorithms that could mine the data of traditional companies and organizations to improve fraud detection, make smarter trades and uncover inefficiencies in supply chains to use AI for cost savings and profit maximisation.

Whilst there are several credit cards and mobile payment applications that are popular and prevalent, their core services limit spending. An AI powered micro finance app called Smart Finance in China relies exclusively on an algorithm to make millions of small loans. The deep learning algorithm uses a wide range of information including offbeat information like the speed at which the user types his date of birth or the amount of battery power left on the phone etc. of the user from his mobile to predict the repayment potential and authorise loans. In late 2017 the company was making more than 2 million loans per month with default rates in low single digits which outperform many traditional brick-and-mortar banks because it targeted a large user base of potential micro-finance seekers that was ignored by the traditional banking sector – the young and the migrant workers.

The other major applications in the second wave of AI are the use of algorithms for expert medical diagnostics and for legal advice to the judges based on deep learning. The 3rd AI wave is the perception AI where the distinction between the real and the virtual world are being increasingly blurred and digital assistants and Augmented as well as Virtual Reality applications are being introduced. The 4th AI wave is about autonomous vehicles like self-driving cars and autonomous robots to be employed in workplaces. The 3rd and the 4th waves are still in emerging phases but are fast expanding.

Author
Neil Jha
Team Leader – Fintech
(M.Sc. Finance, NMIMS – Mumbai. Batch 2018-20)

Connect with Neil on LinkedIn