Finance & businessSharpeEdgeHow to Use Logistic Regression for Trading | Python Data Analysis & Backtest

How to Use Logistic Regression for Trading | Python Data Analysis & Backtest

Long-form22:31People & BlogsPublished Aug 18, 2026, 7:00 AM · 3mo ago
Views
14,858
+0 views/hour
Views / hour now
0
measured 7h ago
Peak views / hour
2
4w ago
First 24 hours
—
not tracked from upload
Engagement
2.2%
likes + comments / views
Likes
302
2.0% of views
Comments
27
0.18% of views
Est. ad revenue
$178–$428
lifetime, $12–28.8 RPM

Checked every 24 h while the video is this age · last check 7h ago · next in 993 min. YouTube itself updates public counts with a short delay.

Avg views / day
140
since upload
vs channel median
1.1×
this video's views ÷ the channel's usual
Rank in channel
#5
of 11 tracked

Views over time

0 readings

Total views Views gained per hour
Live tracking started
The chart fills in as FameX records new readings.

Description

Consulting calls and strategy reviews: https://sharpe-edge.netlify.app Educational content, not financial advice (full disclaimer below) I tested whether a simple machine learning model can actually find a trading edge, starting with linear regression on the S&P 500. It found nothing robust, tested across 10 instruments and 6 asset classes. Logistic regression, with the right target definition, did. This video walks through the full process: not just the model, but how I checked the result was real before trusting it. In this video: - Why machine learning makes sense for trading - The risks: look-ahead bias, overfitting, non-stationarity - How logistic regression works - How to setup the problem - Python Data Analysis: feature engineering, target definition, correlation analysis, comparison with naive classifier, walk forward analysis, replication across other instruments, regularization using cross validation - Backtesting the model signal in my own trading software Resources: Jupyter notebook: https://github.com/pietrobelli26/sharpe_edge_code Interested in seeing this ported to an MT5 Expert Advisor? Let me know in the comments. 🔔 Subscribe for algorithmic trading, quant research, and Python strategy development. 📌 Previous video — How to Code a Trading Bot in MetaTrader5: https://youtu.be/bVbqQzrxxZo Disclaimer: This video is for educational purposes only and is not financial advice. Trading involves risk, and past performance (backtested or otherwise) does not guarantee future results. Timestamps: 00:00 Intro 00:29 Why ML for Trading 00:56 Dangers 02:12 Logistic Regression 03:03 Regularisation 03:51 Problem Setup 04:43 Case Study 05:20 Python Data Analysis 15:29 Backtesting the Model #AlgorithmicTrading #MachineLearning #Python #QuantitativeTrading #LogisticRegression #TradingStrategy

Statistics from the YouTube Data API, tracked by FameX. Views per hour, revenue and comparisons are FameX estimates.