Algorithmic Trading Using Python - Full Course

  Рет қаралды 2,599,807

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Learn how to perform algorithmic trading using Python in this complete course. Algorithmic trading means using computers to make investment decisions. Computer algorithms can make trades at a speed and frequency that is not possible by a human.
After learning the basics of algorithmic trading, you will learn how to build three algorithmic trading projects.
💻 Code: github.com/nickmccullum/algor...
✏️ Course developed by Nick McCullum. Learn more about Nick here: nickmccullum.com/
⭐️ Course Contents ⭐️
⌨️ (0:00:00) Algorithmic Trading Fundamentals & API Basics
⌨️ (0:17:20) Building An Equal-Weight S&P 500 Index Fund
⌨️ (1:38:44) Building A Quantitative Momentum Investing Strategy
⌨️ (2:54:02) Building A Quantitative Value Investing Strategy
Note that this course is meant for educational purposes only. The data and information presented in this video is not investment advice. One benefit of this course is that you get access to unlimited scrambled test data (rather than live production data), so that you can experiment as much as you want without risking any money or paying any fees.
This course is original content created by freeCodeCamp. This content was created using data and a grant provided by IEX Cloud. You can learn more about IEX Cloud here: iexcloud.io/
Any opinions or assertions contained herein do not represent the opinions or beliefs of IEX Cloud, its third-party data providers, or any of its affiliates or employees.

Пікірлер: 2 100
@XenonFH
@XenonFH 3 жыл бұрын
I like how the errors were made without editing them out from the clip. Thanks for including all those in.
@BookOfMorman
@BookOfMorman 3 жыл бұрын
Sir, you clearly explained both financial and coding keywords better than my professors did in 4 years of schooling. You're a great teacher!!
@nameno480
@nameno480 3 жыл бұрын
So ageee!!!!
@AlbyTheMovieCreator
@AlbyTheMovieCreator 3 жыл бұрын
This is the most common comment you could ever read on web courses. I’m sure your teacher explained well, you were just bored and didn’t pay attention. Here you have 4 hours for everything you need to know and you can stop and start whenever you want. It’s easier. But don’t discredit other people because you have not been able to keep up with them.
@Retsjo
@Retsjo 2 жыл бұрын
@@AlbyTheMovieCreator the school system is just fcked and you know it
@hamedmahdavifar4517
@hamedmahdavifar4517 2 жыл бұрын
I wonder why almost everyone feels the same about the schools.they kepp u 4 years in a box and u act like a piggy bank to them.it is realy sad .I am already in that box.this guy deserves a ton of money not my teachers.
@SwIsH189
@SwIsH189 2 жыл бұрын
Everything covered in this video is extremely basic. If you didn't understand it in 4 years of college, that is 100% on you.
@ferbholstead6950
@ferbholstead6950 3 жыл бұрын
I LOVE how you go through your own process of debugging. It really helps me.
@Avman20
@Avman20 3 жыл бұрын
Excellent course, NIck!! I enjoyed very much the "real life" approach that included the footage of tracking down bugs. Thanks for not editing that out!
@cpark4567
@cpark4567 3 жыл бұрын
Still watching and learning the topics, so far so good, thanks a lot for generous offering this great course and I look forward to seeing this extended topic with advanced techniques and link to specific brokers' API like IB, Futu, etc. Thanks again for your great teaching!!
@jairusknight5389
@jairusknight5389 3 жыл бұрын
I don't comment often but this guy is an amazing teacher. He explained everything in such good detail. It helped me as I need a deep understanding of a topic to grasp it completely. Keep up the great work.
@SetVet
@SetVet 3 жыл бұрын
Great course. Thank you for all the work you put in and your thorough explanation of how it all works together while coding. I haven't been coding python for more than a year and this was a great refresher course into data science and api use
@akashkumarsingh8215
@akashkumarsingh8215 2 жыл бұрын
where did he has shown how to install dependencies and cloning plz help
@BT-te9vx
@BT-te9vx 3 жыл бұрын
this was awesome and though I've just finished the first part only, I cannot thank you enough for how well you explained each portion of the project. Now only, if I could build up from here!
@dinam1ka
@dinam1ka 2 жыл бұрын
Thank you that you didn't edit video, these debugging/looking for error processes actually make things more clear. And teach how to deal with such cases. And thank you for this video at all, it's great!
@MrFlytoskyyy2
@MrFlytoskyyy2 2 жыл бұрын
50min in and am already in love with the style of teaching. Errors are left in the vid as well as the logical process of debugging them, everything he mentions are backed up by examples. Superb content
@akashkumarsingh8215
@akashkumarsingh8215 2 жыл бұрын
where did he has shown how to install dependencies and cloning plz help
@primaire7
@primaire7 2 жыл бұрын
Not only application specific, he goes through very comprehensive instruction on Python. Huge kudo!
@sachinpondi8718
@sachinpondi8718 2 жыл бұрын
Excellent course for someone new to Algo Trading. It’s precise and well designed course. I would like to see something more along lines of simulating real time strategies like VWAP, TWAP. This one is more of pre-trade analytics. Nonetheless I liked it and strongly suggest to anyone new to Algo trading space!
@KANGAR1982
@KANGAR1982 3 жыл бұрын
great video, what I really liked is that you showed in a super clear way how to use the requests library in Python and now I do not need to depend on 3rd party wrappers that might not have all functionality! thanks!
@phungduy4592
@phungduy4592 2 жыл бұрын
Thank you very much for this course!!! You've done a wonderful job!
@jonnyk5670
@jonnyk5670 2 жыл бұрын
Thanks Nick for the complete and detailed course for beginner. Really appreciate.
@richardshi1896
@richardshi1896 2 жыл бұрын
This is a great course. I learned so much from it. One suggestion: the robust value trading program should exclude the negative PE Ratio stocks first before sorting for the low 50 stocks.
@kongseeyang959
@kongseeyang959 3 жыл бұрын
Thank you for this amazing tutorial! I wish there was more of this information 4-5 years ago.
@alexbordei3951
@alexbordei3951 3 жыл бұрын
thank you so much for this course!!! I started my coding journey with Free Code Camp, I now work full time as a developer. This topic is on my to do list!!!
@seyitalp7644
@seyitalp7644 3 жыл бұрын
Which road map did you take for fulltime job?
@Onnethox
@Onnethox 2 жыл бұрын
Cap af
@kostas6915
@kostas6915 2 жыл бұрын
Congrats Nick McCullum for creating this. Good that the debugging parts are left in, so we can understand in more details how various parts work.
@williamsmith5350
@williamsmith5350 2 жыл бұрын
This is very great video filled with explanation and experience. Watching it has been a pleasure. Thank you for taking the time and having a student mentality you are appreciated.
@lukenothere1252
@lukenothere1252 3 жыл бұрын
Oh my god, again, you are doing god work. From dynamic programming now this.
@bitecast
@bitecast 3 жыл бұрын
29:41 Thanks for showing debugging when hitting errors. That adds a lot to real world training!
@senior5904
@senior5904 3 жыл бұрын
that is not debugging lmao, it's like turning your phone off and on
@axea4554
@axea4554 3 жыл бұрын
Reloadi g this thing is like off and on but how do you know if you should restart it? This is debugging
@mehulsinghtomar2049
@mehulsinghtomar2049 3 жыл бұрын
Its still showing error importing from secrets.py file. Did nothing for me
@koushikdey7778
@koushikdey7778 Жыл бұрын
hey guys, even after restarting kernel, I am still getting same error for importing secrets, any solution?
@user-cm7di5nj1v
@user-cm7di5nj1v Ай бұрын
@@koushikdey7778 same here please do suggest
@alexandersierra7676
@alexandersierra7676 3 жыл бұрын
Thank you so much for this tutorial! It has been a great distraction from my regular school work. Keep em coming! :)
@javierortizmir7873
@javierortizmir7873 Жыл бұрын
to whom it can be of use: if you're stuck because of a KeyError 'DISCA', that is because the original stock list has had some change. You can solve it by using a try/except block when doing the the iteration for the final_dataframe = final_datafrme.append(.....) . Just put all of that inside the try block, and then do an except KeyError, and handle the eroor
@alexandergeorgiev2631
@alexandergeorgiev2631 Жыл бұрын
haven't used a try/except before, can you please elaborate on how to use the except? I have the same issue Edit: I just put everything in the try block like you said and put except KeyError: break, is this what you did?
@ApakukiNayacakalou
@ApakukiNayacakalou 3 жыл бұрын
freakin hell! how good is this! Lockdown boredom solved. Thanks!
@quincylarsonmusic
@quincylarsonmusic 3 жыл бұрын
Note that there are a few pops in Nick's sound at the beginning, but these go away completely once he starts building projects at the 17:20 mark.
@jpmohan96
@jpmohan96 3 жыл бұрын
great, was worried it was my system 😅
@blockdisney3676
@blockdisney3676 3 жыл бұрын
Hi, I am still a beginner, where do we go to install the dependencies... the video skips that part.. thanks
@contantino_mm
@contantino_mm 3 жыл бұрын
@@blockdisney3676 I think you can start with this anaconda kzfaq.info/get/bejne/j7Bzac-VrpnMh58.html
@blockdisney3676
@blockdisney3676 3 жыл бұрын
@@contantino_mm Thank you so much!
@SaveTheHedgehog
@SaveTheHedgehog 3 жыл бұрын
@@contantino_mm And where to start without this anaconda?
@slcrooks
@slcrooks 3 жыл бұрын
Awesome course. Thank you, hugely helpful!
@adithyaravindra5596
@adithyaravindra5596 Жыл бұрын
finished the entire thing in one sitting. Loved it! its an amazing course if you are starting out algo trading!
@hector4970
@hector4970 Жыл бұрын
Worth hai kya?
@jonathansgarden9128
@jonathansgarden9128 3 жыл бұрын
I'm 12 minutes into this course and I already feel like I'm getting a firm grasp of this stuff. Thank you so much
@panhuragan4388
@panhuragan4388 3 жыл бұрын
Stop picking low hanging apples. Go deeper into the subject.
@mgno9795
@mgno9795 Жыл бұрын
@@panhuragan4388 😂😂
@wiskasIO
@wiskasIO 3 жыл бұрын
So far I have only used my python knowledge to program basic games, automation widgets and a few data scrappers but this... My head just exploded with curiosity!🤯 Thank you so much!
@Mmmkay..
@Mmmkay.. 2 жыл бұрын
@Arid Sohan *paid
@twas3658
@twas3658 2 жыл бұрын
@@Mmmkay.. I don’t think that was a typo
@zacki2001
@zacki2001 Жыл бұрын
@Arid Sohan tf
@ultranationalistkillordie1748
@ultranationalistkillordie1748 9 ай бұрын
ya maybe program to teach a bot to give head , we can control the speed
@fbitti
@fbitti 3 жыл бұрын
I like how you face problems and fix them, thanks for not cutting those parts out of the final video
@daleputnam8300
@daleputnam8300 2 жыл бұрын
Your presentation of this information is fantastic and easy to pay attention to, thank you you're awesome.
@chanian1594
@chanian1594 2 жыл бұрын
Just completed this amazing journey Thanks for all the efforts!
@kccchiu
@kccchiu 2 жыл бұрын
In 58:05 for anyone don't want to use yield, you can use list concatenation for both symbol_groups and symbol_strings symbol_groups = [list(stocks.Ticker)[x:x+100] for x in range(0, len(list(stocks.Ticker)), 100)] symbol_strings = [(',').join(i) for i in symbol_groups]
@Peter-lv5sl
@Peter-lv5sl Жыл бұрын
do u have any tips on how to learn and improve my ability in this area after I complete this video? Tryna prepare myself for work in this field was wondering if you have tips!
@farz3984
@farz3984 3 жыл бұрын
Thanks for the training. I learned alot!
@sudhirkumarshahu6146
@sudhirkumarshahu6146 2 жыл бұрын
This guy is awesome, the best thing I liked that he was debugging things in video. Debugging is actually most important part that takes time to learn.
@VERY_TALL_MAN
@VERY_TALL_MAN 3 жыл бұрын
About to take a college course on this topic next semester, so glad this exists!
@irvin1241
@irvin1241 3 жыл бұрын
which course and college? could you please refer to a link?
@gomes8335
@gomes8335 3 жыл бұрын
Waste of time.
@VERY_TALL_MAN
@VERY_TALL_MAN 3 жыл бұрын
@@irvin1241 Im sure most colleges that have a business school within them will have a course or two on python or R that’s centered around finance. The course Im taking next semester is a minicourse to fill out my credit requirement so it’s probably not as in depth as youre looking for. The best place to start would probably be just googling the “python finance college course” and seeing what colleges offer that you’d be willing to pay for. Of course, if youre good at learning things on your own I cant recommend Kaggle enough. Its free and has alot of stuff that you can pull from. Good luck!
@VERY_TALL_MAN
@VERY_TALL_MAN 3 жыл бұрын
@@gomes8335 I dont think its a waste of time, as Im not looking to be a full time programmer. I pay for 18 credits per semester, and using a few of them to focus on my interests outside of my major seems pretty worthwhile to me. I’m not a good self-learner like some people and my background in coding isnt that strong. I think it’ll be a cool way to combine a minor interest with my other education and see if I can really take it anywhere. As always, the internet is truely the best teacher when it comes to programming, but not everyone is suited to that path :)
@MediaEgg
@MediaEgg 3 жыл бұрын
@@VERY_TALL_MAN Good on you. I wish you luck :)
@georgekrax
@georgekrax 3 жыл бұрын
BONUS: In this course a free addictive Python course for beginners / intermediate programmers is included, with clear clarifications about everything you may need ♥
@calinwong
@calinwong 3 жыл бұрын
Excellent explained and walking through learning session! Great thanks and hope there will be more sessions from you!
@q360404838
@q360404838 3 жыл бұрын
This is awesome! I followed every part of the course and finished all three projects successfully. Thank you so much for providing great quality content!
@RohitSingh-yo2yl
@RohitSingh-yo2yl 3 жыл бұрын
ah fellow Asian..
@adamfattal9602
@adamfattal9602 3 жыл бұрын
How do you feel like this course has affected your knowledge of algo-trading a month later? Have you been deploying any of the strategies used?
@kaelenanderson8466
@kaelenanderson8466 2 жыл бұрын
How where your results?
@PowerGrixis
@PowerGrixis 2 жыл бұрын
guys it is a simplified approach that allows to learn to program in python in a playful way. with this course you can try to make the analysis more relevant by integrating other indicators idk
@akashkumarsingh8215
@akashkumarsingh8215 2 жыл бұрын
where did he has shown how to install dependencies and cloning plz help
@lucasinoi2145
@lucasinoi2145 3 жыл бұрын
Thank you for this video but I think everybody is feeling the absence of the second section. Any updates would be greatly appreciated.
@_The_Black_Prince_
@_The_Black_Prince_ 3 жыл бұрын
@2:09:00 you can use the code below to ensure you have a valid number by looping until the user has inputted a numerical value. Thanks for the great video! while True: try: portfolio_size = float(input("Enter the size of your portfolio: $")) break except ValueError: print("Please enter a valid numerical value in $")
@ghanshyamsinghmoyal7931
@ghanshyamsinghmoyal7931 2 жыл бұрын
Hey thanks bro you saved the day :)
@ameeraarif
@ameeraarif 2 жыл бұрын
Bro, which software is used to run this script?
@csanadtemesvari9251
@csanadtemesvari9251 6 ай бұрын
@@ameeraarif Jupyter Notebook provided by IPython, pip library, numpy, pandas, xlsxwriter
@rudrakshya1
@rudrakshya1 Жыл бұрын
Your teaching style really touched me. It's so much connected.
@louisciano9311
@louisciano9311 3 жыл бұрын
This video is insanely helpful. Thank you so much.
@kenjohnson512
@kenjohnson512 3 жыл бұрын
Literally just started building a trading bot, timing couldn't have been any better, thanks!
@meatbased77
@meatbased77 3 жыл бұрын
KZfaqs algorithm is your friend.
@prodigydawei
@prodigydawei 3 жыл бұрын
You should thank the cookies for that
@gabriellarossi
@gabriellarossi 2 жыл бұрын
I’m also curious how your trading is going
@kenjohnson512
@kenjohnson512 2 жыл бұрын
I worked on it for a full month using the Interactive Brokers API in python and watched a bunch of videos focusing on day trading indicators etc to try and code the bot. In the end, I hadn't accounted for the commission the brokerages take (about $5 per trade which adds up especially if you're not trading with a lot) and this eventually started discouraging me a little. If anyone does run into the same problem, I would look into leverage which is riskier but easier to overcome tis problem. Risk analysis is also crucial (setting stop losses, take profits).
@toukka4
@toukka4 2 жыл бұрын
@@kenjohnson512 so how is it going bigboy?
@ashwinsamuel7158
@ashwinsamuel7158 Жыл бұрын
Great video! Was really helpful. Just 1 small comment/question: In the 3rd value investing project, you might have missed out filtering out the stocks with negative pe ratio/pb ratio/ ev_ebitda ratio / ev_gp ratio before calculating the percentile. The algo is currently rewarding such stocks with negative ratios which is incorrect, right?
@pa_blo4220
@pa_blo4220 2 жыл бұрын
Just completed the course. Thank you!
@jasonheo2333
@jasonheo2333 3 жыл бұрын
Loving the materials! I might add that Pandas and Numpy actually has builtin methods better suited than math and scipy libraries for some operations. For example, numpy.floor() can be used instead of math.floor() final_dataframe['Number of Shares to Buy'] = np.floor(position_size/final_dataframe['Price']) or df.rank() can be used instead of scipy.stats.percentileofscore() for time_period in time_periods: hqm_dataframe[f'{time_period} Return Percentile'] = hqm_dataframe[f'{time_period} Price Return'].rank(method='max', pct=True).mul(100)
@adiletdaniyarov5737
@adiletdaniyarov5737 3 жыл бұрын
Oh, man have a nice day, u made mine easier
@adiletdaniyarov5737
@adiletdaniyarov5737 3 жыл бұрын
thanks for .rank
@jasonheo2333
@jasonheo2333 3 жыл бұрын
@@adiletdaniyarov5737 HQM Scores from momentum strategy, momentum_percentiles = [f'{time_period} Return Percentile' for time_period in time_periods] hqm_dataframe['HQM Score'] = hqm_dataframe[momentum_percentiles].mean(axis=1) RV Score from valuations: rv_dataframe['RV Score'] = rv_dataframe[[i for i in metrics.values()]].mean(axis=1) :)
@rodrigomendes4875
@rodrigomendes4875 3 жыл бұрын
That's awesome, thanks you
@srisaiatluri7477
@srisaiatluri7477 2 жыл бұрын
Bro thank you so much I was getting float errors.
@andreyshamardin4740
@andreyshamardin4740 2 жыл бұрын
52:39 If you stuck with appending series to a dataframe like me, this method(.append) returns a new object, so if you want to see the result, you should assign final_dataframe to new variable and then print it. new_dataframe = final_dataframe.append(pd.Series( [ symbol, price, market_cap, 'N/A' ], index=my_columns ), ignore_index=True ) print(new_dataframe.to_markdown())
@JacobSanchezzz
@JacobSanchezzz 2 жыл бұрын
TY! assigning the new variable got it to print and installing tabulate
@sastianp
@sastianp 2 жыл бұрын
Perfect! Exactly what I got stuck on.
@nurbolkapakov2282
@nurbolkapakov2282 Жыл бұрын
Unbelievable! Yall doing sucha great! Thank you very much! God bless yah family! Great respect from Kazakhstan!
@kathyferro3524
@kathyferro3524 3 жыл бұрын
Best tutorial. New in python and Stock is foreign to me. I actually can have stock conversation, now. Thanks
@rafaelmalate7938
@rafaelmalate7938 3 жыл бұрын
Great thing I have this on my notif
@maalokam
@maalokam 2 жыл бұрын
I am really enjoying learning these techniques and am impressed with your style. Thank you for encouraging others to learn! I'm running into an error in the momentum calculations around percentileofscore implementation, around 2h 30m mark in your video. I am executing the following: for row in hqm_dataframe.index: for time_period in time_periods: change_col = f'{time_period} Price Return' percentile_col = f'{time_period} Return Percentile' hqm_dataframe.loc[row, percentile_col] = score(hqm_dataframe[change_col], hqm_dataframe.loc[row, change_col]) and get the error: TypeError: '
@maalokam
@maalokam 2 жыл бұрын
I found a solution to this question in one of the comments. Another user had the same issue and they resolved it by adding this line before the for loops I mentioned: hqm_dataframe.dropna(inplace=True) This drops any rows/columns that return N/A as part of f''{time_period} Price Return' column in the hqm_dataframe
@csmith1
@csmith1 3 жыл бұрын
Hey man thanks for this video. Really great work here.
@danh9002
@danh9002 9 ай бұрын
This was amazing! Thank you so much for this video!
@esn832
@esn832 3 жыл бұрын
Awesome video, thanks very much! For the next time, please put the video of the educator not on top of the slides or if in a corner where it does not superimpose on the content.
@SirDeeTrey
@SirDeeTrey 3 жыл бұрын
Shouldn't stocks with negative P/E and P/B ratio be removed when you are calculating the RV Score? I see that it was done when you take the simpler approach and only use the P/E ratio. Thanks in advance :)
@roya9761
@roya9761 2 жыл бұрын
The fun thing about pandas, is that you can work with whole columns without loops, e.g: final_dataframe['Number of Shares to Buy'] = final_dataframe.apply( lambda row: math.floor(position_size / row.Price), axis=1)
@zababayaga5475
@zababayaga5475 3 жыл бұрын
Exactly what i needed right now.
@ahmedahmed-xi6yh
@ahmedahmed-xi6yh 2 жыл бұрын
Thanks for the video Nick! If i wanted to launch a career in trading along with my coding skills, which videos do you suggest me to watch in order to have a solid background on the subject thanks in advance
@alex_suero
@alex_suero Жыл бұрын
Amazing video! Thank you so much for sharing this! Still going through it, but there's an observation I need to make for any beginners that might stumble upon this video: To create a new column with values based on another column(s), using a for loop to iterate through rows and make calculations (as shown in 2:31:11) will be EXTREMELY inefficient on larger datasets. It is better to use Pandas' `apply()` method paired with a `lambda` function, as follows: ``` # create list with time periods time_period = ['One-Year', 'Six-Month', 'Three-Month', 'One-Month'] # create new fields (or update existing ones) based on previous list # and calculate percentile based on Price Return for i in time_period: change_col = f'{i} Price Return' percentile_col = f'{i} Return Percentile' hqm_dataframe[percentile_col] = hqm_dataframe.apply( lambda x: score(hqm_dataframe[change_col], x[change_col]), axis=1) ``` Same method can be applied to calculate HQM Score using Pandas' `mean()` method: ``` hqm_dataframe['HQM Score'] = hqm_dataframe.apply( lambda x: pd.Series([x[f'{time_period[0]} Return Percentile'], x[f'{time_period[1]} Return Percentile'], x[f'{time_period[2]} Return Percentile'], x[f'{time_period[3]} Return Percentile'] ]).mean(), axis=1) ```
@Jon-bk2bw
@Jon-bk2bw Жыл бұрын
Hey Alex! just checking, are you still able to use it? Did they deprecate the sandbox api?
@alex_suero
@alex_suero Жыл бұрын
@@Jon-bk2bw Not sure if it's working at the moment, but it did a few weeks ago when I tested it! If anything, you can use Yahoo Finance API instead
@djangounchained4271
@djangounchained4271 Жыл бұрын
@@Jon-bk2bw I had the same question and I think they did on 21st August 2021 but I'm not sure how come users were able to work with it until a couple of months ago.
@jacksonzhan
@jacksonzhan 2 жыл бұрын
awesome!Fix some problems:Before Calculating Momentum Percentiles,Execute the statement first to clean up invalid data.hqm_dataframe.fillna(value=0, inplace=True)
@dan.franco
@dan.franco Ай бұрын
Incredible course. Thank you very much!
@tanaykashyap2459
@tanaykashyap2459 8 ай бұрын
IEX has updated a lot of stuff, could we get a updated version of this course?
@kylem6201
@kylem6201 3 жыл бұрын
This tutorial is freakin' awesome!!
@anangelsdiaries
@anangelsdiaries 11 күн бұрын
There were a few questions I had while watching (I am a noob so sorry if any of them sound dumb): - How do you deploy that? I imagine you wouldn't want it running in Jupyter Notebook. - Is the accuracy-loss of floats safe to ignore? - While the concept of high-quality vs low-quality momentum makes sense, why is momentum a good metric? Isn't it likely that since you rely on data from a year ago, your model identify stocks that have already seen their growth and won't grow more? (Like making you buy at high, instead of low) - Would it be sensible instead of calculating a score to sort all the columns based on different return_percentiles? - Also, when do you know to sell? I know the premise was that we have a team of traders to whom we send our excel files, but while they'd be able to know how many stocks to buy based on our position and the filtering we did, how do they know when to sell?
@CalebDiT
@CalebDiT 3 жыл бұрын
Rather than counting zeros, an easier way to input large numbers with many zeros is to use e-notation: 3e3 (which equals 3 * 10^3, or 3000) 10e6 (equals 10 * 10^6, or 10000000) 8e100 (equals 8 * 10^100, or 80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
@joaoc7801
@joaoc7801 2 жыл бұрын
Also an easy way to input small numbers, e.g. 3e-3
@milanw1872
@milanw1872 Жыл бұрын
Are you trying to input my bank accout balance?
@CalebDiT
@CalebDiT Жыл бұрын
@@milanw1872 Yes, for a withdrawal, but all I keep getting from your bank are 🤣emojis. What's up with that?
@AliAhmed-ox1gy
@AliAhmed-ox1gy 3 жыл бұрын
I knew free code camp would have a legit course on this.
@AydinCGur
@AydinCGur Жыл бұрын
Excellent beginner's course. Thanks so much for the effort!
@sunilsala3733
@sunilsala3733 Жыл бұрын
Bro u intrested to learn more about algo trading?
@jarradbourke7375
@jarradbourke7375 3 жыл бұрын
this was great, many thanks Nick
@rockykamen-rubio1600
@rockykamen-rubio1600 3 жыл бұрын
Really liked the tutorial! There are a few places where you're working on code that's blocked by the video of your face. I could generally extrapolate from what you were saying, but wanted to let you know
@realMrLupu
@realMrLupu Жыл бұрын
Hello, for people getting to the Key Error for the stocks, the solve is to delete the 4 stocks that have been delisted from the S&P 500: code example: stocks = stocks[~stocks['Ticker'].isin(['DISCA', 'HFC','VIAC','WLTW'])]
@jivemiguel3719
@jivemiguel3719 Жыл бұрын
thanks!
@user-md9kd2qd5x
@user-md9kd2qd5x Жыл бұрын
Thanks!
@hasantao
@hasantao Жыл бұрын
Thank you very much for the videos. I wish you had covered the execution of a trade. That is an area that I often ran into a trouble. I hope we will have a series that cover execution and an actual end-to-end pipeline based on an actual exchage.
@hasantao
@hasantao Жыл бұрын
@Afshin Zarechian I now primarily use tradingview or tradestation for writing my scripts and backtesting. They have a program called pinescript which is easy to learn. They both have built in backtesting module.
@ztlf
@ztlf Жыл бұрын
Just coming across this video now. Make sure, for the first project, you get an up to date list of all stocks found on the S&P 500. At this time there were 4 stocks that no longer are under the listed tickers with the provided csv file.
@shayansh2821
@shayansh2821 2 жыл бұрын
What I like about your tutorial is that one doesn’t miss out if they start with the third section. Also than you didn’t cut out the bugs and struggle helps people to understand that these stuff belong to a programmers life. Another positive point is that you try to clarify specific financial terms. Overall you did a great job here. One point of improvement is your face cam position on the screen.
@akashkumarsingh8215
@akashkumarsingh8215 2 жыл бұрын
where did he has shown how to install dependencies and cloning plz help
@smitpatel9462
@smitpatel9462 2 жыл бұрын
hi, can anyone please help me figure out where actually is a dependency section in this course? Thank you
@joshbusst2658
@joshbusst2658 2 жыл бұрын
Amazing tutorial! Thanks so much
@davidwashington4282
@davidwashington4282 2 жыл бұрын
You can use a while loop with the input: def portfolio_size(): global portfolio_size while True: try: portfolio_size = input('What is your portfolio size?') if isinstance(float(portfolio_size), float): break except ValueError: print('This is not a number')
@brothermalcolm
@brothermalcolm Жыл бұрын
Awesome tutorial, watched the whole thing through to the end. For the next video tutorial, do you want to show us how to write a trading bot that will automate day trading based on these algorithms?
@sunilsala3733
@sunilsala3733 Жыл бұрын
Bro u intrested to learn more about algo trading?
@huysamdua86
@huysamdua86 7 ай бұрын
very nice, thx. the IEX cloud testing sandbox is deprecated but able to workaround using other data provider. e.g. yfinance works fine for me.
@beaker071
@beaker071 3 жыл бұрын
Great course! one question about first project, are we really using market cap for calculate the shares to buy? it does not seem weighted by that
@antoniokarrillo5853
@antoniokarrillo5853 2 жыл бұрын
I'm very grateful for your video. I'm below a beginner, basically illiterate in computer knowledge, but you made it easy. Thank you, thank you!
@akashkumarsingh8215
@akashkumarsingh8215 2 жыл бұрын
where did he has shown how to install dependencies and cloning plz help
@RaffiSosikian
@RaffiSosikian 8 ай бұрын
A great detailed starter course to learn some Python. As a licensed commodity trading advisor (and a software engineer), I would never advise someone to trade this though.
@mohitmahajannetwork3223
@mohitmahajannetwork3223 7 ай бұрын
?
@shyngysbek6907
@shyngysbek6907 7 ай бұрын
Could you explain your opinion or suggest anything?
@Tanus912
@Tanus912 3 жыл бұрын
Notes for myself: 7:06 Quant investing strategy steps. 10:33 what's an API
@edwardzita3479
@edwardzita3479 3 жыл бұрын
Useful to me as well, thanks
@ARPAN7004
@ARPAN7004 2 жыл бұрын
1:19:03 For rounding down, we can use integer division? For e.g: 5/2 is 2.5 But, 5//2 is 2 That will allow us not to import math
@That_next_level
@That_next_level 3 жыл бұрын
Just as a safety precaution since you never want to trust someone to know what to do you can use a while loop for the input validation: invalid_input = True while invalid_input: try: portfolio_size = input("Enter the value of our portfolio:") val = float(portfolio_size) print(val) invalid_input = False except Exception as exception: print("You must enter an integer")
@karolmileszko
@karolmileszko 11 ай бұрын
As sandbox is discontinued I'm using the public key provided by IEX within the test period. I'm still getting 403 error. Any ideas?
@pencilkid1123
@pencilkid1123 3 жыл бұрын
you know, Renaissance technologies is something I pass by on my way to almost anywhere and I never knew what they were until now. That's pretty cool
@pajeetsingh
@pajeetsingh 3 жыл бұрын
they dnt use python
@ayansamal2440
@ayansamal2440 3 жыл бұрын
@@pajeetsingh What do they use?
@the_real_cookiez
@the_real_cookiez 3 жыл бұрын
@@ayansamal2440 A quick Google shows C++
@pajeetsingh
@pajeetsingh 3 жыл бұрын
@@goober-ll1wx If you can place order 100 times a minute, it's still not illegal. They place 1000 times a min. It's not illegal. It's calculus of day trading, more like minute or even seconds trading.
@pajeetsingh
@pajeetsingh 3 жыл бұрын
@@goober-ll1wx Well he worked for CIA. That should settle your doubt.
@blockcrunchzorz
@blockcrunchzorz 3 жыл бұрын
Easy way to add a cost column to your pandas df: final_dataframe = final_dataframe.apply(lambda x: x['Stock Price'] * x['Number of Shares to Buy'], 1) *** don't forget the ',1', it specifies the axis :)
@abhishekmittal7213
@abhishekmittal7213 3 жыл бұрын
at 2:28:12 While implementing the percentiles, I noticed that the data I am receiving has None type in it. So the scipy.stats module throws an error as it cant compare the None type instances. For now I am replacing it with 0. Just for people who face this error you can just add this right before you assign your return percentiles for row in hqm_dataframe.index: for time_period in time_periods: if hqm_dataframe.loc[row,f'{time_period} return'] == None: hqm_dataframe.loc[row,f'{time_period} return']=0
@fcoreas
@fcoreas 2 жыл бұрын
I actually did a hqm_dataframe.dropna(inplace=True), as this values are from stocks that are probably not available anymore using the API
@ghanshyamsinghmoyal7931
@ghanshyamsinghmoyal7931 2 жыл бұрын
Hey thans guys, you all saved the day :)
@coach_kash
@coach_kash 2 жыл бұрын
@@fcoreas Thank You this fixed it for me
@williambeasley838
@williambeasley838 2 жыл бұрын
@@fcoreas This worked perfect for me! thank you.
@oguzsenna9990
@oguzsenna9990 2 жыл бұрын
@@fcoreas eyvallah francisco
@abhishes
@abhishes 3 жыл бұрын
After we complete this course, what books / tutorials should we attend to write more advanced momentum and value trading strategies?
@esteban_ruiz
@esteban_ruiz 3 жыл бұрын
This is a loaded question. Look up books about algorithmic trading strategies.
@abhishes
@abhishes 3 жыл бұрын
@@esteban_ruiz any particular one which comes to your mind?
@wliterow
@wliterow 3 жыл бұрын
@@esteban_ruiz try the Bible !!
@esteban_ruiz
@esteban_ruiz 3 жыл бұрын
@@wliterow I wish the Bible told me about trading strategies lol
@wliterow
@wliterow 3 жыл бұрын
@@esteban_ruiz it does, the meek shall inherit the earth , the rich will have heaven
@juanperilla9170
@juanperilla9170 3 жыл бұрын
Great content. Keep it up!
@victorbmadslund
@victorbmadslund 5 ай бұрын
I’m doing the cs50 Python course atm, but will follow this roadmap when I’m done… thanks !
@the_phenomenal_content5377
@the_phenomenal_content5377 3 жыл бұрын
Thanks u soo much sir U provide free education ❤️❤️ Love from india
@vivekrathore6817
@vivekrathore6817 9 ай бұрын
Sandbox testing has been deprecated. Is there any alternate free data api that we can use in this project?
@WOLF91
@WOLF91 3 жыл бұрын
This is incredibly valuable info
@nameno480
@nameno480 3 жыл бұрын
OMG. He talks so fast, but explains concepts so darn clearly..... 👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
@omgitzcoola
@omgitzcoola 3 жыл бұрын
playback 0.75 might help a bit
@nameno480
@nameno480 3 жыл бұрын
@@omgitzcoola I love fast speakers:) just amazed by him.
@michaelharris5377
@michaelharris5377 3 жыл бұрын
'Citadel'- Cue in Fortunate Son and flashbacks of Vietnam with my WSB brothers.
@chaddsmith3354
@chaddsmith3354 Жыл бұрын
It seems IEX has closed access to the sandbox mode unless you have an account which starts at $49/mth. (30 day free trial).
@ywang3184
@ywang3184 3 жыл бұрын
Thank you for the good instruction.
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
Good People Restore Faith in Humanity: A Heartwarming Act of Kindness on a Bus #shorts
00:32
Самый большой бутер в столовке! @krus-kos
00:42
Кушать Хочу
Рет қаралды 6 МЛН
АВДА КЕДАВРАААААА😂
00:11
Romanov BY
Рет қаралды 5 МЛН
Predict The Stock Market With Machine Learning And Python
35:55
Dataquest
Рет қаралды 590 М.
Python As Fast as Possible - Learn Python in ~75 Minutes
1:19:41
Tech With Tim
Рет қаралды 1,7 МЛН
How Financial Firms Actually Make Money
22:40
QuantPy
Рет қаралды 314 М.
I Tried Day Trading w/ a Trading Bot Algorithm
14:01
Daniel Inskeep
Рет қаралды 841 М.
James Simons (full length interview) - Numberphile
1:00:43
Numberphile2
Рет қаралды 897 М.
NodeJS 22 Just Dropped, Here's Why I'm Hyped
14:31
Theo - t3․gg
Рет қаралды 29 М.
How to Code a AI Trading bot (so you can make $$$)
35:09
Nicholas Renotte
Рет қаралды 414 М.
Learn JavaScript - Full Course for Beginners
3:26:43
freeCodeCamp.org
Рет қаралды 16 МЛН
Node.js: The Documentary | An origin story
1:02:49
Honeypot
Рет қаралды 434 М.