No video

Algorithmic Trading Strategy Using Python

  Рет қаралды 430,864

Computer Science

Computer Science

Күн бұрын

Пікірлер: 394
@brandongonzalez5838
@brandongonzalez5838 3 жыл бұрын
I've been studying Python for a couple months now but today was the first time that I realized I could actually read the language. Thank you so much for making this video!!
@KrekreDoBusao
@KrekreDoBusao 3 жыл бұрын
I spent the first 20 minutes looking forward to see the error due to the lower case 's'. I'm so relieved now.
@kungfumachinist
@kungfumachinist 3 жыл бұрын
And then I'm like, "he didn't reset the flag!".
@rukminiraj1264
@rukminiraj1264 4 жыл бұрын
This is the only KZbin video on algo trading which I found usefull.I respect your work and found your content very useful.It will be very usefull if u do a more deep video on this topic and on Reinforcement learning Thank you, And once again Respect your work❤
@Alvaroeduardo
@Alvaroeduardo 4 жыл бұрын
Don´t waste time, moving average strategies only work some of the time in some uptrend markets. People used to trade this in the 90´s. You could try with a combination of vwap, volume and ema, just please don´t waste your time with oscillators. Good video.
@trevorweir
@trevorweir 4 жыл бұрын
Alvaroeduardo you’re speaking from a position of experience. These moving averages are a good place to start for a beginner and by the way, on many non-volatile stocks you can eyeball 👁 the charts and see that they work. On many stocks, these longer periods only give a few buy sell signals in 6-7 years so it doesn’t take a genius to look at historical data in order to see that they generally work. And by the way, over longer periods of time, the market tends to uptrend anyway ( which was your comment, right )
@npip99
@npip99 4 жыл бұрын
It's just an example, to find real arbitrage you'd need something complex enough that someone else wouldn't have reasonably discovered it before you, but it's a good example for teaching the concept.
@Alvaroeduardo
@Alvaroeduardo 4 жыл бұрын
@@trevorweir yeah that´s exactly how my coder pal and I thought 12 years ago when we tried exactly the same thing, that lasted a few days haha
@gabkov
@gabkov 4 жыл бұрын
@@Alvaroeduardo are you still actively doing algo trading?
@mbxoriginals7175
@mbxoriginals7175 4 жыл бұрын
100% true
@JacobHKent
@JacobHKent 3 жыл бұрын
when it comes to trading in the various financial markets the relevance of professional guidance should not be undervalued as it could be the key to any traders success in profit making.
@bensonmccredden7102
@bensonmccredden7102 3 жыл бұрын
spot on! but the usual problem is discovering well grounded professionals who can be trusted. have you got any reconmendations?
@benitaalvarez1524
@benitaalvarez1524 3 жыл бұрын
i could not have said it any better.
@JacobHKent
@JacobHKent 3 жыл бұрын
@@bensonmccredden7102 i will highly reconmend Michael Branagh, he helped me secure a passive source of income, made life quiet easier for me as i no longer had to work round the clock. i'd check if he's taking new investors now, and also ask if i can share his contact information to the public.
@bensonmccredden7102
@bensonmccredden7102 3 жыл бұрын
@@JacobHKent i have stumbled upon a couple of articles by him, never occured to me to look him up. i would sincerely appreciated if you coild help with his contact info.
@rolienwitvos1694
@rolienwitvos1694 3 жыл бұрын
@@JacobHKent Mr Branagh is one of the most productive traders out there. i would not say hes the best at what he does but one thing is certain, hes a man of integrity and he certaainly gets results
@evanakey7872
@evanakey7872 4 жыл бұрын
Dude I have been searching for this exact thing for weeks... thank you SO much!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thanks for watching the video and the nice comment Evan !
@RenatoSmileS
@RenatoSmileS 4 жыл бұрын
hey man, I'm from Brazil and just to thank you for this video! I was afraid that this video was going to be very hard to understand (because of the language) but you explain in a simple way, it's not complicated an well explained at the same time!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thank you very much! I hope these videos help others, so it's great getting comments like yours.
@henriquespencer2217
@henriquespencer2217 4 жыл бұрын
Brbrbr
@Maconhaepaz
@Maconhaepaz 4 жыл бұрын
brbr
@Ranteray
@Ranteray 3 жыл бұрын
I agree.. ta de boas entender kkk
@kelvinstones979
@kelvinstones979 3 жыл бұрын
thechinahacks helped me financially .THanks to this platform i was able to pay off my debts
@Maximus18.6
@Maximus18.6 9 ай бұрын
This video is the best that I have watched during this time learning programming. You did an amasing job and do not say you take extra code to create the program. Remember that the majority of people watching your video are learners. Thank you so much for your contribution. God bless you
@theta45stockanalytics16
@theta45stockanalytics16 4 жыл бұрын
Was thinking about implementing this is my own project. But I don’t think MA’s are useful and your graphs showed that. Good video. You saved me a lot of time.
@trevorweir
@trevorweir 4 жыл бұрын
MA's are massively useful, my friend. The problem is the 100 days, ha ha. If you watch other traders, they are using much, much shorter time periods, but that is for you to figure out. He gave us very, very good information here, but dont expect him to give you absolutely everything. That would be like giving away free money. Everything takes a little more investigation, my friend. And you may need 1 or 2 more indicators juxtaposed on top of these two. Good luck.
@claytonyoung1351
@claytonyoung1351 Жыл бұрын
@@trevorweir ema's only. Ma's are not.
@tarabas88naoh
@tarabas88naoh 3 жыл бұрын
Your video is the best coz u show that u build it from scratch and when face with error, u solve them in front of us.. appreciate it a lot on behalf of new python beginner
@browning50cal
@browning50cal 4 жыл бұрын
Since AAPL only goes up over time (Don't argue. 1. Buybacks, 2. any other reason. it's a fact.) Begin accumulation of a postion by 1/8 of a postion each day the stock is below the red arrow signal, and hold that position until you sell out of 1/8 of the total position each week the stock is above a green arrow signal and price is 10% higher than your last sale price. I would like to see the code on that. SMA Crossover does not work in real life, but programming an algo to trade like a human with no emotion certainly does. Thanks for your time uploading this. I did enjoy the python aspect of it.
@zshn
@zshn 4 жыл бұрын
Remember the longer your moving average, the later you are to enter/exit the trade. Moving average crossover & crossunder strategies don't work anymore. But great video on showing how to create a strategy.
@Holy0poop
@Holy0poop 2 жыл бұрын
Wow I love how you explain everything from start and comment it in so we can read each cell as you go along
@piergiorgiocala6453
@piergiorgiocala6453 2 жыл бұрын
GREAT START. This is my first Pyton software and all run ok Now I try to check other database and go on with the next step. Thanks a lot ✌
@sweettttttttt77
@sweettttttttt77 2 жыл бұрын
A straightforward, and understandable explanation. Thank you so much.
@noname89636
@noname89636 2 жыл бұрын
This is a very well constructed walk-through video. I learned a lot about logic and variable environment. Liked and saved!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 2 жыл бұрын
That's amazing! Keep up the learning! Thank you for watching!
@kizhissery
@kizhissery 3 жыл бұрын
I think you should use ema 50 and ema 200, one of the best explation,keep it bro
@filthystonks3527
@filthystonks3527 3 жыл бұрын
just finished following along and building this Bot and it works great!!!!! Love the content and the hard work!!!! would love to see more videos in the future on how to implement different strategies, maybe we can build a bot that works well for scalping and intraday traders next???
@MrKing98100
@MrKing98100 4 жыл бұрын
This video was great ! I’m learning python for some time and also trade myself. Learning to code for finances is what I want to keep on learning. This video helped. Need to familiarize myself more with pandas and numpy but from what I saw, most of it made intuitive sense to me. Thanks!
@137gatocholo
@137gatocholo 4 жыл бұрын
I am new to ALL of this stuff. I really learned a lot from you, thanks!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thank you for watching, I am glad it was helpful!
@juinsong7949
@juinsong7949 3 жыл бұрын
This is the only useful video that I found on KZbin. Thanks for sharing!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 3 жыл бұрын
Thank you!
@FireFly969
@FireFly969 2 жыл бұрын
For 1 day interval I think it's Better to just hold the asset But for other intervals like 1min 5min 15min 1hour it will be good and more profitable with good stoploss and analysing the data more to get the best strategy for this Thank you
@LydiaScherr
@LydiaScherr 3 жыл бұрын
All in all, really good work. It would be nice if the program could use live data and ping your phone with notifications when to trade. So far this is more like backtesting a strategy.
@stevensamuel4634
@stevensamuel4634 4 жыл бұрын
Thanks for uploading this content man. Super educational!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thank you Steven !
@pollyolly851
@pollyolly851 3 жыл бұрын
Now Im starting to understand how to read graph in stock market. Thanks man.!
@jorge1869
@jorge1869 2 жыл бұрын
The rolling () function is just amazing and useful.
@shethkaushal
@shethkaushal 4 жыл бұрын
this is an educational video on programming, not on trading...if anyone thinks trading can be done like in this video you would have more millionaires than python programmers...so as an entrepreneur who has build technology and trading company...this video is good but for programming concepts...making real money in markets will take at least 3-5 years...
@Arkantosi
@Arkantosi 4 ай бұрын
You should have shown us the returns following this strategy vs the returns for by and hold from start, would have been interesting to see.
@accountantguy2
@accountantguy2 4 жыл бұрын
Terrible trading strategy, but great video for learning Python! I liked that you typed everything live and left in the mistakes.
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thanks, for this very nice comment !
@guifeliper
@guifeliper 3 жыл бұрын
Where exactly I can find the CSV?
@emreturan8095
@emreturan8095 4 жыл бұрын
This was super informative!! THANK YOU!!is there a part 2 of this tutorial?
@AydinCGur
@AydinCGur 4 жыл бұрын
Great tutorial, thank you. And welcome to realities of trading. Losses are an unavoidable part of this game. Just keep them small. Many have perished trying to find the holy grail. You'll never develop a strategy that tells you to buy and sell at optimal prices with a very high win rate. As long as you're profitable overall, pull the trigger with conviction.
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thanks, and that is some good advice.
@RS-jh2kl
@RS-jh2kl 4 жыл бұрын
@@ComputerSciencecompsci112358 implement a stop loss order with certain parameters to hedge your and limit your loss.
@douglasbright8957
@douglasbright8957 4 жыл бұрын
R S do you mind elaborating on this a bit? I think i know what you mean but I want to make sure before i try it
@sonik88
@sonik88 3 жыл бұрын
I normally don't do this and although I enjoyed the overall scope of the video and the strategy, I think there are a couple of issues here. The flag implementation is so bad. -Better use 2 separate Boolean flags (True/False), like flagBuy and FlagSell -The function is good to understand the way the strategy is implemented, but for loops in large datasets will become so slow. Better check the difference of SMA100 and SMA30 and create a signal when the sign of this difference is changing. This can be done easily with Pandas operations that ensure the best code performance possible within Python (C based engine).
@filipegodinho7704
@filipegodinho7704 4 жыл бұрын
WOW. Could you please keep videos like these coming? no need for complex strategies but just to see how you are going to code it makes it way easier for alot of us.
@HD-eu7ji
@HD-eu7ji 3 жыл бұрын
Thank you very much for sharing your ideas, very well explained is a basis for our projects. Thank you here from Brazil
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 3 жыл бұрын
Thanks for watching!
@ziyapihuworlds4009
@ziyapihuworlds4009 4 жыл бұрын
Hi I am from India. Thank you for sharing your valuable video.
@claytonyoung1351
@claytonyoung1351 Жыл бұрын
Should be using EMA's. 9, 50, and 200. Combine rsi6, macd and mfi for confirmation.
@aroaris843
@aroaris843 4 жыл бұрын
Great video!! So in depth yet refreshing
@ObamaBinLatte
@ObamaBinLatte 4 жыл бұрын
THank you so much!! This is the headstart i have been looking for such a long time~
@jimcollins6619
@jimcollins6619 3 жыл бұрын
The indicator for this is called MACD (Moving Average Convergence Divergence) just FYI. ta-lib has it built in.
@EinarEmerson
@EinarEmerson 4 жыл бұрын
Wow! Gracias por el video, lo haces ver sencillo. Saludos desde Colombia. Muchas gracias nuevamente!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Muchos gracias !
@onemorevideo7928
@onemorevideo7928 3 жыл бұрын
Great video- Code is perfect. Can I ask where can we download the stock data file. In ur example you use the APPL.csv . May I ask where can we download price history of a share
@user-kf7pp1qh3x
@user-kf7pp1qh3x 2 жыл бұрын
idk where i can find or download 'apple.csv'
@vedantshirodkar
@vedantshirodkar 4 жыл бұрын
May someone recognises your talent and hire you for a high paid job. You deserve it
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Wow, thank you very much !
@abhinavtyagi1657
@abhinavtyagi1657 4 жыл бұрын
@@ComputerSciencecompsci112358 But how can we use this to trade in present or future ?
@neerajjagwani4567
@neerajjagwani4567 4 жыл бұрын
This is beautiful! You're awesome for sharing this! Thanks you :)
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thank you !!
@poom40
@poom40 4 жыл бұрын
You should use MACD crossing strategy , I think it would be more profitable.
@ordaflo
@ordaflo 4 жыл бұрын
woah woah slow down, I need to write this down
@steveejoel3248
@steveejoel3248 3 жыл бұрын
man i had to Subscribe i like your explanations i connect with it so much cheers!
@Timjstewart
@Timjstewart 6 ай бұрын
Thanks for a very informative and hands on video!
@alexanderwalter4595
@alexanderwalter4595 3 жыл бұрын
Where can you download real-time or 15 minute delayed data for stocks?
@cottondai
@cottondai 4 жыл бұрын
Thank you for the lesson. Greatly appreciated.
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thanks for watching!
@billsgp7744
@billsgp7744 4 жыл бұрын
this is a good start to get familiar with a possible approach ...
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thanks !
@user-wb1qy2pp2p
@user-wb1qy2pp2p 3 жыл бұрын
Nice and informative Video. Keep it up! PS: Keep working on your code refactoring for cleaner and simpler code but already doing a good job there
@inarisound
@inarisound 4 жыл бұрын
needs more work. If you play blue-cap stock and just hold it over that period of time you would've made more money then the result of this strategy. Maybe try to use multiple 'flags' in your strategy... like News or RSI/MACD and VWAP or Boilinger bands. here is the question for you, did you found any API that provide real time level 2 data and stock price with little to no delay? because without this ingredient all 'predictions' would be wrong.... unless you are playing off of swing trading algo.
@Noegruoc
@Noegruoc 4 жыл бұрын
i think there is Interactive Broker API
@unbreakable3396
@unbreakable3396 4 жыл бұрын
Big like , but can u add more vedios about stocks screener working with a live data to get instant notifications
@thorbenenmadrid7114
@thorbenenmadrid7114 4 жыл бұрын
Can someone explain the Flag structure in this Video? - The flag gets fixed at the end of the video
@kalio8345
@kalio8345 3 жыл бұрын
Since the function is checking whether SMA30 < SMA100 and vice versa the function needs a way of telling whether SMA30 and SMA100 have already crossed in the past(buy or sell signal recorded). If SMA30 crosses below the SMA100, the odds are the next few days/weeks the SMA30 will remain below the SMA100 and you don't want continuous "sell" signal prices recorded. So the first time the SMA30 dips below the SMA100 a "sell" signal price gets recorder, the flag is set to and remains 0 and the next few days/weeks np.nan gets added instead of a sell signal. Once the SMA30 gets above the SMA100 for the first time a "buy" signal price is recorded and the flag changes to 1 and remains 1 until the SMA30 dips back below SMA100. Hope that helps.
@sarikaberi4144
@sarikaberi4144 3 жыл бұрын
Excellent and only video available with much detailed expalnation...Please make some more vdos
@ggtechnocracy6709
@ggtechnocracy6709 3 жыл бұрын
How to use python to place trades in mt4 ...? How to use python for forex? There is no much resources in online about this topic... please make tutorial videos on this topic
@dharmendrayadav-cn2fi
@dharmendrayadav-cn2fi 2 жыл бұрын
👌👌👌 love from india keep it up. Very nice.
@rverm1000
@rverm1000 4 жыл бұрын
nice video i went threw the whole process of creating this program. great program
@dbartz89
@dbartz89 3 жыл бұрын
fyi I think your price is scaled wrong, or is in a different currency, it doesn't match a search on , e.g. yahoo finance. But I greatly appreciate the video and the discrepancy does not detract from the content. Thanks!
@annazully2680
@annazully2680 3 жыл бұрын
thanks! im a rookie coder so this was very useful!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 3 жыл бұрын
I'm glad this video was helpful to you !
@SilverSurferFTW
@SilverSurferFTW 4 жыл бұрын
In an uptrend chart you don't really need to trade you just hold. The difficult trades are in sideways charts... I would like to see a backtest there
@luvrahooo
@luvrahooo 3 жыл бұрын
Could you please point on any of your videos where you have shown, how to run a python script all week long without stopping and keep trading based on the signals? Like running it in cloud and managing trading sessions and using websocket check whether market is live or not. I have seen many trading python algo videos but everyone shows a jupyter notebooks but not seen how threading and other stuff can be used to run script regularly daily using cronjob or other means. Thanks in advance for your help. and Yes Great videos please keep posting. Till then I will check the videos for VWAP strategies :)
@ComeLearnExcel
@ComeLearnExcel 4 жыл бұрын
Everything you describe is awsome.. May I request you to increase the volume a bit
@flopperforever4069
@flopperforever4069 4 жыл бұрын
This was a sweet video. I actually just finished building my own simple MA algo and am working on backtesting it on a bunch of randomzied date ranges for all the tickers in the snp500. Cool stuff
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thanks!
@keamomatlala8517
@keamomatlala8517 4 жыл бұрын
How did this go btw?
@flanker6212
@flanker6212 3 жыл бұрын
How hard would it be to include a second option of when to sell - one which said if the stock price is a certain % above the 30SMA, it would sell at those times when the SMA's haven't crossed? That certain % could be an arbitrary value or even an average of the distance between the stock price and the SMA.
@aggelo143
@aggelo143 4 жыл бұрын
I know it's just an example but If you are trading 1 Day candles probably you could try lower SMAs like 21/55 or even 9/21 SMAs. Problem is they are lagging indicators. Thank you for showing the idea! :)
@claytonyoung1351
@claytonyoung1351 Жыл бұрын
I never touch sma's. Ema's only. 9, 50, and 200.
@Theo-dj7vs
@Theo-dj7vs 4 жыл бұрын
Youre style is easy to understand and follow. Great job...subscribed. May i make a learning request?
@softashutube
@softashutube 4 жыл бұрын
Good one .. One question can we automate downloading of stock data from anywhere... to run this program without much manual work?
@liamlindy
@liamlindy 4 жыл бұрын
ASHUTOSH KUMAR use quandl or pandas data reader
@investingnick
@investingnick 4 жыл бұрын
This strategy is very simple and easy to implement thank you!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
I think it's a simple strategy to implement as well.
@randysfightfund
@randysfightfund 3 жыл бұрын
Thank you for this video and the work you put into sharing.
@haneulkim4902
@haneulkim4902 4 жыл бұрын
Great video! Thanks!
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thank you Haneul !
@saitamasensei1374
@saitamasensei1374 4 жыл бұрын
Hey , Thanks a lot for the upload I was wondering if we can use custom time/ticker intervals for data , (2 mins ,7 mins 47mins)
@marinoman061
@marinoman061 3 жыл бұрын
Great Video! At the very end on the first sell signal, the price crosses both SMA before it signals to sell. Maybe optimize it by making it so that price only has to move below the SMA30 to signal a sell?
@maratimus
@maratimus 4 жыл бұрын
Dude, you have to make function that calculate net profit after each deal, than analyse your data.
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Great suggestion!
@maratimus
@maratimus 4 жыл бұрын
@@ComputerSciencecompsci112358 This type of strategy(MA cross) has big delay, it is I also advise you to use RSI and stohastic indicators, the have no delay and the best is closing by trailing stock technique.
@pavanjadhav8436
@pavanjadhav8436 4 жыл бұрын
Hey, Your videos are very useful. Please make videos on different strategies. Thank you!!
@deanladrido
@deanladrido 3 жыл бұрын
This is pretty awesome dude I might try it out just for fun this weekend
@maxkelter3561
@maxkelter3561 4 жыл бұрын
It's very interesting watching you build your program- tnx. Even though I have no experience in programming.
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thanks!
@VeeHeeOfficial
@VeeHeeOfficial 2 жыл бұрын
FYI -- If you are watching this vid AFTER Aug 31, 2020, there was a 4:1 AAPL stock split and your price will be 1/4 of what it shows in this vid.
@ebicer
@ebicer 3 жыл бұрын
Great video, but I don't understand how you did conclude that the short term average should be calculated based on 30 days and the long term average should be calculated based on 100 days. Do you have a reference on that or were they just logical random-ish numbers?
@globalguru21
@globalguru21 3 жыл бұрын
Wonderful, very good explanation , super.
@armandogarcia6564
@armandogarcia6564 4 жыл бұрын
This is great! Thank you...Would it be helpful to combine this strategy with another indicator like RSI(relative strength index) ?
@atrumluminarium
@atrumluminarium 4 жыл бұрын
You can definitely aggregate (say by a weighted sum of their signals) indicators together That way it becomes like a "voting" system. The more indicators signalling the same action, the more certain you can be of the action you're about to take
@otacon1024
@otacon1024 4 жыл бұрын
Impossible to answer, there are too many variables. Depends on the indicators used, settings for those indicators, asset traded, time period traded in, and a billion other factors. Only way to find out is backtesting, then paper trading if that looks promising. EDIT: What I can tell you is use percent-based trailing stop losses for every trade, regardless of strategy used.
@RichardMoffitt0
@RichardMoffitt0 3 жыл бұрын
that what stop loss trailing stop loss are for that can help you sell to prevent the loss.
@TevfikBagcivan
@TevfikBagcivan 3 жыл бұрын
Yess.. I'm finding like what i want. Thank you for this video
@raisInstitutionaltrader
@raisInstitutionaltrader 4 жыл бұрын
Doing gr8 make series wise create a playlist on phython trading
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thanks for the suggestion!
@raisInstitutionaltrader
@raisInstitutionaltrader 4 жыл бұрын
@@ComputerSciencecompsci112358 in india u will get more suscriber bcoz u have much more tallent
@stay-amazed1295
@stay-amazed1295 4 жыл бұрын
Good video! Lot of information for beginners. Can you make video on FTR strategy and hw to identify trend lines /SR lines using Python
@prashantchauhan3111
@prashantchauhan3111 4 жыл бұрын
Very good video expecting some more advanced videos. keep it.
@ComputerSciencecompsci112358
@ComputerSciencecompsci112358 4 жыл бұрын
Thank you
@manjunathchandukar664
@manjunathchandukar664 2 жыл бұрын
Hello I am from India and i want to apply algorithmic trading to options trading in Indian stock market. So how can I take out file to upload...
@andreamarkos
@andreamarkos 4 жыл бұрын
Buddy, how do you optimize and backtest your strategy with python?
@MicroFourThirdsCorner
@MicroFourThirdsCorner 3 жыл бұрын
Automated Moving average strategies like this don't work long term (I've back tested a LOT of them). You totally skipped over the part where it told you to go short at just below 30 (at almost the 1000 line) and reverse at 36 (on the 1000). So the first trade made a profit (about +6), the second trade made a loss (about -6), the third made a profit (about +6), fourth made a profit (+17), fifth a loss (about -6), sixth was about break even. If you look at just the first two trades you were about break even over a 2 year period. The real money was made from the 600 to 1000 lines. So from 6 trades you made about 17 in a major trending market. Now, run this on a stock that doesn't trend so well (and you won't know ahead of time which that is). You will lose more money as the MA crosses back and forth than you do on the long trends. You got lucky in this instance with the +17, if that had reversed a couple of times in the middle (as it did before and after) you would have ended up losing.
@PepeTostado
@PepeTostado 3 жыл бұрын
Great video, I have a question about the FLAG, what is it and how does it work?
@sonikasharma7844
@sonikasharma7844 4 жыл бұрын
How to link phone number with that program so that every time a buy/sell signal comes, it gives us something like text message or ringtone or alarm etc. ? Thanks
@messiasalvesdarocahneto771
@messiasalvesdarocahneto771 4 жыл бұрын
You could do an algorithm to calculate the turning points in the price of GOLD FOR EXAMPLE?. As I am a novice in programming, I would like to learn how to do these calculations ...
@onemorevideo7928
@onemorevideo7928 3 жыл бұрын
Will be great if you can do a a video when the OBV does not move tandam with the price
@Kaustubh56
@Kaustubh56 9 ай бұрын
How is this different from the usual Technical Analysis indicators, except that this is generated using Python? The moving average crossover indicators are already available readily in many softwares or platforms.
@sanelezuma
@sanelezuma 4 жыл бұрын
THansk for such an informative video, i have a question: How can i change yo buy and sell parameters to only buy when price crosses over both Mpoving averages insterad of buying when one moving average crosses the over...can you make a small video abouut that.. thanks
@Raviexact
@Raviexact 3 жыл бұрын
Wonderful! Can you throw light on how to place buy n sell orders from code, otherwise it is kind of manual only. Thanks !
@arifbillah2470
@arifbillah2470 4 жыл бұрын
Awesome content! Instant sub to your channel. Do you share your scripts?
@urinater
@urinater 4 жыл бұрын
Your first mistake was to use “Adjusted Close”. Rookie mistake. Also, better to use EMA than SMA.
@cormano64
@cormano64 4 жыл бұрын
Why is that?
@federicosarrocco853
@federicosarrocco853 4 жыл бұрын
@@cormano64 exponential moving average
@selfimz11
@selfimz11 4 жыл бұрын
What do you choose if not Adj close ? And why ?
@dhanpreetsingh
@dhanpreetsingh 4 жыл бұрын
i agree on point of EMA than SMA but why not adjusted close?
@urinater
@urinater 4 жыл бұрын
Adjusted Close includes stock splits, dividends. And therefore Adj Close is sometimes lower than the actual ‘Close Price’ (use this instead). Look at the historic data on Yahoo, etc for a dividend paying stock. Then compare Close and Adj Close, just before and after the last dividend payment. I spotted this when developing my app (theta-45.com, which is under maintenance now, getting ready for version 2, as I write this. So you can check in a few weeks from now). Or use another app, and compare Adj Close with the Low Price data. You may find that sometimes the Adj Close goes BELOW LOW PRICE. That makes no sense until you realise that’s a devalued stock price (due to dividend). When you use a Close, the Low becomes the low price again. As it should be. In other words, the Close Price is the actual close price, without ‘adjustments’.
@pynchemdkhar2995
@pynchemdkhar2995 4 жыл бұрын
this is a very helpful video.. thanks for your hard work..... by the way can you help me what is the code to run my backtest for a defined period in a day.. thank you
@rvdl4181
@rvdl4181 3 жыл бұрын
Great video! Can we apply this code to current market situations? i.e. last 5 days ? Thanks
Algorithmic Trading Strategy Using Three Moving Averages & Python
31:46
Computer Science
Рет қаралды 54 М.
Stock Price Prediction Using Python & Machine Learning
49:48
Computer Science
Рет қаралды 1,2 МЛН
Matching Picture Challenge with Alfredo Larin's family! 👍
00:37
BigSchool
Рет қаралды 48 МЛН
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Паша Осадчий
Рет қаралды 3,8 МЛН
what will you choose? #tiktok
00:14
Анастасия Тарасова
Рет қаралды 7 МЛН
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 3,3 МЛН
Top 18 Most Useful Python Modules
10:50
Tech With Tim
Рет қаралды 928 М.
Python Resume Projects - You Can Finish in a Weekend
10:38
Tech With Tim
Рет қаралды 1,5 МЛН
Python For Finance Portfolio Optimization
39:17
Computer Science
Рет қаралды 142 М.
Top 6 Algorithmic Trading Strategies!
12:15
TradeOptionsWithMe
Рет қаралды 304 М.
Trading Strategy Technical Analysis Using Python
21:53
Computer Science
Рет қаралды 34 М.
Algorithmic Trading Strategy Using MACD & Python
30:38
Computer Science
Рет қаралды 173 М.
Solving real world data science tasks with Python Pandas!
1:26:07
Keith Galli
Рет қаралды 1,5 МЛН
Predicting Stock Prices in Python
29:14
NeuralNine
Рет қаралды 532 М.
What is Algorithmic Trading & How to Get Started
15:56
TradeOptionsWithMe
Рет қаралды 544 М.
Sell in May Seasonality Investment Strategy Using Python
27:29
Computer Science
Рет қаралды 1,5 М.
Matching Picture Challenge with Alfredo Larin's family! 👍
00:37
BigSchool
Рет қаралды 48 МЛН