INVESTING — DATA SCIENCE AND ANALYTICS

Supercharge Technical Analysis with Machine Learning

A comprehensive guide to adding Machine Learning layer to Technical Analysis for stock trading — Using PyCaret and Ta-Lib

Riazuddin Mohammad
DataDrivenInvestor
Published in
10 min readOct 17, 2022
Photo by Maxim Hopman on Unsplash

Where we left off.

In my last article on the subject titled Automating Technical Analysis for Stock Trading With Python, we discussed how to:

  • Define the universe using Top N stocks based on Market Cap from our choice of index
  • Use the TA-Lib library to find if any of the 61 Technical Chart Patterns show up in the universe of stocks we selected
  • Assimilate the Bullish and Bearish pattern signals into a unified score to find Top-Buy and Top-Sell ideas for the day

We also discussed that the approach had two major shortcomings:

  1. It weighs all patterns equally and does a linear aggregation of signals. In real life, different chart patterns will have different levels of importance
  2. It omits the interaction effect between patterns and patterns + indicators. Specific chart patterns only become relevant when volumes support them or where the prices are from the moving averages etc.

A technical analyst would generally apply heuristics and collection of personal experience to weigh the charts and interactions thereof to generate buy/sell signals and their respective probabilities. However, this does not have to depend on individual memory and heuristics. We can use Machine Learning to do that work for us — objectively and efficiently. This is what we will try to achieve in this article.

To do this we would use the ultra-efficient PyCaret. PyCaret is a low-code machine-learning tool that has reduced the time and effort of experimentation for citizen as well as professional Data Scientists by several orders of magnitude.

Read the full story with a free account.

The author made this story available to Medium members only.
Sign up to read this one for free.

Or, continue in mobile web

Already have an account? Sign in

A Finance & Analytics professional striving to make sense of the ever-changing world around us. https://thenextderivative.substack.com/