Finance (Trading, Investing, Fintech, etc.)

Calling all quants, traders, fintech enthusiasts, and all others who wish to use Deep Learning to transform the financial industry here!

I’m gonna pose some questions here, particularly for graduates of the Fastai course, but feel free to interject your own questions or thoughts here as long as they’re related to DL in Finance.

I’ve built a few predictive models using Keras/Tensorflow, Scikit-learn (mostly SVMs) and Q-learning in the past with limited success (frequently running into problems with overfitting to various degrees.) I’m hoping to add Fast.ai to my toolkit to revisit these past models and modernize them with the latest DL techniques. Right now, I’m curious if what’s taught in this course will be of use here.

Financial data tends to come in Time Series form and this requires the use of RNNs (which I see is a topic later in the course.) As of right now, I’m only on lesson 2 of part 1, so i’m wondering if any concepts or theories will be covered later in the course which will hopefully answer my following questions:

  1. Financial data is often updated every single weekday. Ideally, I’d like to do some update training on my model every single day after the market closes and prints out a new datapoint for every stock I’m watching. This would be analogous to the Dogs & Cats model receiving one new picture of a dog or cat everyday and having to update the model to reflect having trained on that new picture everyday. Is it efficient and practical (not just possible) to train an existing model on a single new datapoint every single day without retraining it from scratch each time and have it continue to work reliably? Or would it be more effective to gather together several new datapoints (say every week or month) and add them to the model in batches?

  2. I can easily formulate a trading or investing model as a binary classification problem, just like CATS or DOGS:

  • Is the market going UP or DOWN tomorrow (or in a week, month, year, etc.)?
  • Are we in a HIGH or LOW risk market environment?
    However, I’d also like to build a model that’ll estimate how much the investment will return, say, after a week or a month (give outputs like 5.2% or -1.3% rather than a simple UP or DOWN.) Is this also possible using the Fast.ai stack?
6 Likes

You can try online-learning by feeding your model additional samples of data as they arrive. Among other things, you’ll need to play with optimizer parameters like momentum.

While trading financial assets is not my primary occupation, I’m an independent trader since the late 2000s. I never tried to employ ML/DL in trading, but it’s interesting, and I encourage you in pursuing that line of research.

For online deep learning, you could take a look to this: https://arxiv.org/pdf/1711.03705.pdf

I think that the biggest problem could be (other than online feeding) that you’ll seldom have enough data to make your model perform good.

However, it would be interesting to run some experiments about mixing DL-powered sentiment analysis over news, pure time series prediction (other than RNNs, take a look at FB prophet), and automatic fundamental/technical analysis.

Keep us posted :slight_smile:

3 Likes

Financial data tends to come in Time Series form and this requires the use of RNNs

Time series data doesn’t require RNNs (they are worth trying though). You can use any method from your supervised learning toolbox with a little feature engineering. The Rossman competition from Lesson 3 is a good example of this.

Is it efficient and practical (not just possible) to train an existing model on a single new datapoint every single day without retraining it from scratch each time and have it continue to work reliably?

Training models like the Rossman competition model in this course is very fast – less than 10 minutes. If you are still concerned, you can take your existing model and tune it using the methods in this course. For example, you can re-train the last layer or two of your model to save time. I suspect adding a single additional sample won’t have a large effect on your weights.

However, I’d also like to build a model that’ll estimate how much the investment will return, say, after a week or a month (give outputs like 5.2% or -1.3% rather than a simple UP or DOWN.) Is this also possible using the Fast.ai stack?

Sure! Turn the problem into a regression by changing the final softmax layer to a linear layer with a single output. Add a metric like mean average error (MAE) or root-mean square error (RMSE) to evaluate performance.

2 Likes

Have any of you tried Fastai on a credit modelling problem? For example, Risky Business competition on Kaggle.
If so, how did it work out?
Feel free to share tips - about to give it a shot.

I’m now having fun with an experiment called “Forex Cats & Dogs”, so give it a look. The basic concept is to get data, plot it on an image, assess if the next few candles will generate a buy/hold/sell signal, and then label the image accordingly.

Then dump all the images generated in this way into a top-level image recognition algorithm (even Lesson1+2 ones) and see how it goes…

My experience so far is that the accuracy is heavily dependent on what info you put on the images (candles, indicators, etc)…

Not an expert though :slight_smile:

1 Like

I was reading option volatility and pricing pdf to get ideas and think vol trading is much better than holding a stock. After studying for a bit and thinking to implement models to forecast volatility, I think it is a lot easier to turn 1k to a viable startup company rather than 1k to 100k, which is why I stopped studying quant phyance

1 Like

Even though this thread is five years old, I encourage you to continue exploring the latest advancements in Deep Learning and its applications in finance. The field keeps evolving, and new techniques and tools emerge constantly.

I stumbled upon this thread from five years ago, and it’s fascinating to see your interest in using Deep Learning to transform the financial industry. Time flies, doesn’t it?
While the specific technologies and frameworks mentioned, such as Fast.ai, might have evolved over the years, the idea of applying DL in finance remains exciting and relevant. DL has continued to make strides in various fields, including finance.
If you’re looking for resources to enhance your trading strategies, you might want to explore EarnForex. They offer a variety of MetaTrader indicators that can assist you in analyzing market dynamics and making informed decisions.