A Machine Learning Stock Trading Strategy Using Python
ฝัง
- เผยแพร่เมื่อ 20 ส.ค. 2024
- #Programming #Python
A Machine Learning Trading Strategy Using Python:
Stock Price Direction Using Machine Learning & Python
Get the data set:
/ 70720194
Disclaimer: The material in this video is purely for educational purposes and should not be taken as professional investment advice. Invest at your own discretion.
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
⭐Please Subscribe !⭐
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🐦🔥🐤 Support The Channel🐤🔥🐦
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
⭐Get the code and data sets or just support the channel by becoming a supporter on Patreon:
► / computerscience
⭐Website:
►everythingcompu...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
📚Helpful Python Programming Books📚
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
► Hands-Machine-Learning-Scikit-Learn-TensorFlow:
amzn.to/2AD1axD
► Learning Python:
amzn.to/3dQGrEB
►Head First Python:
amzn.to/3fUxDiO
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
📚Helpful Financial Books📚
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🌟Stock Market Investing Books:
✔️The Bogleheads' Guide to Investing
amzn.to/3s0icxA
✔️The Intelligent Investor
amzn.to/34Mj7t1
✔️A Random Walk Down Wall Street
amzn.to/3Bv0ghW
🌟Money Mindset Books
✔️Rich Dad Poor Dad:
amzn.to/3rZW6eE
✔️Get Good With Money: Ten Simple Steps To Becoming Financially Whole:
amzn.to/3I1UXc1
Great project! A small tip: For those that did not understand quite well exactly what the strategy consist is basically when he inputs the independent variables to the model, the model predicted zeros and ones, understanding one as a buy signal for the day and zero as a selling signal. In the end, he compares the strategy returns with a simple buy-and-hold strategy. Again as he mentioned a good project, but for investment purposes, it needs more optimization and backtesting.
hey, thank you for this video. It was really helpful. I managed to improve the results by adding a "speed" input to the NN. Where df['Speed'] = df.Close.shift(-1) - df['Close'].
Awesome! Cant wait to start coding this project alongside you!
Let’s go 🙏
I see your code to calculate Strategy return = strategy return * return ( normal return) I think it must be dependent
i have one question:
i have output
The stock gives return of 260.39%
The strategy gives return of 5920.5% WTF?
you have something from the present day, and you should use lagged data (1 day lag for instance). if you use data from the day you want to predict it becomes unreal results.
Great video! Can you make a video on Chande Momentum Oscillator? Thanks
Sir how to track institutional activity live with python.
what is the model of the strategy really i very much confused ..... May be the coding is good but the strategy is not clearly explained ....
Not bad
Great work, but the way the bot work make me wonder, if the bot says buy today but the market closed, that’s mean I should buy tomorrow with opening price ? How can we follow the recommendations in general
hehe yes. so you could use intraday prices and have a trading strategy that is more practical, trading everyday at the same time for example. however it is an easier model to use daily prices for learning.
Everything's great, but I can't figure out what would be our buy signal according to the strategy?
The model predicting y=1 is the buy signal, while y=0 could be, but is not a sell signal.
Strategy name?
This is absolute trash. You trained the model on 90% of the data from 2020 to 2021 and created a 'trading strategy' which already knows what the price action will do on a specific day. What you should do is show how this strategy performs on data not in the trained set ONLY, i.e. the 10% of data not used. However, around 30 days of the strategy is pretty insignificant so testing on live data would be far more useful.
yes, you are right you can just change the percentage if you want and use different data set, but this is a fun project he did not seem like he was actually planning to trade with it. Obviously live testing is way better and a lot more work and back testing is needed if you actually want to automate something like this and i would use a different module as well. but this is a fun program and I enjoyed it! great video for beginners.
where can i get the csv used in the video?
from yahoo finance
Great piece ... of garbage. But, honestly, very good demonstration for high school students' learning. Cheers.