Skip to main content
Blog home
Newsletter
News
Video
Podcast
Reading list
Wright Brief
Sign In

Deep Learning in Finance

We look at practical application of deep learning models in trading and finance

Listen to this article
Audio · ~4 min
Add as a preferred source on Google
Deep learning

I am writing this post as a follow up on a talk by the same name given at Re-work Deep Learning Summit, Singapore. In the talk I tried to detail the reasonswhy the financial models fail and how deep learning can bridge the gap. Further on, I moved on to present three use cases for deep learning in Finance and evidence of the superiority of these models .

Financial Models

While finance is the most computationally intensive field that there is, the widely used models in finance — the supervised and unsupervised models, the state based models, the econometric models or even the stochastic models are marred by the problems of over fitting, heuristics and poor out of sample results. Which is because, the financial domain is hugely complex and non-linear with a plethora of factors influencing each other .

To solve this, if we look at the research done in Deep Learning in proven fields of image recognition, speech recognition or sentiment analysis we see that these models are capable of learning from largescaled unlabelled data, forming non-linear relationships, forming recurrent structures and can be easily tweaked to avoid over-fitting.

If these models find application in the discipline of finance then the applications are far and wide.These models can be used in pricing, portfolio construction, risk management and even high frequency trading to name a few fields . So let us tackle a few of these problems.

Return Prediction

Taking the sample problem of predicting daily Gold Prices, we first look at the traditional methods.

ARIMA

Using the Autoregressive Integrated moving Average model, which tries to predict a stationary time series keeping the seasonal component in place we get a result

ARIMA Results
ARIMA Error

VAR

If we add related predictor variables to our auto-regressive model and move to a Vector Auto Regressive mode l, we get these results —

VAR Results
VAR Result 1

Deep Regression

Using the same inputs if I fit a simple deep regression model on the data, I get far better results,

Deep Regression Result
Deep Regression Data

Convolutional Neural Networks

Modifying my architecture to use convolutional neural networks for the same problem, my results are

CNN Result
convolutional neural networks Data

These results are drastically better. But the best results come next.

Long Short Term Memory (LSTM)

There you go! Using these variations of recurrent neural networks, my results are:

LSTM Result
Mean Squared Error

So overall the trend of the mean squared errors is a revelation !

Mean Squared Errors
Free tool

Check the macro backdrop

GDP, inflation, rates and more — India’s key economic indicators in one dashboard.

Open Economic Dashboard

The Wright Brief · free weekly

Get research like this in your inbox

The week’s research that mattered, in five minutes. Joined by 1.6L+ investors.

Portfolio Construction

The second financial problem we will try to tackle using deep learning is of portfolio construction. The application of deep learning to this problem has a beautiful construct. My study is inspired by a paper titled Deep Portfolios.

What the authors of the paper try to do is to construct auto-encoders that map a time series to itself. The errors of prediction using these auto-encoders becomes a proxy of a stock beta (correlation to the market), the auto-encoder being a model of the market!

Ch oosing a diverse set of stocks based on above mentioned auto-encoder errors, we can construct a deep index using another deep neural network and the res ults are quite good.

Deep Index Result

The deep neural network here has become a index construction method that replicated the index usingthe stocks.

But that’s just the beginning of it! If we apply smart indexing, where I remove periods of extreme drawdown from the index and train my index mapping deep neural network on the smart index, I am able to outperform the index in a drastic way!

Smart Portfolio Result

This technique has a huge potential in the field of portfolio construction!

Free tool

See what markets are pricing in

Live indices, sector moves and market breadth — the backdrop to every story we publish.

Open Market Tracker

Conclusion

The current trends in the financial industry are leading the way to more sophisticated and sound models finding their way in. Technology is a huge area of stress for all the banks with a large number of data scientists entering the field. You have hedge funds like RelTec and Worldquant that already use this technology in their trading. With the superior results shown by these sophisticated models in other fields and the huge gaps open in the field of financial modelling, there is a scope of dramatic innovations!

Better solutions to our critical problems in the field of finance and trading would lead to increased efficiency, more transparency, tighter risk management and new innovations.

PS: The code used for all the above analysis can be found on my github repo

I’m planning my next post on deep RL for portfolio management, so keep tuned in!

Any good suggestions are welcome.

Please visit my website https://www.wrightresearch.in / to know more about the investment strategies I manage!

Disclaimer: Investment in securities market are subject to market risks. Read all the related documents carefully before investing. Registration granted by SEBI, membership of a SEBI recognized supervisory body (if any) and certification from NISM in no way guarantee performance of the intermediary or provide any assurance of returns to investors.

The content in these posts/articles is for informational and educational purposes only and should not be construed as professional financial advice and nor to be construed as an offer to buy/sell or the solicitation of an offer to buy/sell any security or financial products. Users must make their own investment decisions based on their specific investment objective and financial position and using such independent advisors as they believe necessary.

Wryght Research & Capital Pvt (Brand name: Wright Research) is a SEBI Registered Portfolio Manager Reg No: INP000007979 (Validity: Apr 03, 2023 – Perpetual) and a SEBI Registered Research Analyst No: INH000017295 (Validity: Jul 03, 2024 – Perpetual), with its registered office at 103, Shagun Vatika Prag Narayan Road, Lucknow, UP, 226001 India and CIN: U67100UP2019PTC123244. Past performance may or may not be sustained in future. Performance provided there in is not verified by SEBI. Investment in securities is subject to market and other risks, and there is no assurance or guarantee that the objectives of any of the strategies of the Portfolio Management Services will be achieved. Registration granted by SEBI, enlistment as RA with Exchange and certification from National Institute of Securities Markets (NISM) in no way guarantee performance of the intermediary or provide any assurance of returns to investors. Please read the Disclosure document carefully before investing. Securities quoted are for illustration only and are not recommendatory. Charts shown are for illustration only. For more information and disclosures, visit our disclosures page here.

Found this useful? Share it.
Explore related topics
Sonam Srivastava
About the author
Sonam Srivastava
Founder, CEO | Wright Research, Wright Research

I am passionate about building a scalable quant business.

Wright PMS · Portfolio Management Service

Put this research to work

The same 300+ factor research engine behind this article — applied to a professionally managed portfolio, end to end.

300+
Factors tracked
1.6L+
Investors
₹1,300+ Cr
Invested
SEBI
Registered PMS