10 Algorithmic Trading Mistakes to Avoid!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
algorithmic trading can be tough especially when you're just starting out since there are seemingly so many things to look out for in this video we're going to cover some of the biggest and most common algorithmic trading mistakes avoiding all of these mistakes can lead to a significant improvement in your trading performance with that being said let's jump right into it when developing a trading algorithm you use historical data to test your algorithm and analyze its past performance this gives you great feedback as to how good or bad your algorithm would have performed over the chosen timeframe even though back testing is a great tool that is fundamental for any algorithmic trader it can also be dangerous if done incorrectly back-testing can do more harm than good the first algorithmic trading mistake that we're going to look at is a classic back-testing mistake one of the biggest and most common back-testing mistakes is overfitting overfitting is the act of over optimizing your algorithm to the test data let me give you a specific example to clarify this this is the price chart of X Y Z over a selected week from this pricing data you could create a trading algorithm that buys X Y Z on Monday says X Y Z on Tuesday bias on Wednesday and finally sales on Thursday over this week this algorithm is probably one of the best performing algorithms that exists but if you look at any other week this algorithm would probably perform terrible since the entire idea behind this algorithm is based on this one week of pricing data in other words this algorithm is over fitted to this week even though back testing this algorithm over this week shows great returns this algorithm is utterly useless so when back testing it is fundamental not to over optimize your algorithm to historical data one of the best ways to avoid overfitting is leaving a good percentage of the available test data untouched for example you can only use about 60% of the available historical data when developing your ergo as soon as you think your Elega is at a far enough stage you can test it on the untouched data if the performance is significantly worse on the untouched data than on the data he'd used to develop it you probably over fitted it another common algorithmic trading mistake is using data in your algorithms that isn't actually available at the time the easiest example of this is the daily high or low and algorithm that buys at the daily low and says that the daily high will have a phenomenal historical performance but in reality it won't really work because you don't know the daily high or low beforehand using daily highs and lows in your algorithm might seem like an obvious mistake but there are similar situations that aren't as obvious so always make sure that your algorithm only uses information that actually is known before they use it the worst part about this mistake is that it can be very hard to notice it since back testing won't help you realize that you're making this mistake an algorithm that uses future data to make decisions will work great in back testing but terrible with live data since it can't actually access future data one way to avoid this mistake is walk-forward testing walk-forward testing is basically the opposite of back testing instead of using past data to test your algorithm you use live data to test it but without actually risking any money so walk forward testing is basically the paper trading of algorithmic trading this brings us to our next ergo trading mistake they need not walk forward testing your algorithms compared to back testing walk forward testing can be quite tedious and boring bag testing allows you to test you algorithm on years of data in a matter of minutes whereas walk-forward testing takes one day for one day of trading data due to this walk-forward testing is often overlooked or ignored altogether this is a huge mistake since walk-forward testing is one of the best ways to test your algorithm without running the risk of falling prey to back testing mistakes great walk forward test results are far more important than great back test results back testing results can be good for a variety of reasons other than that your algo actually is good overfitting or using future data to predict the future are just two examples can lead to great back test results walk forward testing is immune to such errors which makes it a great tool to test your strategies with that being said it is important to be patient and not to jump to any conclusions one day or week of walk forward test results aren't enough to say whether your algo is good or bad the next major algo trading mistake that has made way too often is not accounting for trade costs when testing an algorithm most people account for the obvious trade cost such as trading commissions and feeds but besides these costs there are various other trading costs that can have a significantly bigger impact to your bottom line let me give you a few examples first off it is important to account for costs associated with liquidity depending on what you trade a good assumption is to say that you always have to pay the bid-ask spread when you're opening or closing trades furthermore depending on your trade volume you should also account for slippage if a security is thinly traded and you're using limit orders which you should if sometimes won't be able to get in or out of the position at all many back-testing engines don't account for this which can lead to unrealistic results last but not least depending on what you're trading there might be additional costs associated to your trading for instance if your short sale a given security it is important to consider the costs of shorting besides accounting for borrow fees you should also account for the fact that the sometimes might not even be any shares too short remember that not every security can always be shorted hopefully these examples give you an idea about what trading costs and restrictions you should think about when developing and testing your trading algorithms certain backtest engines already account for some of these trade costs so if you are using a commercial bag tester it can be a good idea to check how trade costs are being handled a different algorithmic trading mistake is going too big too soon after your algorithm has performed great use on back tests you might be excited and eager to test it out with real money but often your algorithm isn't actually ready for that yet instead you should continue refining it adding some safeguards stress testing it walk-forward testing it and so on only after you've done all these things and your attagirls past all the necessary tests you should start allocating real money to it but even then you should not start with any significant amount of capital instead start out small with very little risk depending on the implementation and broker integration some problems might pop up and believe me you much rather want to find these problems with a few thousand dollars at risk than with a few thousand dollars on the line another big trading mistake is not trusting your algorithm if you have done all the just mention steps there's no reason for you not to trust your ergo that doesn't mean that you should blindly throw money at it and let it do its thing but you shouldn't constantly interfere with what it's doing if you step in that manually change a trade every second day you won't be able to analyze the algorithms true performance since it never gets the chance to actually trade so make sure to give you a go some breathing room with that being said you should still keep a close eye on what it's doing if it starts making trades that don't seem to make any sense at all it can be a good idea to double check and potentially step in and override it the next mistake that I want to talk about is copying someone else's code sometimes you might be very inclined to just use someone else's code if you're just starting out that's one of the best ways to get started and get to know the basics of ergo trading but besides using other people's code to learn or as a rough template for you to start with you should stay away from copy pasting code that isn't yours the problem with copying someone else's code is that you might not fully understand what's actually going on so unless you really understand what's happening and fully understand the idea behind the code you shouldn't just use someone else's code instead try to develop your own trading algorithms this will also give you a much better learning experience and just to make sure I want to re-emphasize that this does not mean that you can't use parts of other people's code to help you understand the concepts or to learn how to do certain things you just shouldn't copy-paste someone else's entire trading algorithm and expect it to work for you the next algorithmic trading mistake is a general programming mistake that is especially common amongst beginning programmers namely not commenting your code when coding a trading algorithm were anything else for that matter you should always leave complimented comments that help you understand what your code is doing when programming this might seem somewhat unnecessary since at that point you'd likely understand everything but if you don't touch that piece of code for just two or three weeks it will already be much harder to grasp what's actually going on the more advanced the code is the bigger this problem becomes that's why it is fundamental to leave comments in SATA code that will help future you understand what's going on when writing the code try to leave comments so that even someone who has never seen your code before would understand it ix algorithmic trading mistake is only paying attention to the total return of the algorithms when developing analyzing and comparing your trading a gross you need some method to evaluate their performances the most obvious and easiest way to assess an algorithms performance is its total return at the end of the day you want to make the most money possible right well I'd argue that the way you make the money is just as important let me give you a very simple example for this example we will compare the performance of two trading algorithms this is the percentage return chart of the first algorithm over one year as you can see it has a total yearly return of 40% and here's the chart of the second ago which only had a yearly return of 30% which of these algorithms would you rather allocate your money to even though the first one outperformed the second one in regards to the total return it water was down 80% at a certain point most traders won't continue using an error off that loses 80% over a few months this means they would never even have experienced the recovery hopefully this example shows that the total return of a trading strategy is the best measure to evaluate and compare different algorithms therefore it's important to look at other metrics besides return some helpful measures are the risk volatility of returns max drawdown drawdown periods and more certain indicators incorporate metrics such as volatility risk and performance into one measure one of these indicators is the Sharpe ratio this is a great indicator that allows you to easily and quickly Gorge and compare the performance of your algorithms the last mistake that I want to talk about is not having a strategy when creating your trading algorithm there is a very important step that you need to do before creating a trading algorithm and that's developing a trading strategy a trading algorithm simply is a concrete implementation of an abstract trading strategy the trading strategy can be thought of as the idea and the algorithm the execution developing a trading strategy is all about coming up with lots of ideas testing their validity and moving on let me give you an example one possible idea might be that the two major market ETFs spui and QQQ are heavily correlated and there might be an edge in trading around the temporary price discrepancies the next step would be to partially test this hypothesis by looking at SP wise and qqs historically correlation if everything looks good you could start trying to build some sort of strategy around this idea if you want to see some more detailed examples of possible trading strategies I highly recommend checking out my recent video on the different types of algorithmic trading strategies that exist let's now quickly sum up the algorithmic trading mistakes that were covered in this video first make sure not to over fit your algorithms to the backtest data one way to avoid doing this is by leaving a certain percentage of the available back test data untouched for later secondly make sure that all the information that your algorithm uses is in fact known at the time that it uses it predicting the future with future information only works if the future is in the past next up make sure to take advantage of the benefits that walk forward testing offers walk-forward testing your eligos is a great addition to back testing otherwise it is also very important to correctly account for trade costs and restrictions besides the obvious trade commissions furthermore make sure not to go too big too soon when you're ready to fit you algorithm real money make sure to start out small and then slowly scale up if everything works fine if you algorithm has proven itself over and over again you should trust it this means that you interfere with it on every second trade otherwise you'll never know what your algorithm actually is capable of when developing your own trading algorithm make sure to fully understand and think about every aspect of it this means that you shouldn't just copy someone else's code and hope for the best in addition to that it's important to thoroughly comment out your code so that you can always come back later and still understand what's going on the ninth algorithmic trading mistake is not accounting for risk when evaluating your algorithms performance obviously the total return of the algorithm is important but it's just as important to understand how you Agger achieved this return last but not least make sure to develop a trading strategy before you try to create a trading algorithm trading algorithm simply is one concrete way of implementing your trading strategy I highly recommend checking out my video and Egger it be trading strategies to get some inspiration with that being said I truly hope you enjoyed this video and learn something new if you have any suggestions for future videos definitely make sure to let me know in the comment section below otherwise make sure to smash the like button subscribe and turn on the notification bill for more content like this thanks for watching you
Info
Channel: TradeOptionsWithMe
Views: 45,008
Rating: undefined out of 5
Keywords: option trading, options, option spread, stock trading, trading, options trading, how to trade, tastyworks, trade profitable, broker, broker platform, options broker, options education, option education, option basics, options basics, trading strategies, trading broker, stock market education, algo trading, algorithmic trading, quant trading, quantitative trading, trading mistakes, trading tips, algorithmic trading mistakes, robo trading, automated trading
Id: gvDZM0PqXHM
Channel Id: undefined
Length: 14min 32sec (872 seconds)
Published: Mon Jun 22 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.