Algorithmic Trading and Price Prediction using Python Neural Network Models

  Рет қаралды 111,563

CodeTrading

CodeTrading

Күн бұрын

Welcome to our video on Algorithmic Trading and Price Prediction using Neural Network Models in Python. In this tutorial, we will be demonstrating how to apply neural network models to algorithmic trading and price prediction.
We will start with an introduction to algorithmic trading and explain its importance in today's financial markets. Then, we will discuss how neural network models can be used to make predictions on stock prices and other financial data.
Throughout the video, we will be using Python to build and train our neural network models. We will be working with real-world financial data, and we will show you how to preprocess and clean the data before feeding it into our models.
If you're new to the topic of neural networks, don't worry! We will provide a clear and straightforward explanation of how neural networks work, and how they can be applied to solve complex prediction problems in the financial industry.
So, if you're a data scientist looking to expand your skillset, or a trader looking to improve your trading strategies, this video is for you! Make sure to watch the previous video in this playlist for additional background information.
Thank you for watching, and good luck with your algorithmic trading and price prediction journey!
#tradingbots #pythoncoding #forexanalysis #python #algorithmictrading #machinelearning #technicalindicators #trading
🍓 If you want to follow structured courses with more details and practice exercises check my "About" page for Discount Coupons on my Udemy courses covering: Python basics, Object Oriented Programming and Data Analysis with NumPy and Pandas, ... more courses are on the way drop me a message if you have a particular interesting topic! Good luck!
💲 Discount Coupon for My Udemy course on Algorithmic Trading:
bit.ly/CouponAlgorithmicTrading
To download the code:
drive.google.com/file/d/17Gel...
previous video to check for more info
• Price Trend Detection ...
00:00 Neural Networks Trading Signal Introduction
04:00 Neural Networks Trading Strategy In Python Code
12:13 Trend Predictions Results Using Neural Networks

Пікірлер: 185
@sauce6534
@sauce6534 2 жыл бұрын
You have a great channel, thank you for including the download, its rare and its harder as a hands on learner. Have a great day sir
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you and Good luck Coding!
@Dr.jayfrancis
@Dr.jayfrancis 2 жыл бұрын
Will watch it this evening. Thank you again
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
let me know what you think, good luck trading!
@JohnQuezadaHuayamave
@JohnQuezadaHuayamave Жыл бұрын
Excelente video, es muy bueno lo eh revisado varias veces uniendo esta información con otros videos queda excelente la estrategia.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thank you!
@dukeubong
@dukeubong 2 жыл бұрын
Very interesting work here, thanks for sharing this.
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for your support 😊, happy Coding
@bayestraat
@bayestraat Жыл бұрын
Very insightful perspective of using OHLC data. If anyone is wondering what's a good start to learn ML, I'd recommend the book ML For Finance by Jannes Klaas. Just try to study the book, research and do some code practice through one chapter each week and you'll be an expert in no time.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thank you for sharing.
@garkeiner2342
@garkeiner2342 10 ай бұрын
Thanks for the book suggestion! I'm currently working (fighting, with enthusiasm) through "Machine Learning for Algorithmic Trading" by Stefan Jansen. I'm wondering if you had any knowledge of that one, esp. how much both overlap and whether it makes sense to ingest both? If you don't know ML4T, sorry for bothering you. 🙂
@bayestraat
@bayestraat 10 ай бұрын
@@garkeiner2342 most of the allocation I've spent trading goes to liquidity staking run by professional fund pools that implement their own market making algorithms. The research that goes into these pools are immense, costly and time consuming, so would it be interesting to learn these topics? Definitely. But is it really worth the effort to "build your own"? Absolutely not. Maybe if I've found and mixed around with people with the same interests as you and probably many folks lurking around videos like these, perhaps we can build one together as a team. Because then, that undermines all the costs and challenges associated to actually moving forward with applying everything we're learning about ML4T.
@walidwardak7306
@walidwardak7306 Жыл бұрын
thanks for providing good content and thanks for the code your videos make difference thanks again
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thank you for your support! It's nice to know these videos are useful, good luck!
@wingsoftechnology5302
@wingsoftechnology5302 2 жыл бұрын
Thanks alot...It was a great knowledge sharing
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for your support
@mohakaz4157
@mohakaz4157 2 жыл бұрын
Wow . Fantastic 😍😍😍
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Happy you like it, happy Coding
@chandrimad5776
@chandrimad5776 2 жыл бұрын
Extremely beneficial. Thanks for sharing. I am learning a lot from your videos.
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thanks a lot for your supportive comment, good luck with your coding
@chandrimad5776
@chandrimad5776 2 жыл бұрын
@@CodeTradingCafe thank you! can u also make videos on MACD divergence and Bollinger bands? would be helpful.
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
@@chandrimad5776 I will add these to the list and see how it goes
@chandrimad5776
@chandrimad5776 2 жыл бұрын
@@CodeTradingCafe Excellent, thanks!
@diegorc8925
@diegorc8925 2 жыл бұрын
Hi code trading I'm data scientist too. My suggestion is to optimize your threshold of your model prediction. In this case you have 3 labels so the threshold are 0.33, 0.66, 0.99
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi, thank you, you are right I didn't try to optimize the model, I will try your idea and see if results are affected. Thanks again!
@devsunny10
@devsunny10 Жыл бұрын
Hello Diego RC, can I connect with you ? please because I'm working on these topics
@shivin4889
@shivin4889 Жыл бұрын
Diego RC are you willing to take up a project on one of my trading bots ?
@muhammadyasirakkattilyusuf4274
@muhammadyasirakkattilyusuf4274 Жыл бұрын
@@devsunny10 Can I connect with you for the same
@devsunny10
@devsunny10 Жыл бұрын
@@muhammadyasirakkattilyusuf4274 please tell me
@user-ej9mc4yz7r
@user-ej9mc4yz7r 2 ай бұрын
thank you for sharing your work
@CodeTradingCafe
@CodeTradingCafe 2 ай бұрын
Thank you for your support! more videos are coming...
@user-xg5nm3dc1r
@user-xg5nm3dc1r 2 жыл бұрын
Special thanks to you
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for your support, you took the time to comment 🙂
@ionjauregui3010
@ionjauregui3010 2 жыл бұрын
Great channel and content, thumbs up. I will follow your contents from now on
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for support!
@santhosh6700
@santhosh6700 2 жыл бұрын
Good work.. brother
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for your support 😊
@kuki69kuki
@kuki69kuki Жыл бұрын
I think the problem may be that you use prices as inputs. The network learn static prices. Try to use percentage changes between prices.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, thank you for your comment, actually the price is not used as input only computed signals.
@Master_of_Chess_Shorts
@Master_of_Chess_Shorts Жыл бұрын
Have you tried simplifying the problem? Removing the notrend target would probably help. We only want to act when we notice an uptrend or a downtrend. I find trying to classify 3 outcomes is much more complicated than one or two and makes it difficult to do better than naive or random.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, it's possible to restrict only 2 categories but what if in reality market is moving sideways for few days it's not up nor downtrend so the algorithm would still provide one of 2 directions which is wrong, it will add inaccurate estimations.
@Master_of_Chess_Shorts
@Master_of_Chess_Shorts Жыл бұрын
@@CodeTradingCafe I don't know enough about the problem you're trying to solve, I'll look at the 2 previous videos. There might be a confidence level of the predicition to explore and to not make one when that level is not reached. You train on 60% of the data in a sequential manner based on a time index, do we know that the last 6 years or so of your 18 years of data behaved similarly? Are the features correlated? We could probably drop some if so. What about volatility? Could it be used somehow to increase accuracy? When the market is volatile there are less sideways movements. Did you try PCA or other approaches at feature selection? Shouldn't profit be introduced as a feature? Great video, you make this challenge ineteresting.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
@@Master_of_Chess_Shorts you are right, some features are correlated and a pca is definitely useful here, I haven't tried it, volatility is reflected in the ATR indicator so I think it's there. I will give it another try with your suggestions. (In the meantime I also tried LSTM just need some time to put it in a video). Thanks a lot for sharing your thoughts.
@user-fd5tw9hp1u
@user-fd5tw9hp1u 2 жыл бұрын
Awesome!I like it!Where get you from?That's a lovely accent you have.I understood everything
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for your nice comment! As to where I am from ... That comrade is a mystery 🙂
@sandipansarkar9211
@sandipansarkar9211 Жыл бұрын
finished watching
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
I hope it was worth it :)
@leamon9024
@leamon9024 2 жыл бұрын
Awesome! Thanks for sharing. Would you consider making a video that uses convolutional neural network which converts all the technical analysis charts to images to predict stock market?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi, I have thought about it only it's too little data for CNN training and testing even if you take the whole historical data that is available I personally don't believe the results will be impressive but I might be wrong.
@wingsoftechnology5302
@wingsoftechnology5302 2 жыл бұрын
@@CodeTradingCafe I was also thinking about this... CNN
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
@@wingsoftechnology5302 yes well ML is still not suitable for these applications yet
@JuanRamirez-di9bl
@JuanRamirez-di9bl Жыл бұрын
You could use a recurrence plot for time series analysis
@niklasfliegel7737
@niklasfliegel7737 Ай бұрын
You really should use optuna for hyperparameter tuning
@CodeTradingCafe
@CodeTradingCafe Ай бұрын
Hi, I wasn't aware of it I will check it out! Thank you for sharing.
@wayne7936
@wayne7936 7 ай бұрын
Solid work! Nice to see the results change as the complexity of the model increased. What's the most complex model that you've tried? Anything with multiple CNN layers?
@CodeTradingCafe
@CodeTradingCafe 7 ай бұрын
Hi thank you for your comment. I tried LSTM and other deep neural nets in the past but the results were not as appealing.
@samdm01
@samdm01 6 ай бұрын
@@CodeTradingCafe I tried all sorts of deep learning too, CNN, LSTM included. Results were not great. This video is actually very helpful, will test my changed model ASAP.
@jaipalv562
@jaipalv562 2 жыл бұрын
Thanks for sharing..can you please make a video selecting option strikes using reinforcement model
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi, thank you, I am not familiar with option strike price strategies.
@softiceable
@softiceable Жыл бұрын
if you have a code that can predict the trend, what stops you from choosing the ATM strikes? Or if you want a little less volatile strike, go 2 or 3 OTM strike.
@TheAnonymus2011
@TheAnonymus2011 3 ай бұрын
Hi, as I have seen in different researches, combining the LSTM model with CNN makes the accuracy better and outperforms other models as well. May you plan creating video on CNN as well?
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Thanks for the info! it's actually a lot of work, labeling the data for CNN, I don't think I will take this option for now.
@PaMark
@PaMark 2 жыл бұрын
first of all great video! im novice but curious in ML capabilities and tradig, anyway could be a stupid question ...why use only positive numbers in features and one of the them be also a categorical signal using a category classifier.? the whole universe of features numbers are +ve ...maybe -ve numbers for -ve results could impove the model? thanks
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi thank you, it's not a stupid question at all, but in this case for this particular example it doesn't make any difference. But you are right data should be normalized first becomes easier for the model to fit.
@rverm1000
@rverm1000 Жыл бұрын
ive been checking this book out. Machine Learning with Python for Everyone by addison wesley. dont know if will help . from what i gather in the preface it is a very hands on and practical book.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
It's a nice book, hands on but also lots of explanation, don't expect all the math behind the models though it would be a lot to cover. Another one I like is Hands on machine learning with scikit learn and keras.
@larrygranda6447
@larrygranda6447 2 жыл бұрын
There’s also pluto hq? They support crypto algotrading among other trades. Incredible for non programmers. Plus free trading esports.
@kuperok100
@kuperok100 Жыл бұрын
for direction forecasting dataset must be lagged such as forecasting one day direction for tomorrow - target 1/0 and features for today or more days early!
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hey thank you, I think there's no need in this case because we're trying to forecast future data with today's, so it's the same as lagging the data as you described. Unless I misunderstood something.
@qwertasd7
@qwertasd7 Жыл бұрын
are you fammiliar with Gecko trading, there all the trade formula's (inputs) are in nodejs opensource
@ShimoriUta77
@ShimoriUta77 5 ай бұрын
You may be having a thing called Gradient Descente due to ReLU. Try switching to ELU.
@CodeTradingCafe
@CodeTradingCafe 5 ай бұрын
Hi, thank you, did you mean gradient divergence? I will try testing neural nets again considering your comment (and some others).
@ShimoriUta77
@ShimoriUta77 5 ай бұрын
Sorry for the typo, hahahahaha English is not my first language
@ShimoriUta77
@ShimoriUta77 5 ай бұрын
ReLU often leads to two problems, Vanishing or Exploding gradients. Most likely yours are vanishing ;-;
@JuanRamirez-di9bl
@JuanRamirez-di9bl Жыл бұрын
Hi! Have you checked the Neuro Evolution of Augmenting Topologies? NEAT? I think the ES HyperNEAT, evolves the nodes, weights, connections on its own.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hey, interesting wasn't aware of NEAT although it rings a bell someone might have mentioned it previously. I will check if it can be tested for our trading challenge.
@JuanRamirez-di9bl
@JuanRamirez-di9bl Жыл бұрын
@@CodeTradingCafe That would be awesome! I've been toying with it for a while now, and it seems to have a lot of potential, the only issue I've found is the speed as I haven't been able to get a python implementation working on with my gpu, the fastest implementation I've seen is SharpNEAT, written in C#... but I'm too green on C# so haven't touched it. As an intro, there is NEAT, HyperNEAT and ES-HyperNEAT, each work on top of each other with different added features, I think the last one would be the most appropriate for the problem, that is the one I'm toying with right now. Anyways amazing channel! Learning a lot!
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
@@JuanRamirez-di9bl Thanks a lot for the description I will have to spend some time on the documentation to understand how it works and the other advantages. Definitely something on my to do list.
@feysalmustak9604
@feysalmustak9604 9 ай бұрын
How would the result look like with a LLM, for example with LLAMA 2. It would be cool to see how you use a model from hugging face.
@CodeTradingCafe
@CodeTradingCafe 9 ай бұрын
Hi, I agree LLMs can be a good investment now, but it's always the problem of finding clean and good data to fine tune the model so it works as intended.
@qwertasd7
@qwertasd7 Жыл бұрын
Hmm updated and analyzed your code,, combined it with yahoofinance data, it seems, you compare two trading strategies, SMA and candlesticks logic, I dont think the later counts as a Target. The key idea behind trading is to find max profit, if all you want to do is candlesticks then do so, no need for neural net evaluation.. Though interesting code, just might need some more fixing... and a better Target construct maybe in the form of profit or so.. just saying, need to study it a bit more. I never used skylearn, curious how it handles normalization, here.. i'm working on a tensor flow trader..
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Tensorflow is good as well, lots of work for a good target variable
@tryh4rd666
@tryh4rd666 3 ай бұрын
I though algorithmic trading only deals with script/programs to automate strategies. The development of strategies is in the helm of quants, no?
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
True, we're kind of a grey zone on this channel overlapping between development, testing and deployment, in reality big firms hire different people for these different tasks, and yes Quants are the brain behind with lots of pressure though.
@PaMark
@PaMark 2 жыл бұрын
also the size of the value of the RSI is greater than the values of the other features and maybe this affects the model. what if u normalize all the feature matrix?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Normalizing is good I forgot about it because I took the code used in the previous video using xgboost where the model normalizes data automatically, got lazy on this, I will try it out and if I see any difference I will mention it here. Thanks for pointing this out
@PaMark
@PaMark 2 жыл бұрын
@@CodeTradingCafe thanks for the reply looking forward for the updated result...maybe a video demo if things are impoving...
@johntsioumpris858
@johntsioumpris858 Жыл бұрын
Hello, your videos are very interesting but I do have a couple questions. 1st ...to your knowledge is this the common way the trading bots are working ? ...you gather trading signals , probably you do some feature engineering and you train models to see what accuracy you get ? 2nd do you share the .csv(s), it would be interesting to see what what manipulation could help the accuracy. Not a question ...but it's quite strange that a model of 40% accuracy is enough, in my tests with sport betting I could reach around 60% but this was not enough, you need at least a steady 66.67% testing accuracy to have a profitable model (at least for the sports as I mentioned)
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hey, thank you for your comment. This is something we could discuss for hours, I will try to be very brief. for trading 40% accuracy can make wonders if it's a stable result, because you need to couple this with your trade management, for example if your risk reward ratio is 1:2 then any accuracy above 34% is a winner. I am not sure how it works in sport betting but there must be a way to translate this risk reward ratio idea too. I usually share the csv file, I probably didn't on this one because it might have been share in previous videos (but this is no excuse for my laziness I agree). Good luck! if you have any questions don't hesitate, now you got me curious about sport betting!
@johntsioumpris858
@johntsioumpris858 Жыл бұрын
@@CodeTradingCafe Well from my understanding sports betting is way harder since there are no useful indicators,I will try your code and see what I can get...I am still a bit confused regarding the strategy part but 1st I'll try and then we could talk. Cheers from Greece.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Good luck!
@Seyil_Meyil
@Seyil_Meyil 10 ай бұрын
@@johntsioumpris858 did you try the code?
@freddiegonzalez245
@freddiegonzalez245 Жыл бұрын
Hi are you able to create software that can open trades on thinkorswim based on a strategy on the chart?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
You have to check their documentation if they offer an API for python trading, probably mentioned on their website.
@BoHorror
@BoHorror 6 ай бұрын
Another question, if you had 2 decisions buy or sell and the accuracy still turned out so bad. Why not just flip it and take bets against the model and see what happens?
@CodeTradingCafe
@CodeTradingCafe 6 ай бұрын
It also doesn't work because a large part of trading results is affected by the trade management and not the indicator (I've already tried it and the strategy still didn't work, indicators are only the tip of the iceberg).
@souradeepdas8195
@souradeepdas8195 Жыл бұрын
You are doing this little wrong. To predict correctly you need to use only tick value for every second for min 5 years. Then change the hidden_layer_sizes use 10 layers=(100,100,100,200,200,200,400,400,400,800). I am using gpu mining rig 3070 ti x8 running 10 days continue, to predict. The accuracy is 70% in uptrend and 72% in downtrend. You can also implement moving average to make it little more accurate. But then you will need gpu. ^2= 64 3070 ti for 10 days with my case.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you for sharing your experience, now I am curious with that many layer (10 layers) how far are we from overfitting the model?
@souradeepdas8195
@souradeepdas8195 Жыл бұрын
@@CodeTradingCafe Let understand with an example: In the Indian market, trading hours begin at 9:15 am and continue until 3:15 pm. If we want to make comparisons, we need to analyze the data from Monday, specifically from 9 am to 10 am, and compare it with the corresponding time frame of the following week, Monday from 9 am to 10 am. It is important to note that each hour in the market behaves differently, and the sensitivity of the market can vary based on the day. Various factors such as the opening of world markets, the declaration of share results, price action, and expiry days of options have specific times that impact market dynamics. To make accurate predictions, it is indeed beneficial to utilize a large dataset and compare it on an hourly and daily basis. This approach helps prevent overfitting in machine learning models. By incorporating a substantial amount of data, the model can capture more patterns and trends, leading to more reliable predictions. Additionally, when working with larger datasets, it may be necessary to use more complex models with a higher number of neurons. Neurons are the basic building blocks of neural networks, and increasing their quantity allows the model to handle larger and more intricate datasets effectively.
@dominiquedunlap9223
@dominiquedunlap9223 7 ай бұрын
How are you able to verify that you are getting 70%+ in both uptrend and downtrend?
@giol.8220
@giol.8220 Жыл бұрын
The model found the easiest sweet spot, a local optimum by setting it's inner weights to optimize for the dominating feature. That's just the starting point. Now it's your work to help the model to find out of that local optimum. And that's not happening due to your bad choice to not normalize. See for example CNNs normalizing all rgb values also. Second your labels:they are not independant. It's not like a picture of a human, a bird, a fish. It's statistical data, so maybe like written before for example 0.1, 0.5 and 0.9. Or maybe from - 0.9 to +0.9, but wouldn't work with relu. Maybe you can optimize that already before to show different strengths of the signal and quantize it, not in clear categories?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you for sharing. The indicators are already normalised between limits (0,1) do you think this still needs normalisation ? If yes then I am afraid it's already altering the real data because normalisation will different from one feature to another due to different ranges therefore their relative ratios will be changed. Later I made other videos trying to predict 2 categories only it still didn't show any signs of correctness. NN are generally useful for particular types of problems, this might not be the best example though. Will think about it maybe it can be improved.
@nodakhunter
@nodakhunter 7 ай бұрын
Why not use different time frames with standard deviation to indicate reversal points?
@CodeTradingCafe
@CodeTradingCafe 7 ай бұрын
It's a good point but independent from neural nets I guess, it should be a good indicator with any algorithm (bollinger bands style). Not sure if I understood your comment correctly but I think bollinger bands are the closest to your porposition.
@hackmedia7755
@hackmedia7755 Жыл бұрын
you have any fully working bots that trade with brokers? I'd like to just modify one with my own strategy. I have some template code working for Etrade so far.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi check this example it trades live but it's a simple strategy nothing fancy you can modify it kzbin.info/www/bejne/jZTJfJSQgZmppqM
@Mangeurdemouton
@Mangeurdemouton Жыл бұрын
The only thing that I'm trying to understand is what to put in the hidden layer besides candle sticks price from past data. If I have a Moving Average and its crossing above the candle, it would be a bullish sign, but we all understand that its not 100% bullish sometimes it can be false signal because its a lagging indicator. Im thinking that having candle stick above MA will give weight the a node in the hidden layer, but not enough weight to make it a perfect Buy entry 1:1 any idea how to solve that?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
That's a good thinking, you might want to precompute some indicators as you mentioned and feed those to the neural net, for example your MA crossing the candle is one of many signals, the way you could approach this is to build a number of these "lagging" indicators and feed those to the network that will provide an overall result considering all of the input indicators. This result signal is definitely NOT fault proof but I am curious as how it compares to the original input indicators that we started with.
@pixtane7427
@pixtane7427 2 жыл бұрын
Hi, you used svg file from 2003 to 2020 but where can I download it? I didn't find such files and you don't have it in description
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi thank you for your comment, either dukascopy or yfinance, if you want something quick check any of my recent videos I am sharing the data in the description now. Good luck.
@bkalkuz
@bkalkuz 2 жыл бұрын
actually i m wondering can computer vision be trained to learn and recognize bullish/bearish trends and trend reversals?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Theoretically yes, but with daily candles it's not enough data, and with lower time frames like hourly or 30 min candles data becomes very noisy, I call this the curse of not enough clean data 🙂
@ilhamsetiawan3050
@ilhamsetiawan3050 2 жыл бұрын
@@CodeTradingCafe how much for enough data?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
@@ilhamsetiawan3050 hard to guess, should try first to get a good estimate.
@ilhamsetiawan3050
@ilhamsetiawan3050 2 жыл бұрын
@@CodeTradingCafe 10 year daily data is not enough?
@_OmVaghela
@_OmVaghela 2 ай бұрын
Are you giving it candle data for predictions?
@CodeTradingCafe
@CodeTradingCafe 2 ай бұрын
Hi, not the candles values, but relative values instead, like slopes of moving averages, alignment of indicators, RSI values... the price itself is not related to its future trend.
@tunderstormax
@tunderstormax 2 жыл бұрын
Do you think C++ could compute some of the heavy math crunching numbers quicker?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi, yes I believe C++ can be faster however you might have to manage resources manually when code in c++ so it comes with a price. Usually you try it in Python if you're sure it works you translate to c++ for efficiency... But don't listen to me I always advocate c++
@user-qq2kd7ey7j
@user-qq2kd7ey7j Жыл бұрын
How do you convert the price value to the value of the input neuron from 0 to 1??
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi we can use a scaler function it can be minmax scaler or a standard scaler
@BoHorror
@BoHorror Жыл бұрын
Would adding OHLC data to the inputs lead to overfitting for the neural network?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Absolute values are not relevant for predictions, I mean you can't guess the future trend just from the absolute value of the price. It's better to use relative values such as moving average slopes and others
@lineage13
@lineage13 Жыл бұрын
Closest thing that sort of worked was an image classification model with tensorflow of 1+million charts in multi time frames.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thanks! It's good to know, there is also a challenge there how many candles you provide in an input image... one day I will have time for this
@lineage13
@lineage13 Жыл бұрын
@@CodeTradingCafe The variations or input images that may or may not work is infinite, but as to one that worked with a precision greater than 60%. None really.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
@@lineage13 yes it's an endless loop when you also think if indicators can be added on the images as well... Thanks a lot for sharing it's good to know.
@LordYura50595
@LordYura50595 Жыл бұрын
Hi, nice try! I have two remark to your neural network. 1. Your data set is skewed. Your classes should have almost same count of samples. That's why your classifier predict only one class. You can delete some samples from bigger classes to equaling their sizes. Or you can use some of upsampling techniques. 2.Also your network are overfitted. You can noticed that your train metrics and test metrics are very different. To solve this problem you can use less count of training epochs or add some dropout layers to NN. Also you can use some regularization methods. Good luck next time
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you for sharing, I will add some push back for viewers reading here: 1. the "skew" in this case is negligible between the up and down trend categories (check video at minute 7:00) the distribution shows almost the same counts, the difference is only present with the 0 or No trend category which is not of interest for us. Moreover, applying down-sampling on time series type of data might be an additional problem, it's definitely NOT a solution in this case, it's better to change the arguments of mytarget() function to find a compromise in the counts. 2. Yes NN are overfitting it's also seen when the model converges into a single category solution, I agree that regularization, drop out ... would solve the overfit (but it will not improve predictions looking at the current numbers). PS: for people interested in trying any type of ML for forecasting, if the features don't hold any "signal" or "valuable" information to allow for a correct/accurate forecast no matter the model... it's going to fail. In other words if the data doesn't carry the info the model will not find any valuable predictions.
@MarlonMuthiani
@MarlonMuthiani 2 жыл бұрын
Have you tried to use neat!?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi, not yet, not sure it's worth it, usually these tasks are time consuming and sometimes results are not up to the expectations
@MarlonMuthiani
@MarlonMuthiani 2 жыл бұрын
Awesome thank you for the reply i was thinking of patching it in as an option to my workspace .
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
@@MarlonMuthiani good luck to you
@HarpreetSingh-ps9rx
@HarpreetSingh-ps9rx Жыл бұрын
Hi do you have formal training courses would love to join
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, I had that in mind unfortunately life had different plans 🙂 I am still willing to build a course (because I enjoy it) hopefully I will manage by this year.
@HarpreetSingh-ps9rx
@HarpreetSingh-ps9rx Жыл бұрын
@@CodeTradingCafe Thanks please keep me updated
@DeepFrydTurd
@DeepFrydTurd Жыл бұрын
😀
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Keep smiling 🙂
@loteronloteron3410
@loteronloteron3410 2 жыл бұрын
its history ho create real time bot create desicion?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Sorry I am not sure I understand
@marcelocanetta1892
@marcelocanetta1892 Жыл бұрын
Hi. How i can download EURUSD file? Regards!
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi I usually use yfinance or dukascopy to get data these are for free. I also shared some data files on other videos but honestly I forgot which ones.
@loteronloteron3410
@loteronloteron3410 2 жыл бұрын
KeyError: "['signalcategory_1', 'signalcategory_2'] not in index"
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
You have to run one hot encoding first to create these features
@xuushuur
@xuushuur Жыл бұрын
i think you leaked future value. In this row : value1 = open[line+1] - low[line+i]
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you, did you mean the line in the target function? If yes it's not a leak because this is the target value it carries the future information on which we train the model and we test our predictions, please reverify and let me know what you think (future leaks are scariest nightmares 🙂)
@mw7185
@mw7185 10 ай бұрын
Send me the URL for the previous Video
@CodeTradingCafe
@CodeTradingCafe 10 ай бұрын
I am not sure which one is the previous to be honest, it has been a while. This link might be helpful kzbin.info/www/bejne/nqHJgnhml7mYd5Y
@mw7185
@mw7185 10 ай бұрын
@@CodeTradingCafe man are you telling me you don’t have a copy of that video. I checked your KZbin site and I couldn’t find the old video
@dfcastro
@dfcastro Жыл бұрын
Now one question: How do we make it do real tardes with real money?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hey Daniel, for this particular one don't use for real trading, there are other strategies here (check my vwap and Bollinger videos) that work better. Also I never let the algo do a trade automatically, I get the algo to send me an email notification and I decide if the trade should be executed. That being said, if you want to automate you have to use your broker's python API, I used oanda in the last it worked fine, binance also have an API these are broker specific. Good luck!
@dfcastro
@dfcastro Жыл бұрын
@@CodeTradingCafe thanks for the reply. I am considering some options and oanda is among them. Do you have a video explaining how to integrate with the API? If you allow me one suggestion (a little elaborated I might add) - you could think about the strategies you explain and implements as plugins; - the plugin will have a common interface with a common method that is responsible for supplying the signal to the consumer of that signal; - using that approach if you keep the interface common among the many possible strategies you would only have to switch between the plugins if you wanna change from one strategy or other. - the consumer would be the one to integrate with the API of oanda for instance.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you for sharing, plugins idea is good ideally I would do it using classes in python but then the code will be less accessible for some viewers. I did an old video using oanda, quality is not good it's one of my early vids but the info is there kzbin.info/www/bejne/m2K4pWd_ltVkZq8
@sibiljas3628
@sibiljas3628 2 жыл бұрын
plesae add translate.thanks
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hello, in English?
@sibiljas3628
@sibiljas3628 2 жыл бұрын
@@CodeTradingCafe yes
@bosypuspus
@bosypuspus 2 жыл бұрын
I have written my comments 3 times here and they keep disappearing?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi, yes I got notifications but couldn't read those, did they contain any links? Sometimes KZbin erases these automatically to avoid spam
@bosypuspus
@bosypuspus 2 жыл бұрын
@@CodeTradingCafe one of them contained a link, damn youtube. I will try reposting later or send you an email
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Sorry about this, don't worry we have time
@bosypuspus
@bosypuspus 2 жыл бұрын
@@CodeTradingCafe I sent you an email
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
@@bosypuspus Hi thank you I saw it, I must admit I am not familiar with Azure at this point, but sounds interesting to try automated Machine learning solutions
@giwrgoslos9343
@giwrgoslos9343 2 ай бұрын
is anyone making money from trading bot ?
@CodeTradingCafe
@CodeTradingCafe 2 ай бұрын
Short answer YES, you can also ask, is it a lot of money? answer is it depends how much you put on the table, but it's around 8-20 % per year... not as much :)
@reallife-yy9vj
@reallife-yy9vj Жыл бұрын
Could I pay you to build me a neural networks trading? And if so how could you be reached?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you for your comment, honestly at the moment I am not taking additional projects, time is an issue. Try to go through some of my videos you can download the codes and modify them slightly, hopefully this will be of help.
@thechoosen4240
@thechoosen4240 9 ай бұрын
Good job bro, JESUS IS COMING BACK VERY SOON; WATCH AND PREPARE
@CodeTradingCafe
@CodeTradingCafe 9 ай бұрын
thank you for your support.
@rverm1000
@rverm1000 Жыл бұрын
i bought this book becuase i tested some of these illustrated models in the book at the bookstore and came out the same as predicted in the book. Hands-on Machine Learning with Scikit-Learn,Keras & TensorFlow. oreilly 2nd edition
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
This is an excellent book straight to the point if you want to learn practical examples. If you want to Know the math behind models it might not be the best option, so you can complete it with different ressources. Good luck!
@softiceable
@softiceable Жыл бұрын
hey which book you are talking about?
@rverm1000
@rverm1000 Жыл бұрын
@@softiceable I think it's a introduction to scimitar learn
@softiceable
@softiceable Жыл бұрын
@@rverm1000 did you mean scikit learn?
@thebestaxie6439
@thebestaxie6439 Жыл бұрын
I got this error: FileNotFoundError "EURUSD_Candlestick_1_D_ASK_05.05.2003-30.06.2021.csv"
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi you need to have the data file within the same folder
@setyonugroho3659
@setyonugroho3659 Жыл бұрын
Pls send me csv file👇 EURUSD_Candlestick_1_D_ASK_05.05.2003-30.06.2021.csv
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hey, it has been a while since I uploaded this video, you can find a crypto data file in the description of this video kzbin.info/www/bejne/haO4p5qfr7-XpZo also if you need only Forex data you can download from Dukascopy.
Technical Indicators Comparison Using Machine Learning In Python
14:42
LSTM Top Mistake In Price Movement Predictions For Trading
9:48
CodeTrading
Рет қаралды 77 М.
The joker's house has been invaded by a pseudo-human#joker #shorts
00:39
Untitled Joker
Рет қаралды 11 МЛН
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 55 МЛН
The Problem with Wind Energy
16:47
Real Engineering
Рет қаралды 421 М.
I Built A Crypto Trading Bot And Gave It $1000 To Trade!
10:25
Hallden
Рет қаралды 1,2 МЛН
How To Win The Powerball With This Simple Python Script
13:37
Cody Engel
Рет қаралды 32 М.
I Built a Trading Bot with ChatGPT
18:33
Siraj Raval
Рет қаралды 1,8 МЛН
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 793 М.
Financial Machine Learning - A Practitioner’s Perspective by Dr. Ernest Chan
57:32
Watching Neural Networks Learn
25:28
Emergent Garden
Рет қаралды 1,2 МЛН
The joker's house has been invaded by a pseudo-human#joker #shorts
00:39
Untitled Joker
Рет қаралды 11 МЛН