Machine Learning Tasks to Create a Trading Strategy | Python for ML in Finance | Free Quantra Course

Machine Learning Tasks to Create a Trading Strategy | Python for ML in Finance | Free Quantra Course

Join our free Inside EPAT Live Session on Thursday, 2nd July 2026 at 9:30 AM EDT | 7:00 PM IST | 9:30 PM SGT. Get clarity on the curriculum, tools, learning journey, outcomes, and placements. Register here: https://bit.ly/4w6R4Lw . . . AMA WITH NITESH KHANDELWAL Get unfiltered, direct answers from Nitesh Khandelwal, Chief Executive Officer and Director, QuantInsti, Co-Founder, iRage on EPAT, career outcomes, and what it truly takes to build expertise in algorithmic trading. Thu, 9 July | Live Online | Free Register for Free: https://www.quantinsti.com/algorithmi... _ _ _ A quant fund manager + A HFT prop desk founder + A quant teacher = a session worth watching On 9 April, we hosted Kelvin Foo, Dr Gaurav Raizada, and Vivek Krishnamoorthy for a workshop on Algorithmic Trading & Options Risk Management. Watch the recording: www.quantinsti.com/articles/algorithmic-trading-python-ai-options-risk-management-webinar/ . . Part of the FREE course on Python for Machine Learning in Finance: https://quantra.quantinsti.com/course... Welcome to this video on machine learning tasks. After completing this video, you will be able to explain the following tasks carried out by the ML algorithm. Rob is looking forward to use a machine learning algorithm that can guide him when to go long on J P Morgan stock. He gets the price data from a data vendor. He then makes sure that the data quality is good. He does this by checking for missing and duplicate values in the data. He performs other analysis to ensure that the data can be used with the ML algorithm. Since Rob wants the ML algo to predict when to go long on J P Morgan. He marks the days when the next day's price is more than today’s price as 1. And the rest of the days are marked as zero. This is his target variable or what his ML algo will try to predict. But what does he use to try to predict the target variable? He uses indicators like RSI, MACD, even momentum indicators such as ADX. These are the inputs to the machine learning algorithm or feature variables. The feature variable and target variable are passed to machine learning model so that the model can learn the relationship between them. How does he evaluate if the machine learning model is effective or has indeed learnt something useful? Rather than using the full data, he splits the data into two parts: train and test. The train data is used by the machine learning algorithm to learn the relationship between the feature variables and the target variable. This knowledge can be used by the machine learning to predict the target variable if you just pass the feature variables. That is, you just pass the RSI, MACD and ADX values as input, and the machine learning model will tell you when to go long on JP Morgan. Once the learning on train dataset is over, Rob verifies the performance of the machine learning model on the test dataset. If the performance on test dataset is good, then model has indeed learnt something useful. Which metrics can be used to evaluate the performance of the model? Rob can compare the predictions of ML model with what actually happened on those days. If the predictions of the ML model match with what actually happened then ML model is very effective. For example, the ML model predicted a signal of 1 on 23rd December, 2019. This means that the ML model thinks the price would increase from 23rd to 24th December. He checks the prices, and sure enough, it had increased from 23rd to 24th of December. This means that the ML program was correct in predicting the price moves. Finally on the test dataset, he generates signals through the machine learning model, places trades based on them and measures change in portfolio value. He plots the equity curve and drawdown, to analyse the performance in detail. This was a brief overview of the ML tasks to create a trading strategy. Quantra is an online education portal that specializes in Algorithmic and Quantitative trading. Quantra offers various bite-sized, self-paced and interactive courses that are perfect for busy professionals, seeking implementable knowledge in this domain. Find more info on - https://quantra.quantinsti.com/ Like us on Facebook:   / goquantra   Follow us on Twitter:   / goquantra