Turning to data for a trading edge · Dave Bergstrom, quant trader

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
chat with traders episode 103 this is your key to the minds of tradings elite performers those who profit in relentless markets here on the chat with traders podcast you'll hear about the skill sets and tactics that lead winning traders to win so you can level up and become a better trader here's your host Aaron Fife field [Music] what's up boys and girls welcome back on this episode I am joined by a con trader who works at a high-frequency trading firm though you might be surprised to hear he started out on the exact same path that many retail traders do his name is Dave Bergstrom Dave is someone who I've followed on Twitter for quite some time he always has interesting things to share and I've had the pleasure of speaking with him numerous times also now the thing that I think makes Dave quite unique from most traders who have been on this podcast previously is how he uses data mining techniques during strategy development data mining in the realm of trading often has a negative connotation attached to it but Dave believes this comes from bad practices and poor evaluation of methods so in addition to data mining and ways to reduce curve fitting we also talked about escaping randomness learning to write code Dave's three laws for strategy development setting expectation and a few other things too and lastly there are two lengths I'd like to share with you so the first one being build alpha calm dave has recently developed a software package which has the functionality to perform many of the techniques and different forms of analysis that we discuss on this episode so if you're really into this sort of thing you can take a look at that at build alpha comm and second of all dave has kindly offered to answer any trading questions that you may have so if you'd like to take advantage of this simply go to chat with traders comm slash 1:03 scroll to the bottom of the page and leave your questions in the comments area our team that is it without any further delay please welcome Dave Bergstrom you know let's start right at the very beginning what was your introduction to trading how did you start out oh geez so actually back in undergrad I was on track to go to law school and about halfway through realize that I wanted nothing with law school so I kind of searched around for you know other things that you know maybe I could pick up and change careers with you know halfway to go in school and you know the market on the side seems like a pretty good idea and it had a little bit of a nudge for my father who worked at dumb Loni foods and was kind of involved with their you know corn hedging and all that you know and all that for their ingredients but yeah so just kind of you know just see about it hear about it you know think it's AG act an easy way to make a get rich yes so that must have been a pretty big decision for you to drop out of law school and pursue something like trading well yeah I mean just just to clarify I never actually made it to law school I don't want to discredit any lawyers or law school people that I was yeah that was that was the career path but yeah to drop out I mean I did have some early success trading they kind of made that decision a little easier but knowing what I know now I'm not sure that that should influence the decision at all okay so how were you you trading in the very beginning like what were your decisions to buy and sell based upon yes when I first started I think I took a pretty common route now you know I kind of just search for information on the internet and found like Finance Twitter and all these chat rooms and you know podcast which I you know wish yours would have been around back then would have saved me some time but yeah I mean sigh you know I was trading basically you know chart patterns momentum stocks you know a lot of the popular Chatwin's I kind of been you know watching them grow because that they kind of all started evolving what I kind of got into trading which was like you know right around and after the financial crisis so you know my beginning trading is much different than how I trade now okay so I mean how did you like how did you get into trading like we work in a a job at the time you still go into school like obviously you didn't just make the jump into full-time trading like how just kind of put things in perspective for us I kind of been a hustler I guess my whole life I'm actually the time in college I was selling a counterfeit like NFL jerseys and purses and you name it and that that seemed to be some good cash you know before you know stuff at the fan but I was able to put away a decent bit of money that I was able to you know fund a trading account with and I had some help you know along the way yeah dad yeah I think wrote me like a 2 grand check I've been able to pay obviously pay back but yeah it's it's you know humble beginnings I guess ok so you said that you were trading you know stocks based on momentum and that sort of thing is that right yeah I mean a lot of chart patterns I love the draw lines on charts in fact when I first started I think you know sending triangles and falling wedges and you know flag patterns pendants that that was pretty much my go-to so a lot of technical analysis and a lot of you know penny stocks and then I kind of evolved to I don't know if you caught a ball but kind of switched paces to uh you know high beta options you know so like your Apple Google Netflix and then I was kind of you know the same idea it's kind of just you know drawn lines on the options charts or the underlying you know and then buying or selling you know calls and puts based on whatever my my technical analysis was telling me at the time ok and how are you going through this period like were you doing alright we making money yes I would have periods um Robert kind of you don't get ahead and get to a new equity high in the account but I would inevitably give it back and could never really figure out why and it just seemed like you know it just felt like someone was always out to give me like you know I'd make some money and then give it back make some money and give it back so there's a lot of inconsistency but you know enough success to I think you know keep learning and keep you know chugging along yes he said that you didn't know why you were giving it back you know now with a lot more experience under your belt do you understand why you were giving it back in those early days yeah yeah I really didn't have much of a system if you will what really was uh I would call now it's I call it escaping randomness and I never was able to really escape randomness if he was I think if I could simplified its if you have like a coin toss you know a coin that's 70% heads 30% tails but every time you know the first couple flips happen if they're not winners for you if you're betting on heads is 70% you know you'll make a tweak or an adjustment but what that does is it kind of restarts you back at you no coin flip zero or trade zero and that's what I was doing and you need to flip the coin you know a thousand times do you get that seventy percent to play out but if you tweak you know something and you go back to zero you're back in those early coin flips that are essentially random yes yes that's a very good point and I guess this is probably around the point where you started to pursue more of a quantitative approach to trading would I be right sort of so actually I had you know big change of heart you know kind of changed career paths if you will and I Banda moving down to Florida and met my boss and might have taken a job as like a training assistant at the high-frequency trading firm that I work now I was completely unqualified I went in there you know telling about how I trade ascending triangles and you name it and this is somebody that's you know worked on Wall Street and work for Citadel and you know a market maker for the CME and and I could just tell that he's you know he's like well that's not really how I go about it and that kind of opened my eyes up to you know from the way that I was I taught myself was that there was technical analysis and fundamental analysis and then I was kind of you know my world opened up to this this quantitative analysis this this Third Way if you will and and that kind of you know put me down a whole new path you had it I had to do it a different way to find I think consistency so what did you move to Florida in the first place did this job come up before you actually made the move or how'd that work I just kind of have got a whim yeah and I don't you know God works in mysterious ways I guess you know I can't really explain it okay so you know even though you walked into the office of this this hft firm and you were talking about how you trade with technical analysis and that sort of thing and you know that wasn't how they do it how did you end up getting a position there with that firm you know the initial job was uh I really just knew I wanted to be involved with the markets so I really searched for anything and this job was really just a trading assistant so it really wasn't initially doing anything that was you know making it to the market if he wasn't getting any money put behind it so you know like you hear the oldest stories out people start off as like a clerk or you know run around the floor that's you know kind of how I I pictured you know just in modern times if you will and did you try to get any other trading jobs before you landed this one no like I said Cod works in mysterious ways I just kind of lucked out right right Co so when she started there what what sort of things were you doing you know really getting used to just how to look at data you know which is not really something is really you know preached in the technical analysis were all the few will it's you know it's more visual and and they were obviously you know much more not much more but they are data-driven so you know you have I had to kind of you know a lot of it was basically like you know creating presentations or taking some of the data and then you know you know making nice reports but it's slowly morphed into where I was able to you know do some of the analysis you know with basic Excel or so you know I taught myself how to program so you know kind of transition into it you know more useful role if you will yeah so when you say looking at the data can you just maybe go into that a little further maybe give us some examples of like what sort of things were you actually looking for what were you looking at in the data well I think I don't want to get too much into what we're looking at but I mean it's it's really searching for you know edges you're trying to you know find some anomaly or you know some in pattern that you know can maybe lead you to make some money so once you did find something in the data that looked interesting to you like what was the next step from there so then you got a you gotta test it you have back tested and then from there you know you can make a general assumption on you know how good is this system or this this edge or this pattern that I found and then from there you you know there's a series of tests that you want to put it through before it goes to the market but it but at that point I'd really didn't understand that so I had what I thought I found these great edges or systems and I was like okay I'm now down this quant road I have these systems that have some data behind them let's trade them and I still had inconsistent success so it's you know the learning process went on for years I think I mean it's ongoing obviously but never ends yeah yeah and once you'd been working in this firm for you know a little while did your prior conceptions about trading begin to change like quite a bit you know you'd come from the school of technical analysis now here you were working in a high-frequency firm who was all about just looking at the data digital digital prior conceptions about trading change in any dramatic way yeah absolutely just the whole idea of testing everything like you know you hear a lot of things like you know it's it's bullish if the markets above you know whatever moving average but it's like now I had a way to I needed to test this I couldn't just say something like that without having the data to prove it and I think that was the biggest thing is that you know there's a book I read and I hate to give a free plug but evidence-based technical analysis where it you know it's basically like there's subjective technical analysis which is really what I was doing and now I've transitioned to this objective technical analysis and I think that's a major key yeah I mean a lot of people when they use technical analysis and they trade in a discretionary way there's a lot of newer nuance for pronounce that right - what they do was it hard for you to kind of remove that nuance into a way that you could programmatically test it well I kind of moved away from chart patterns because I think chart patterns are still and by chart patterns I mean like the falling wedge and ascending triangle those things I mentioned earlier I think those are tough to program and tests I've kind of I kind of moved away from from that other than that I think you know you find you kind of let the data speak to you you kind of let the data show you where the patterns are as opposed to going in hunting I mean I'm a bit of a data miner now yeah and that's something I really want to pick your brain about let me get into things in a little bit just before we do though what are your views on technical analysis these days I know you you've obviously said it's not something you use anymore but what are your views on technical analysis I don't want to discredit it because you know things work differently for different people and I'll never tell anybody not to pursue anything I think you know that was a valuable part of my journey and it may be for somebody else but for me I think I need something you know a little more concrete I think it's you know it's a little voodoo magic if you will at times but I think you know there are ways that you can use it to actually you know gain information but it's just you need to make sure the data is confirming okay sure yeah I mean that's that's a really good answer so I want to pick up on a point you made a little earlier about how you learned how to program I don't want to brush over this because it's a pretty big deal why did you decide to learn how to program and how did you go about it well I'm more or less how to I wanted to get out of the the trainers assistant role if you will and kind of move into you know the trade desk you know everyone wants to you know be a trader that's why I got into it and I realized that Excel you know really just wasn't going to cut it with the amounts of data that high frequency you know firms go through so I knew I had a program to get to the next level and to be honest to me I think learning the program it's the best trainer mate because if you think about it the risk on it is very small but the gains on it you know it's asymmetric risk or hands down it's the best trade I think somebody could make and I look at it now is it's it's a superpower you know it's I couldn't imagine trading without programming now what do you think it is a superpower lucky lucky say I just you know I for example you see someone on Twitter they'll they'll mention a stat and I can instantly go and in program a couple lines of code to look for that same stat and and I have the same information or you know you have an idea in the middle of the night or in the shower I can instantly go test it out or just the whole idea of data mining in general is I can burn through and people probably hate that word burn through but you know I can whip through data and find patterns way faster than you can by hand it's just such an advantage in so many different ways yeah so how did you actually go about learning to program like where did you where did you kind of start my think I read you know a handful of textbooks so C++ is obviously the main language we are using for the high frequency trading just for you know gives you the you know the fastest response time if you will so that's I kind of just picked one you know knowing now that's probably had a fairly difficult one to start with but I read everything I watched you know YouTube videos tutorials you know Coursera you know free courses there's tons of resources but uh just how to you know kind of be diligent and was lucky enough to find you know some people that would have answered questions you know when you get stuck because you know it's no easy task but it's you know it's worth it yes so how long did it take you to become somewhat fluent with with a language I think you said you started with C was it C+ or C one of those yeah C C++ they're kind of learning about the same time really didn't understand the the differences when I first started never really been exposed to you know anything in that field but um yeah probably took you know a couple months just to get like a basic understanding and but I kind of had an advantage of you know being around programmers you know all day and talking to them and and being in that environment probably made it you know quite a bit easier but yeah that's it's it's the time time-consuming task with how to doubt yeah so when you say it took you a few months to become somewhat fluent in this programming language is this something you were just doing after hours or was this something you were doing you know during the day at your job as well yeah actually the luxury of being able to do it on the job and it's you know Express to my boss who's you know I couldn't speak highly enough about but yeah he was able you know he put some you know some basic tasks if you will together for me they kind of speed up the process for me so you know I was I built like technical analysis libraries because he knew that's what I was familiar with in C++ and I think that's probably a good way to start for anybody is you know learn how to just read in data and then just you know learn how to build it a technical indicator you know whatever your favorite one is from that you know open high low close data that's essentially how I started yeah so do you have any other advice for someone who is considering learning how to program like any tips or pointers for how to maybe speed things up a little bit because it is quite a big task quite a big challenge to take on yeah I would say to make sure you one look at a few different resources because I would read something and be stuck and then I would read the same concept in another book or watch it you know on a YouTube video and it would completely click right away so I think you know sometimes you just you just don't see it from the way that that author presented it and the second one is try to find people that do it that you can ask questions to because you'll never be get stuck and to me being able to go to my boss or you know someone else and say hey I've no idea what this means and I've looked at two different resources or three different resources I'm still stocke you know and in that you're gonna need that I think yeah and that first point you made that's actually a really good point about looking at multiple resources and you know for anyone listening is probably aware that I've been learning how to program over the last twelve months or so and Stack Exchange is awesome for that because you know someone will post a question and pretty much every question you could think of has already been asked on that side yeah I still use that everyday I mean that that's a lifesaver yeah and you say like a bunch of different answers to that that question in different ways of doing it in some ways are a lot easier to get your head around there might not necessarily be the cleanest code usually the easiest sort of things to implement have the codes not as efficient as it could be but yeah it's it's good because you can see you know different ways of doing what you want to be able to achieve so ya know good advice and why did you decide to learn multiple languages like you started with c-plus I know you also know I think it's Java and Python now why did you decide to learn more than just the one well one was a we used primal primarily you know a few in the office so that was kind of it was almost out of necessity but I think it's beneficial because I think certain tasks lend itself you know better to different languages like I think you know like the higher-level languages like Python and Perl or are are real simple for just doing like the basic data analysis and searching for edges but you know if you really go to implement some highly complex strategy you're probably going to want something with a little more control like you know C++ okay so if anyone's starting out what language would you suggest I think Python I actually was just talking to a buddy of mine then he's been talking to recruiters for come you know quant jobs and they all are like demanding Python and to me it's it's relatively clean it's simple there's so many open-source libraries you know free resources and it's it seems to really be you know growing in finance it's it's almost like I felt obligated to learn it to be honest you know when you're talking to your buddy who's looking for people who know Python as a programming language what sort of what sort of other qualifications are they looking for are they just looking for someone who knows how to program in that language or are they actually looking for some sort of higher education certificates they did I think he mentioned you know machine learning background is obviously preferred now that seems to be the big buzzword and but other than that you know I think it's probably you know statistics probability anything math based physics is probably you know high on the list but yeah I don't have much experience to be honest with that yeah yeah no that's cool so let's talk a little bit more about your trading your kind of approach you hinted earlier that you know you describe yourself as a bit of a data miner usually that's not a good thing in a trading sense usually when people hear that they think you know overfitting and that sort of thing but explain to us why you kind of consider yourself to be a data miner and while it's not such a bad thing okay I just think there's just so much information there's so much data that there's a you know there's edges out there but I'll never I may never find them just by pure luck like I think you know we talked briefly about you know if you start with you know this moving average cross of a 10 and 20 and I start with you know 30 and 40 and yours turns out to be terrible and mine seems to work well and then you keep searching until you eventually find mine you know it is it are you data mining or was I just lucky that I found it originally and I think I think if you do enough to prevent against you know the overfitting and the over optimization I don't think there's anything wrong with using the computer as this you know a search you know a search tool and define these edges yes so as a data miner let's just call it that as a data miner what are you actually doing to find edges like how are you finding edges in the data are you running machine learning algorithms and using machine learning techniques yeah I've done that and you can you can be simpler than that too but now I just kind of have built this almost master program if you will they can adjust you search for a fitness function you know let's say you know P&L the drawdown ratio or profit factor or win percentage or whatever it is you want and you kind of just you know search all these different combinations until you find strategies that you know meet this this threshold for that fitness function so that you say I only want strategies that have a profit factor over two and a half and you just run the search program until you find you know X amount of strategies over two and a half profit factor okay so doing this sort of thing do you have a hypothesis to begin with like do you have the sort of Ages that you that you might discover is there a fundamental almost a fundamental reason for why that might actually work or you pure lis just if the if the data shows there's an edge there that's all you need yeah I don't I don't have one going in I just kind of searching like you said but if I if it does seem to make like logical sense after I found these strategies then I would put a little more confidence behind the ones that did seem to make sense on their own okay if that makes sense yeah and just so we're clear here and you know we don't lose anyone when you talk about finding edges how do you how do you explain that what it what are edges in your view jeez we probably do a whole podcast on this like a simple way it would just be something that has a positive expectation so if you think of like the coin flip game it's 50/50 chance of landing on heads or tails but if the payout on heads is 2 and the loss on tails is only 1 then you'd have a positive expectancy and I think that's probably the simplest way that I could explain like edge like that's the most rudimentary you know explanation there's there's plenty of ways that people define edge now as we're talking about data mining here and you know also mention that a lot of people when they hear data mining in a trading sense immediately think curve fitting what sort of measures D take to prevent curve fitting as much as possible this is like that I think the most important part if your data mining so a few like simple ones I don't know that I want to give away all the sauce but I think you need that like you know a minimum number of trades you know in and out of sample testing cross-validation where you would basically slice the data into pieces and test on the different pieces keeping one of the pieces for on a sample and rotating that each time through some other ways are you know making sure you don't use parameters that lend themselves to optimization like looking at patterns for example like is the high above the high of two ago is much better than just picking a moving average and finding the best length like I think yeah we you probably get it deeper into that with that that seems to be a big mistake with data might be a lot of people associate it with just optimization okay yeah well let's break those few things down a little more so minimum number of trades how do you think about that okay so um for a for every um I guess rule and in the strategy I would like to see a minimum number of trades so if I have you know three four or five rules and a strategy then I want you know at least 500 times each rule so you know 300 trays I need 1500 trades or three rules rather I need 1500 trades just to make a simple example okay so do you just want to explain I think that's a good point you bring up but do you just want to explain that why you want to do why you want more trades for the more parameters or rules that you have in a strategy that's that's tough for me to say I mean I it's generally has to do with allowing the law of large numbers to play out and make sure that you found something that's real like for example if you flip a coin and again to go back to this but if you get seven heads or eight heads out of ten flips it's tough to say that that coin is really 70 or 80 percent likely to land on heads but if you were to flip the coin a thousand times and it came up you know seven or eight hundred heads then it's much easier to conclude that that's you know not a fair coin and I think the same thing can be said about trading you know you only have a small number of trades it's tough to say that that's a real you know robust strategy but if you you know can show that the edge persists over a large number of trades then you have much more confidence trading that you know moving forward yeah I mean I think it's probably also fair to say that the more rules that you add to a strategy that easier it is to curve fit as well would that be correct oh yeah absolutely yeah so how do you split up your in and out of sample data like do you have a certain ratio that you'd like to work with yeah so usually I you know I'll default with 35% out of sample but I'm actually researching this now because moving that window size is actually resulting in me finding different strategies which I'm you know that's obviously I'm still working on why or how or what that means see you mentioned something very interesting to me and that was about how you try to avoid using indicators or parameters that have a look-back aspect to them so that might be the highest high of the last ten days you know just as a as an example if those the sort of things that you try to avoid as rules for your strategies what sort of things do you like to be the signal or what sort of things you like to focus on in your strategy well without giving away too much secret sauce I think like nonparametric things like I think you know like counting measures are valid you know and and things that yeah I don't know how far I want to get you know down this path but yeah like I think it's okay to use technical indicators and stuff that have look-back parameters but I just don't think it's smart to optimize those look-back parameters I think if you want to use one is like a regime filter or something like that that's completely valid and that's something that I'll do but to optimize you know should it be the 19 or the 27 of the 50-day moving average to me that's kind of murky water okay I mean when you sit counting measures what's that referring to like you could count consecutive higher highs okay or you know consecutive you know negative closes or something you know something like that yeah yeah but looking at your Twitter feed you post a lot of screenshots of kind of signals that your that your systems are generating they seem to be very focused around volume and volatility to these sort of things play a big impact yeah yeah yeah the two two things I really tend to like to look at I think that like market regimes are very important and I think that volume and volatility are great tools that put context around the market and define you know we kind of refine I guess what your expectation should be obviously mentioned that you Twitter fate that you posted on Twitter this must have been a few months or a couple months ago a really interesting graph and on the left-hand side it showed an equity curve just on its own and then on the right-hand side it showed Monte Carlo analysis or distribution and you drew in that Monte Carlo analysis that where that equity curve actually said and I thought it was a very powerful graph I'm actually gonna pull it up and I'll put it into the show notes a chat with traders calm because I'd really like everyone who's listening to this to actually see that graph I think was very powerful but I think a lot of people perhaps didn't really understand what was going on there would you like to explain that the graph to us and make it I know we don't have any visuals to guide us here but you know just try and make it as simple as possible to understand what was going on there and why it's important to I guess understand us yeah I think there's like three key points they kind of turned my trading around and I think all of them have to do with having unrealistic expectations and I think like the simplest example is if you take a backtest drawdown and then people will kind of size their system or allocate enough money to that system based on you know that worst-case scenario or maybe they take the backtest drawdown times one and a half and that's kind of what I was doing that it just wasn't enough so then I learned about Monte Carlo simulation which is basically a reshuffling of the order of the trades in its simplest form and in kind of recalculating an equity curve for each one of those reshuffles and that's essentially what that graph that you're referring to is and I think if you look at the the single equity curve that I had hand drew in to the the Monte Carlo Equity curves you could see that that backtest was at the very top of the distribution or of the it was one of the best performers if you will of the reshuffling z' and to me people will look at that single back test and think that a lot of this made you know I don't remember in that example what it made but it made let's just say it made 50 grand and you know a hundred trades or something to keep it simple and if you look at the distribution or the Monte Carlo curves from the reshuffling 50 grand is highly unlikely to repeat itself in the next 100 trades so when people's begin to trade you know though they'll realize you know after 50 or 75 trades that they're nowhere near you know that they're not going to make 50 grand and a hundred trades and they think that their system is broken and it's it's not really a matter of it being broken it's just a matter that you've had unrealistic expectations going into the next 100 trades and I think looking at that distribution and knowing where your equity curve is in that distribution helps you create more realistic expectations and can contribute a lot to survival and then ultimately success yeah yeah that's it's a really important point and it like I said I'm gonna dig up that graph and I'm gonna put it in the show notes at chat with traders comm it will actually be chat with traders comm would slash the number of this episode which I'm not sure what that is at this point but you know you also talked a lot about variants testing is this much the same thing or is variants testing slightly different so I've variance testing it - it's similar in a way but I noticed a big problem that I had and I was trading was if you would ask me where do I expect to be in the next end trades you know the next 100 trades 500 trades I couldn't have answered that you know even a few years ago and it's it's much more complex than just the average trade amount times that number of trades you really need to think of it as a distribution or a possibility of outcomes so this variance testing is essentially I like a simulator that takes the you know the winning trades of losing trades and your winning percentage and it creates these 1,000 hypothetical equity curves of where you could be and the next end trades this is actually saw from you know working on building from you know to release to the public but I think that knowing where to be in the next end trades is really important to success but then with variance testing what that is is what if you vary your win percentage is your strategy still profitable so what I do is I'll take a back test and let's say it has a 61% win rate but I want to know what's the light where will I be in n trades if in the next you know entry my winning percentage is only 55% is it still a viable strategy and I think this type of you know simulation is kind of missed by a lot of systems traders and I think it contributes to the unrealistic expectations I think you have to have a range of outcomes based on a variety of possibilities because as we know the market is never never gives you really what you want ok Dave let's talk about the three laws I think you described it as three laws which you trade by so let's spend a little time on each C's I think though each really interesting obviously we were talking about these off here number one is you said that you much rather prefer asymmetric risk to reward would you mind explaining that for us yeah so I think you need to have bigger wins than losses I think you want to be you want to have long vol characteristics as opposed to short vol characteristics or probably better to say more like trend-following versus mean reversion because and what I mean by that is I mean I'd rather have a lower winning percentage but a higher payoff then a very high win percentage and a very low payoff because I think as you move into real trading you know you take a system from production and testing and you take it to live trading you know the randomness happens in in it you never really get the expectation from the back test or whatever testing you want to do and I think it's safer to be you know have the the long haul characteristics as opposed to the short fall characteristics so I I tend to prefer you know bigger bigger wins and losses and I'll sacrifice a little bit of my win percentage to achieve that okay that's fair enough and number two number two I think it's probably a better way to phrase this but yeah I think you said that all bets mean the same thing to your bottom line I'll let you explain that one yeah so let's say that you have you know ten systems that all have you know relatively the same characteristics or you you want to take even for discretionary traders you want to take ten trades off of the same pattern whenever they appear it's it would not it would not be in your benefit to have one of those trades be done with five times the size as the other nine because if that one that you size up on wipes out you know six or seven other winners then you really had a disservice to yourself because you're really not allowing and I don't want to give it away the third law but you're really not allowing you know the expectation you know the math to play out you're kind of just putting all your eggs in one basket even though you're making ten trades one of them you know means a lot more to bottom-line okay so you're obviously saying this from the position of being a quant you know for discretionary traders who do you know size up on certain trades and do risk more on certain traits do you think that type of approach is flawed in some way yeah like I said I never want to discourage anyone from trying or testing anything and what works for someone else or doesn't work for me you know may work for someone else so I you know disclaiming with that but I do think that that's dangerous I really try to avoid excitement in my trading I think trading should be boring and I want the expectation to play itself out over the thousand coin flips as opposed to having you know ten coin flips and you decide you want to bet your whole lot on the eighth flip you know that's to me that's kind of crazy you know if you're you want to bet your winnings from you know the four through seven flips on the eighth flip that to me is crazy I kind of just want to stay in the game and I want to get to my thousand flips if you will so that of course leads us into the third law all that you trade by and that is the law of large numbers you know you want to execute your edge as much as possible do you want to do one explain that one a little further yes I think we kind of brushed upon it earlier and again they go back to the coin flip if you have an unfair coin hurry it did 70/30 I think was the numbers we used before and you flip it ten times you might find the details was the 30% might happen seven out of those ten times or eight times out of those ten times but if you flip that coin a thousand times then that heads that have a 70% chance it's going to be around 700 and I think it's important if you do the research and you find a positive edge to allow that positive edge to play out if you only do a couple of you know trades or coin flips you really you might not experience what the expectation is just because of randomness and like I said earlier you need to escape that randomness you need to get to you know a lot of number of trades to assure or ideally to assure that your edge will play out yes so I want to ask you a few questions around this because you know this is something I've been given a little thought too lately myself how do you actually increase the number of trades that your strategy produces well I don't know that you can take an existing strategy and increase the number of trades I think you probably have to you know change timeframes or change you know the actual strategy itself I think that'd be that's kind of dangerous water to just try to get an existing idea to trade more well that's yeah I mean that's that's kind of what I'm getting at like D because you want to tap into the the law of large numbers will you only trade a strategy that's perhaps an intraday strategy like end of day strategies you know you've only got a limited amount of data and obviously they take a lot longer to play out are you only focused on intraday strategies they only focus on trades that you know hold for two three hours yeah I think obviously like the higher frequency data lends itself you know to that you know the law of large numbers obviously much better I think that's why there was such a migration towards that you know that industry when computing became so prevalent in finance but I think it's okay to still trade like daily timeframes and stuff and I think like the the variance testing I do or the monte-carlo testing I do you know if you're happy with those simulation resolve and they show you that you know in let's say you know 100 or 200 trades this is where you can expect to be and you're happy with that distribution then that's then that's fine you can still find I think strategies to do that I just think it's easier to get to a higher number obviously with higher frequency data and doesn't have to be high frequency data just you know half an hour bars you know 15-minute bars or something like that yeah yeah okay would you ever consider like I don't know how you approach strategies in this sense like do you create strategies that work on one market like you might try to create a strategy that works on the e-mini S&P 500 futures you know if you have a strategy that looks somewhat promising on that market but the number of trades and high enough for your liking are you going to bring in other markets and try and bring those into the basket of markets that your strategy trades on yeah that's definitely a way to go about it you can you can definitely do that it's not necessarily something I I do I do like to see robustness across markets but I will kind of shy away from something that I don't think has enough trades so it's it's tough for me to say but yeah I think robustness across markets is definitely preferred although not you know needed assuming you have enough trades yeah and while we're still on this point I'd like to ask you how do transaction costs factor into this like is there a point where you are better off trying to make more profit on each trade rather than trying to take more trades because each time you take a trade you've got slippage you've got brokerage fees and whatever else is there ever a point where yeah it pays to try and look for more profit in each trade yeah I think it is difficult you know with like a retail accounting to allow this to play out this law of large numbers because you do run into very high transaction cost but I'm not exactly sure how you can really combat that now that I think about it and I'm kind of you know in a situation where I haven't really had to think about this problem in a while but I think there's probably some happy medium where you can you can get a strategy that doesn't kill you with transaction costs but maybe doesn't have you know a thousand trades you know maybe only a couple hundred or something but I think it comes back to that you know that variance testing and where do you think it's going to be and are you happy with that distribution you know is it something you're willing to allow to play out or no and and you have to obviously factor in your transaction cost into that simulation so I'd like to ask you a couple questions about high-frequency trading just in general about the industry you know as someone who's on the inside usually I guess kind of in the media 8 shifty cops a really bad rap more often than not why do you think this is oh I hate to be a spokesperson for all of hft I think it's tough for me to say I think a lot of the the bad rap it gets is from like the Michael Lewis book and what people will call like latency arbitrage which is actually not something that we do because we only trade futures through the CM e so we're only one exchange and I think you know hft it's it's also very easy just to find a scapegoat the training is very tough and I think you know sometimes people will just look for a scapegoat I'm not so sure that a lot of the bad rap is justified but I again I'm biased yeah yeah no that makes sense and you know as someone who is involved in high frequency trading do you yourself see any negative aspects to it no no I mean I think it's again I'm biased but no I don't like I don't think you know at least from my view it's like you know nothing we don't do anything predatory I'm not so sure that I'd you know believe the claims and you know that the book I mentioned and no I don't think it's it's bad in any way I think you know if anything it's probably beneficial and you know I know people can find articles on both sides of this coin but yeah from my view now yeah so how is the hft landscape different from equities and and futures like is in perhaps some negative aspects about it in an equity space because obviously the feet the market structure for futures is totally different yeah I just think that that's like the one the one area that the people really dislike is that the whole idea of you know the like said latency arbitrage but where people race from exchange to exchange or at least that's what people are you know speculating is happening and I think that that is you know that's that's a tough call and a lot of different opinions on that but it's like I said it's not something that we do and it's not something I'm you know to Hearst and to be honest yeah and when we were speaking before the call you said to me that you you think the the heydays of high-frequency trading might be coming towards an end what do you think the future has in store I don't know that's coming to an end I just think it's it's obviously much more difficult as time has gone on as more people come into the space and a lot you know and a lot of the strategies you know get exposed or people jump from shop to shop or something like that but I think I think it's tough because I I we kind of have this debate in the office on you know is it is it what I just mentioned is it you know too many players and too efficient or is it just kind of a product of the monetary policy you know laid out by the Fed and the other central banks because it that monetary policy it really isn't conducive to a two-sided market which is obviously what hft needs so it could be a mix and I'm for the truth you know always lie somewhere in the middle but yeah it's obvious it's definitely much you're getting much more difficult but the point my pin point my finger on it I'm not sure sure yeah I mean I'm actually hoping to get Manoj Narang on the podcast I've actually been scheduled like five times to do the interview but uh he's a busy man and hard to pin down so I'm really keen to get him on and get his take on all of this and that would be great that would be great I had his brother on rishi Narang on like episode 54 I think somewhere around that point and he was he was awesome big fan of his book also yes yeah anyway Dave this has been this has been really good man I've totally enjoyed this now you know some of the things we've talked about here are a little bit tricky to implement and test and that sort of thing you've been working on a software package build alpha I believe it's called do you want to just tell us a little bit about what you're working on and you know how this is might be able to benefit from using that yeah yeah that'd be great and I like I enjoyed doing this too by the way this thank you very much for the opportunity but yeah there's others I'm putting together some software that essentially would allow it's I've been using it for a while but I'm kind of building the public version that I'm I'm thinking about licensing out and what it will do is he basically would allow you to select from a list of signals you know maybe 500 at a time a thousand at a time we're kind of working on the memory right now and it would search for different strategies based on the exit criteria you give you provided and the fitness function you give it and fitness function you know win percentage pay off ratio profit factors Sharpe ratio something like that and all this has kind of built in and then what it would do is it would search for these strategies and find the best ones given that criteria those signals and the fitness function and then from there you would be able to view the strategies the other equity curves you would be able to run Monte Carlo analysis on it you would be able to do my variance testing on it and you'd be able to generate tradeable code for each and every strategy and I'm actually working on you know being able to create portfolios you know you can kind of pick and choose from these strategies that finds finds the one that create the distribution you and then add them to a portfolio and then you can kind of analyze the portfolio's the same way so I think this is really cool software and it kind of is kind of like the culmination of you know the tools in the process that I go through and have gone through and like you know kind of want to share it maybe I can help some people you know speed up their learning curve or you know you you know find some strategies they're getting an idea of how to you know how to how to go from signal to live trade absolutely so where can listeners go to find out more about this like is it available at the moment you have a website up for it what's the deal yes I do have a website up you know hopefully by the time this airs it'll be finished where you know 95% done I think but it's build alpha comm and you can reach me at David at build alpha comm or at deeper DB eurgh on twitter owesome build alpha calm and fight Dave on Twitter Dave once a guy man thank you very much for doing this so I I truly do appreciate it and I appreciate you letting me on I'm honored I think you're building something really cool here all right thanks man we'll talk saying I Thanks take care you've reached the end of this episode of chat with traders but rest assured there are more episodes loaded with real market insight and zero hype on the way soon so to stay updated with each great new release subscribe to the podcast on iTunes and we'd love it if you leave a rating and review we'll catch you next time on chat with traders
Info
Channel: Chat With Traders
Views: 34,392
Rating: undefined out of 5
Keywords: day trading, quant trading, algo trading, quantitative trading, algorithmic trading, system trading, systematic trading, swing trading, high frequency trading, hft, programming, python, java, c++, forex, futures, equities, data mining, quant trader, algorithmic trading strategies, algorithmic trading tutorial, futures trading strategy, trading strategies, trading strategy, profitable trading, trading with python, law of large numbers, probability, curve fitting, machine learning
Id: HrfSO_sREAI
Channel Id: undefined
Length: 55min 33sec (3333 seconds)
Published: Thu Dec 15 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.