The 7 Reasons Most Machine Learning Funds Fail Marcos Lopez de Prado from QuantCon 2018 — Transcript
Full transcript
- 0:05hi we're going to get started
- 0:11if I can have your attention well I hope
- 0:17everybody's had a great day I've had a
- 0:20chance to talk to a lot of you in
- 0:22hallways between sessions everything
- 0:24like that which is my favorite part so
- 0:26it sounds like it's been very very
- 0:28engaging a lot of exciting talks and I'm
- 0:31really excited about our afternoon
- 0:33keynote with Marcos Lopez de Prado who
- 0:38it's really I think a sort of singular
- 0:41figure in the field he's he's extremely
- 0:43well published and I think my favorite
- 0:47thing about Marcos is he's just
- 0:48incredibly generous with whatever he
- 0:50learns so in a you know in the the field
- 0:53of quantitative finance historically
- 0:54he's just extremely secretive and very
- 0:57very difficult to make contact with
- 0:59experts and I think for his entire
- 1:02career Marcos has really gone against
- 1:05that grain he's been very very open with
- 1:07his with his findings he's a bit of a
- 1:10burn the settle for academic publishers
- 1:14he's always challenging the city they
- 1:16are in the field and demanding
- 1:18scientific rigor and I think that that
- 1:21is exactly what the the field needs so I
- 1:26want to tell you about his background
- 1:29because it's remarkable before I do that
- 1:31I think a bunch of you were able to pick
- 1:34up his new book which is advances in
- 1:36financial machine learning it's really
- 1:39an incredible book it's very near and
- 1:42dear to my heart and and I do mean my
- 1:44heart and and the rest of quanto peein I
- 1:48he basically lays out the the vision and
- 1:51business plan and scientific method for
- 1:53our asset management business in that
- 1:55book in the early chapters which is
- 1:59incredibly inspiring and extremely
- 2:01helpful so I really highly recommend
- 2:03that book and I want to tell you a few
- 2:08things about Marcos so he's the chief
- 2:10executive officer a true positive
- 2:12technologies he's had a pretty pretty
- 2:14remarkable year he published his book
- 2:17but he also bought and spun out his
- 2:22business true positive out of Guggenheim
- 2:24Partners quantity
- 2:25investment management investment
- 2:27strategies business so he's been running
- 2:31no big surprise machine learning
- 2:32strategies there and this year who's
- 2:35able to spin out after managing up to 13
- 2:38billion in assets with a trekker to go
- 2:42with it and Marco's is also a research
- 2:45fellow at the Lawrence Berkeley National
- 2:47Laboratory I was in the US Department of
- 2:50Energy and you'll see if you reads book
- 2:52he talks a lot about borrowing from the
- 2:55National Lab model in the search for
- 2:58alpha which i think is extraordinarily
- 2:59timely for the field he's also a top-10
- 3:03most read author in finance Corney SSRN
- 3:06and as i mentioned he's just very well
- 3:08publishes published dozens of scientific
- 3:10articles on ml supercomputing and he
- 3:13holds multiple international patent
- 3:14applications on algorithmic trading he
- 3:17earned his first PhD in financial
- 3:20economics in 2003 and why only get one
- 3:23so he got his second PhD in mathematical
- 3:25finance in 2011 from the university god
- 3:29help me with the pronunciation of the
- 3:31spanish word i'm about to say
- 3:32universidad compute intense madrid close
- 3:35you can correct me to get up here marcos
- 3:37and he is recipient of spain's national
- 3:40award for academic excellence in 1999
- 3:42and he had his postdoctoral research at
- 3:45Harvard and Cornell he's also a great
- 3:47guy so once you want up Marco's thank
- 3:59you for having me
- 4:02you guys are my favorite group of people
- 4:04and let me tell you why if there is an
- 4:09efficient if there is an an inefficiency
- 4:12if there is an inefficiency in financial
- 4:14markets anybody should be able and
- 4:18allowed to arbitrage it away and correct
- 4:21it right these are our markets these
- 4:24where people transact and exchange
- 4:26information and the saddest school today
- 4:30is that people are not allowed to do
- 4:32that in order to exploit and correct
- 4:37these inefficiencies typically you have
- 4:39to join a firm and you have to play by
- 4:42the rules and if you are not part of the
- 4:46right clubs or you don't have the the
- 4:49right background they may not like you
- 4:51and they may not want you and that
- 4:54sounds wrong in the 21st century and
- 4:58here comes quanto peon which is a
- 5:01wonderful experiment a wonderful
- 5:05experiment not only in the quantitative
- 5:07space but also in the social space where
- 5:10the goal is to disintermediate these all
- 5:15structures and that's why I'm very
- 5:18optimistic about quanto pian not about
- 5:21not only about what contouring can do
- 5:24for investors but actually what it can
- 5:26do for modernizing financial markets I'm
- 5:29breaking with the old paradigms that
- 5:32said we are all I believe very
- 5:37interested in new technologies and how
- 5:40these new technologies can modernize
- 5:42finance in particular
- 5:44today's presentation is about machine
- 5:46learning there is a lot of hype about
- 5:49machine learning not all of it is
- 5:52realistic at this point and the point of
- 5:56this presentation is to highlight a
- 6:00number of areas where machine learning
- 6:03can go wrong I think it is quite clear
- 6:08that machine learning can be an
- 6:11incredible irreplaceable tool for
- 6:14identifying inefficiencies in much
- 6:16in financial markets but it also with
- 6:21these power camp certain
- 6:24responsibilities and it is when you're a
- 6:26researcher you you have to make sure
- 6:29that this power does and does and
- 6:33doesn't end up being adverse to you all
- 6:39right so let me go straight to seven
- 6:44issues that I find frequently dangerous
- 6:50as it relates to machine learning the
- 6:53first one is a little bit philosophical
- 6:55is how should we organize our work what
- 7:00is the best way to organize work when
- 7:02you're conducting research applying
- 7:05machine learning and the old paradigm
- 7:09that comes back to the 1980s is a hedge
- 7:13fund will hire a bunch of portfolio
- 7:16managers in the 1980s many of them were
- 7:19discretionary portfolio managers and
- 7:21this discretionary portfolio managers
- 7:23will work in silos why will they work in
- 7:27silos well it makes sense a
- 7:28discretionary portfolio manager is
- 7:30someone who doesn't really know where he
- 7:33is making these decisions if he knew why
- 7:37he's making these decisions he would
- 7:39have the system and therefore he would
- 7:40be a systemic portfolio manager however
- 7:45since the decisions are not necessarily
- 7:48systematic and they are discretionary
- 7:51they're based on in many cases hunches
- 7:54or gut feeling how can these portfolio
- 7:59managers reach a conclusion well very
- 8:01often they don't know why they are
- 8:03making the decision they cannot
- 8:04rationalize why they are making the
- 8:06decision therefore it's very hard for
- 8:08them to work together that's why it
- 8:11makes sense for hedge funds to have this
- 8:13perform and it's working silos so that
- 8:15the diversification potential is
- 8:18exploited that way by having different
- 8:20perform a leaders making decisions and
- 8:22not influencing each other not trying to
- 8:24convince each other now when you bring
- 8:27this to the Qantas space it doesn't
- 8:29really make sense
- 8:30right the whole point of science is to
- 8:33build a dialogue where we can reach
- 8:38objective conclusions through discussion
- 8:40and testing so why would anybody ask
- 8:46scientists to work in silos it does not
- 8:49really make sense it is not how
- 8:50laboratories work it's not how
- 8:52universities work the whole point of
- 8:54science is to have a discussion a debate
- 8:57and to reach common conclusions so why
- 9:00would hedge funds do that with ones well
- 9:02one answer is because that's what has
- 9:05been successful with discretionary
- 9:07portfolio managers and they just think
- 9:08well let's repeat this protocol this
- 9:12procedure with with Kwan's it also has
- 9:16to be of course with secrecy with not
- 9:19allowing that some Kwan's take areas
- 9:22from other Kwan's and essentially the
- 9:24secrets go away and secrets are very
- 9:28important directions especially when
- 9:29they are automatable right when you can
- 9:31take the secret out of a place so there
- 9:34has to it has to do to some extent with
- 9:37secrecy but I find very often that the
- 9:41argument goes more like well you know
- 9:43everybody should stand on their own
- 9:45their own feet and come up with their
- 9:46own ideas and they should not cooperate
- 9:48well why this is disadvantageous because
- 9:50essentially building a quantitative
- 9:53study is much more difficult than making
- 9:56discretionary decisions right building
- 9:58it is a quantitative strategy involves a
- 10:02tremendous amount of effort and when you
- 10:06put these ones under a lot of pressure
- 10:09to come up with a strategy within six
- 10:11months essentially what I've seen very
- 10:13often happens is that they will come up
- 10:15with strategies that are either the
- 10:19result of practice overfitting just
- 10:20selecting running millions of
- 10:22simulations and reporting to the
- 10:24investment board whatever seems to work
- 10:25best or
- 10:27it will be some strategy based on some
- 10:30research paper very often will be some
- 10:33factor model that you know it has a lot
- 10:36of support in the academic community but
- 10:37the realities
- 10:38it may be an overcrowded strategy where
- 10:41with a lower ratio event
- 10:43what happens is that results are not
- 10:46where the back tests suggested and
- 10:52investment boards become the solution
- 10:54and eventually they shut down the
- 10:56operation so that happens very often
- 10:58right and this is what I call the CCP
- 11:02Inc ones right this is if you remember
- 11:05in Greek mythology Sisyphus was
- 11:07condemned by the gods to perform this
- 11:11daily routine of rolling a boulder up
- 11:14the mountain only to see the boulder
- 11:17roll down at the end of the day and he
- 11:20was never able to reach the summit the
- 11:24promise was that we feel were ever able
- 11:26to reach the summit he would finally be
- 11:28liberated but for the whole eternity
- 11:32Sisyphus was content to to do this
- 11:35futile effort where there was no hope of
- 11:39succeeding and I'm not saying that there
- 11:43is no hope of succeeding when you are on
- 11:44your own and you have no support and and
- 11:48you have no access to clean datasets or
- 11:52computing power it's becoming increasing
- 11:56increasingly difficult to succeed in
- 11:59such environment it would be equivalent
- 12:03to having a factory worker at the BMW
- 12:07factory and you asked that worker to one
- 12:11day be a welder on another day to be a
- 12:15mechanical engineer and Lord a TWiki to
- 12:17be an electrical engineer and eventually
- 12:23build the car with all these shops
- 12:26around him well that's not how car
- 12:30production works right typically what
- 12:32happens is someone is at the station and
- 12:35specializes and is the best that he or
- 12:38she can be at the job the same happens
- 12:42to work or seems to work quite well in
- 12:45finance you you can have people who are
- 12:48especially since supercomputer
- 12:50supercomputing and they will know a lot
- 12:52about pile processing and
- 12:55how to vectorize algorithms and there is
- 12:57so much to learn on that respect right
- 13:00there will be people who specialize in
- 13:02production software people who
- 13:04specialize in data cleaning and curation
- 13:06people who specialize in doing research
- 13:10coming up with what are the important
- 13:13features that explain a phenomenon there
- 13:17will be people who specialize in
- 13:19back-testing and think about back
- 13:20testing all that involves right
- 13:22transaction costs the possibility to
- 13:24trade or not what is the probability
- 13:25that you would get a feel and at what
- 13:27price so all these people kind of
- 13:30specialize and work together as a team
- 13:32right and that seems to be more
- 13:35efficient than asking everybody to be
- 13:39the best they can at everything so
- 13:42that's what I've seen that seems to work
- 13:46in in the new kind of quant
- 13:49firms where people are are truly the
- 13:54best they can at performing very well
- 13:57divided tasks and let me tell you one
- 14:00anecdote about the Manhattan Project
- 14:02I'm have a project involve tens of
- 14:05thousands of scientists and even though
- 14:10it was a very complicated project that
- 14:12involve cutting-edge science at the time
- 14:15they were able to divide the tasks
- 14:18involving that project to such level of
- 14:21granularity that even high school
- 14:24students were able to contribute to the
- 14:27project and that was Richard Richard
- 14:29Feynman's job at the muharram project
- 14:32was to coordinate the work of high
- 14:35school students and what was their work
- 14:37to calculate the yield of the bond of
- 14:40the bomb essentially they were
- 14:41performing the operations right they
- 14:43didn't have supercomputers so they had a
- 14:45bunch of kids solving operations that in
- 14:50an aggregate fashion would determine
- 14:52what is the yield of the bomb so that is
- 14:55the kind of of granularity and sub task
- 14:59partitioning that was achieved at that
- 15:02project meaning that there is no task
- 15:04that is so complicated that cannot be
- 15:07divided into
- 15:08tasks that are much much simpler and
- 15:13that seems to me something that
- 15:16especially when you have access to a
- 15:18large community of people collaborating
- 15:20would be very appealing pitfall number
- 15:26two is interior differentiation so you
- 15:30take any paper in financial economics
- 15:34written over the past 80 years and the
- 15:38first thing they do is always they
- 15:40compute returns they are trying to price
- 15:47securities that say that they are trying
- 15:49to price the value of a stocks the first
- 15:50thing that they will do is they will
- 15:51compute the cross-section of returns if
- 15:54this is a fixed income research paper
- 15:57the first thing they will do is they
- 15:59will operate with yield to maturities
- 16:01option adjust the spread you name it
- 16:03some sort of changes in the spreads
- 16:07right which what is the spread what what
- 16:09is the the Giotto material is
- 16:11essentially a duration adjusted price
- 16:14for a bond and they will they will
- 16:18compete they will work with a stationary
- 16:20series where they make the series
- 16:22stationary by completing differences of
- 16:24the yield the same with a paper dealing
- 16:28with option pricing well they will
- 16:30compute differences on the implied
- 16:31volatilities it's always about computing
- 16:34interior differences and when you think
- 16:36about it it doesn't really make sense I
- 16:38know everybody does it and every paper
- 16:41it starts like that but when you think
- 16:43about it doesn't really make sense there
- 16:46level information
- 16:47the prices implied volatilities yield
- 16:51they contain memory and when you're
- 16:55trying to make a prediction memory
- 16:57sounds like one thing that you want to
- 16:59preserve right you want to know how you
- 17:01reach that level in order to understand
- 17:04what the price is going to do in the
- 17:06future but the first thing that people
- 17:09do when they compute the difference is
- 17:11to eradicate that memory the memory is
- 17:13gone you compute a return and what
- 17:16you're doing is you're computing the
- 17:18divine in the price of today by the
- 17:20price of yesterday
- 17:22so whatever happened before yesterday is
- 17:24eradicated it's entirely removed now of
- 17:30course this is done because you need to
- 17:34work with the stationary series if the
- 17:36series is not as stationary then the
- 17:40algorithm will not be able to learn from
- 17:43comparable examples right you will not
- 17:45be able to derive a distribution that is
- 17:47a stable and if the distribution is not
- 17:49as stable the algorithm will not be able
- 17:52to identify patterns that are comparable
- 17:54to whatever observed features you have
- 17:57today so there is of course a reason for
- 18:00doing interior differentiation the
- 18:03problem is that when people compute a
- 18:06difference and the difference is in
- 18:08interview difference you achieve a
- 18:10stationarity at the cost of wiping all
- 18:13memory out so the question I ask myself
- 18:20a few years ago is is there a an optimal
- 18:25level of differentiation that allows you
- 18:28to preserve the maximum amount of memory
- 18:31rather than differentiating with an
- 18:34integer so for instance the return
- 18:36between yesterday and today is there any
- 18:39fractional differentiation any level of
- 18:41differentiation between zero and one
- 18:44right when you differentiate by order
- 18:46zero you are working with levels this U
- 18:48is not stationary so that's bad when you
- 18:52work so the series will be we have full
- 18:55memory but notice but it won't be a
- 18:57stationary when you are work with
- 18:59differentiation one the series will be a
- 19:02stationary but we have no memory so bad
- 19:04- there must be somewhere in between
- 19:07right there must be somewhere in between
- 19:09a degree of differentiation that is
- 19:13optimal in the sense that achieves
- 19:18stationarity at the minimum cost in
- 19:21terms of memory preservation and that's
- 19:24what you see in this plot here you can
- 19:26see a blue line that is somehow a mix of
- 19:30returns is it somehow a mix of white
- 19:33noise and levels right so you can see
- 19:35how
- 19:36the green line is the price of the SNP
- 19:39between 1998 and 2005 2015 sorry and the
- 19:46blue line is the series where we have a
- 19:51fractional differentiation where the
- 19:53order of differentiation is 0.4 this the
- 19:58blue line is both stationary and still
- 20:02it con it incorporates a lot of memory
- 20:05you can observe that when after 2008
- 20:08when they simply plummets and loses
- 20:11something like 40 something percent the
- 20:15blue line remains there is a lot of
- 20:17noise but is still the the values are
- 20:20depressed for a long period of time
- 20:22until eventually that memory from the
- 20:24immediate history wanes so let me
- 20:32present you the same idea with a
- 20:35different plot in this plot we have two
- 20:38lines the orange line and the blue line
- 20:39the blue line is the statistic from an
- 20:45augmented dickey-fuller test an ADF test
- 20:49and as you can see that the value goes
- 20:53from around zero to something like minus
- 20:5650 so it's the the values around zero
- 21:01when you have no differentiation so this
- 21:03you see is non-stationary and then by
- 21:06the time you differentiate you compute
- 21:08the return you jump from zero to one or
- 21:10the sign the value is minus 45 or minus
- 21:1450 now the series is completely
- 21:17stationary I mean it's like you were
- 21:20expecting to to achieve a level of minus
- 21:232.3 right when the ADF stat is around
- 21:26minus 2.3 you already have a 95%
- 21:29confidence that the series is stationary
- 21:31or that you have rejected the null now
- 21:36the orange line represents the
- 21:39correlation between the differentiated
- 21:42series and the Arenal series right and
- 21:46when the series is not differentiated
- 21:48the corrosion is 1 because
- 21:49the Croatian between prices and prices
- 21:51okay when they when you differentiate
- 21:54with an interior differentiation of
- 21:57order one
- 21:57now that correlation drops to 0.05 or so
- 22:05so what happens in between you can see
- 22:08that at the level of around 0.4 you have
- 22:13a serious actually 0.35 in this case you
- 22:17can achieve a an ADF test of around
- 22:21minus 2.86 while at the same time the
- 22:27differentiated series fractional
- 22:29differentiate disease has a correlation
- 22:31of 0.995 with the renal series so
- 22:36essentially you achieve two things this
- 22:38is the fractional differentiated series
- 22:40is very close to the reno students and
- 22:43yet is stationary it is a unique
- 22:47phenomenon not at all
- 22:48there is not a single future where you
- 22:51need to compute returns meaning that for
- 22:55the past 80 years people have been
- 23:00publishing papers out there where the
- 23:03series were massively over
- 23:04differentiated there is not a single
- 23:07case you can see here more returns out
- 23:10of the 100 most liquid futures worldwide
- 23:14the maximum level of differentiation
- 23:17that is needed is 0.5 is never 1 and in
- 23:21fact the meeting is around 0.3 0.2 0.3
- 23:25so think about it the level of
- 23:28differentiation that was needed that was
- 23:31justifiable in order to achieve a
- 23:32stationarity was 0.2 0.3 all the rest
- 23:380.32 1 just was for the sake of removing
- 23:42memory not for the sake of achieving
- 23:45stationarity is it therefore surprising
- 23:49that most academics claim that markets
- 23:52are perfect no markers appeared to be
- 23:56perfect by construction once you remove
- 23:59all memory markets become unpredictable
- 24:03it's not that markets are unpredictable
- 24:05markets are predictable we should be
- 24:08able to predict the markets but they
- 24:11become unpredictable
- 24:12once you remove all memory so they it
- 24:15appears to me that the efficient market
- 24:18hypothesis actually may be the wrong
- 24:23conclusion from utilizing a wrong
- 24:25technique all right pitfall number three
- 24:30is inefficient sampling in many papers
- 24:35you see that people academics especially
- 24:38they utilize sample they take samples
- 24:43based on a chronological clock
- 24:45essentially they will take samples every
- 24:47day or every hour or every minute either
- 24:50at a constant pace right at a time base
- 24:56constant distance now that doesn't
- 24:59really makes a lot of sense because
- 25:01clearly markets do not receive
- 25:03information at a constant rate markets
- 25:08receive a lot of transactions and volume
- 25:10but they open then there is a ballet
- 25:13around noon and then volume spikes
- 25:16tremendously around 3:00 p.m. until the
- 25:20close 4:00 p.m. new your time I'm
- 25:22talking about equity markets but you
- 25:25know in oil it will be the volume will
- 25:28spike around 1 p.m. in fixed income for
- 25:33depends on the market but essentially
- 25:35these valet feature is it's very
- 25:38characteristic now when you sample it
- 25:42makes sense to sample data when there is
- 25:44information to be extracted I mean why
- 25:47would you sample when there is no
- 25:48information to be strike actually that's
- 25:50a bad sample right it's about sample
- 25:53because it just leads to redundant
- 25:54observations observations that do not
- 25:57bring information it's counterproductive
- 26:00in fact two sample observations when
- 26:04there is no information to be extracted
- 26:06so alternative approaches are to compute
- 26:11trade VARs volume bars dollar VARs
- 26:13volatility on
- 26:16grunts order imbalance entropy bars the
- 26:20book describes many of these let me give
- 26:23you an explanation of one a sense so for
- 26:26instance you could compute dollar bars
- 26:28we're essentially you're forming a bar
- 26:31whenever you accumulate a dollar amount
- 26:35traded on a particular side
- 26:37so whenever markets are very balanced in
- 26:41terms of buys and sells you're going to
- 26:45produce bars whenever a particular
- 26:47demand has been traded now suppose that
- 26:49all of a sudden an informed trader
- 26:52arrives to the market and this informed
- 26:56trader thinks that the price will go up
- 26:58and therefore becomes a very aggressive
- 27:00buyer as a result now the bond will be
- 27:03very imbalanced and this kind of
- 27:07sampling mechanism will sample more it
- 27:11will sample more because it will be
- 27:12easier to generate an amount of trading
- 27:16on a particular side of the market in
- 27:17this case buyers and that's exactly what
- 27:21you want to do someone has arrived to
- 27:23the market this person has a symmetric
- 27:26information is utilizing this asymmetric
- 27:29information to press a particular side
- 27:31of the market the algorithm detects that
- 27:34and samples more why because you want to
- 27:36learn what does person knows right
- 27:39this person is acting this way because
- 27:41he has a symmetric information and you
- 27:44want to join that you want to extract
- 27:46that information that he that he said
- 27:49that he knows off and he's incorporating
- 27:51into the price let me give you an
- 27:55illustration of why these sampling
- 27:58methods seem to work well there are here
- 28:01three plots there is a blue a green and
- 28:05a black line the black line is the
- 28:07number of parts per day of a particular
- 28:10size let's say 50 on average per day
- 28:12that you would extract if you use stick
- 28:16bars if you let's say that you compute
- 28:18you sample one bar every time that is
- 28:22certain number of ticks is exchanged now
- 28:26as you can see this line is quite
- 28:29is quite far from a flatline he starts
- 28:34at the level of around 25 and then what
- 28:37goes all the way up to 100 and then it
- 28:40goes down to around 50 over time why
- 28:43because this bar is affected by
- 28:47high-frequency trading as high-frequency
- 28:52trading has become a prevalent
- 28:54technology in financial markets the
- 28:56order size has decreased because there
- 29:01are more tics for every given amount of
- 29:03volume traded as you can see beginning
- 29:072007 it goes up and then around 2012
- 29:12reaches a peak and then there was a
- 29:14change in the fixed protocol that reduce
- 29:19the number of fragmentation in the
- 29:21trades so then the this line decreases
- 29:24but it's really a function of changes in
- 29:26the fixed protocol so we would like to
- 29:29avoid that right we would like up to
- 29:31about that the sampling frequency is a
- 29:34function of new technologies arriving or
- 29:37changes to protocols so that's where the
- 29:39green line arrives that's volume VARs
- 29:41right on volume bars take a take a
- 29:43sample every time that is particular
- 29:46volume not tick volume number of
- 29:49contracts is change takes place in the
- 29:53market and as you can see this series is
- 29:56now much more stable now the blue line
- 30:00is even more stable than the than the
- 30:03green line and that's all our vs.
- 30:04entually now we're taking to account
- 30:05information about the price that has the
- 30:11dollar amount exchanged not only the
- 30:14volume information but also the price
- 30:16information so that's a much more stable
- 30:20way of sampling and it's a stable and is
- 30:25less dependent on technological features
- 30:27or or price action so people number for
- 30:33wrong labeling very often you see in the
- 30:36financial literature that people label
- 30:41observations
- 30:42from financial markets in a rather
- 30:45automatic way as if they were dealing
- 30:48with faces from a Facebook or or or
- 30:54dealing with some sort of non-financial
- 30:57data set so essentially what they will
- 31:00do is they will take they will make some
- 31:04observations and then they will sample
- 31:06these observations based on what is the
- 31:09return over a given fixed horizon so
- 31:12over the next 10 bars or 10 days well
- 31:16that doesn't really make sense because
- 31:17when you think about it number one time
- 31:21bars are do not exhibit good statistical
- 31:24properties so when you complete returns
- 31:26based on time bars this series typically
- 31:29will have will be heteroscedastic so
- 31:33they won't have a constant variance they
- 31:35they will have they will exhibit
- 31:37substantial serial correlation
- 31:39well why because there will be many
- 31:42observations made during the night where
- 31:44there is very little volatility and then
- 31:46all of a sudden minutes some versions
- 31:48during the day which again they will
- 31:50have they will exhibit this sort of zero
- 31:53correlation the distribution will be non
- 31:56normal it will be skewed there will be a
- 31:59skewness and kurtosis so sampling with
- 32:03time bars is a bad idea and we have seen
- 32:05this before
- 32:06now labeling based on a fixed time
- 32:10horizon it just incorporates once again
- 32:15wrong information right you should label
- 32:17not based on what happens over the next
- 32:1910 bars but whether you achieve the
- 32:22objective of a position under those
- 32:25circumstances so let me give you an
- 32:27example that's what that's by the way
- 32:29that's what I call the triple very
- 32:31method so this is the alternative to
- 32:34what is being done in most papers out
- 32:38there the idea is you are going to label
- 32:43an observation based on the outcome as
- 32:47if you had a position at that point in
- 32:49time so you form three bars you form two
- 32:54horizontal barriers
- 32:56one up and one down and then a vertical
- 32:58barrier and essentially this
- 33:00incorporates the information that you
- 33:02would follow if you were holding a
- 33:07position right the upper barrier is a is
- 33:10this is a profit-taking level the lower
- 33:13barrier is a stoploss barrier and the
- 33:16vertical very essentially just tells you
- 33:18we had we held in this position for a
- 33:21particular horizon and now it's time to
- 33:23you know move on now when you do that
- 33:27what is the difference the the the
- 33:32traditional method of a Causton of a
- 33:35constant time barrier or time horizon
- 33:37essentially the equivalent to have to
- 33:39holding a vertical barrier without the
- 33:42horizontal very without the horizontal
- 33:44where is you see that right if you are
- 33:46holding a position for the next ten days
- 33:47and you don't care what happens in
- 33:49between essentially this is equivalent
- 33:50to having no barriers no horizontal
- 33:53various and you just label based on the
- 33:56outcome at the end now when you
- 33:58incorporate the two horizontal various
- 34:00what you're doing is you are
- 34:02incorporating information about the path
- 34:03right now labeling will be path
- 34:07dependent essentially what you're doing
- 34:09is you will label an observation as a
- 34:13one is if you would have taken a profit
- 34:17if you would have made a profit that
- 34:19after holding that position if they lay
- 34:23the observation will be labeled as a
- 34:24minus one if you would have been a
- 34:26stopped out and who has not being a
- 34:28stopped out at some point in time it's
- 34:30very healthy right
- 34:31so not incorporating that health
- 34:33information into your machine learning
- 34:34algorithm probably is a bad idea and you
- 34:39have to give it to the academics it only
- 34:41it takes to be only an academic board
- 34:45label observations without taking into
- 34:47account the possibility of a stop out
- 34:48anybody managing a portfolio for real
- 34:50knows that you have to take into account
- 34:53the possibility of being a stopped out
- 34:54right it doesn't matter where the price
- 34:57is after ten days if you were managing a
- 35:00position during the flash crash you know
- 35:02that the stop outs can kick in anytime
- 35:07now how is this relevant well there is a
- 35:12lot of interest these days for what I
- 35:16call quant quanta mental firms and let
- 35:19me tell you one way one natural way that
- 35:21firms can incorporate information the
- 35:29how fundamental firms can actually use
- 35:31machine learning methods in their daily
- 35:33decision making one way is to combine to
- 35:41add a machine learning layer to your
- 35:45traditional fundamental decision making
- 35:47suppose that you have you work for a
- 35:49firm that is very fundamental where
- 35:51people make decisions based on either
- 35:53book information accounting or
- 35:55traditional economic models and now what
- 36:01you would like to do is not to challenge
- 36:03the decisions be made by those models
- 36:05but what you would like to do is to
- 36:07determine what is the bearing size how
- 36:11much should we bet on these forecasts
- 36:14made by the fundamental model so that's
- 36:17what I call meta leveling meta labeling
- 36:22is is a it's a very nice way of
- 36:27combining machine adding a machine
- 36:30learning layer to any sort of
- 36:34theoretical model whether the model is
- 36:36econometric economic fundamental it
- 36:40doesn't matter the Machine the the role
- 36:42of the machine learning algorithm is to
- 36:43figure out how much should we bet if
- 36:46anything at all in this prediction that
- 36:49the algorithm has made or or that this
- 36:55primary model has made now this is very
- 37:00helpful in the following sense suppose
- 37:04that you have an algorithm that has low
- 37:08precision but high recall right this is
- 37:11an algorithm that is able to identify
- 37:15almost all positives however it has a
- 37:18large
- 37:19number of false positives right and
- 37:23essentially like most economies who
- 37:26predict 20 out of the last ten
- 37:28recessions right and so that's an
- 37:31example economies are exciting example
- 37:33of an algorithm that has high recall and
- 37:36low precision and now what we would do
- 37:40is we would incorporate a machine
- 37:41learning algorithm on top of that
- 37:43economists another machine learning
- 37:45algorithm is going to figure out how
- 37:47much should we bet on the forecasts made
- 37:49by this particular economists given
- 37:51previous examples of predictions made by
- 37:53these economists and why did why is this
- 37:57helpful because if you have a model that
- 37:59has high recall it's not so important
- 38:02that it has low precision now the
- 38:04machine learning algorithm will reduce
- 38:08the recall in exchange for increasing
- 38:12the precision and there is an optimal
- 38:14level out there where you can maximize
- 38:17the harmonic average the harmonic
- 38:20average of the two of precision and
- 38:22recall and that's what these machine
- 38:23learning algorithm would do all right
- 38:28pitfall number five waiting on of non
- 38:31iid samples you know finance is very
- 38:36funny
- 38:37as it comes down as it relates to
- 38:39machine learning in a traditional
- 38:42machine learning application like for
- 38:44instance by medical research suppose
- 38:47that you are a doctor and someone asks
- 38:49you well what are the features that are
- 38:51conducive of high cholesterol what you
- 38:54would do is we would take your sample of
- 38:56everybody you know samples from
- 38:58everybody here in the audience and we
- 39:00would label them right and then we would
- 39:03ask some questions about what is your
- 39:04diet you know what exercise routines the
- 39:08genetic predisposition to cholesterol
- 39:11etc yeah you would you would ask a
- 39:15number of questions and you would try to
- 39:16identify these features are predictive
- 39:18of your observation that is in that tube
- 39:22one tube per person right independent
- 39:25samples one tube per person but
- 39:29finance is not like that right finance
- 39:31what happens in finance is that
- 39:32essentially someone takes all these
- 39:34tubes and messes them up and now what
- 39:37happens is that the blood contained in
- 39:39tube number-19 contains information from
- 39:43you know subjects eight seven six and
- 39:46five and tube number twenty contains him
- 39:49from it contains a part you know sample
- 39:52a sample from subject number twenty but
- 39:54also partly a sample from subject 19 18
- 39:5817 16 that's that's finance we don't
- 40:02have access to clean observations why
- 40:04because financial series are multi
- 40:08collinear they're the exhibits serial
- 40:11correlation they are non normal they are
- 40:14all contaminated right there okay there
- 40:17is a lot of stuff going on in financial
- 40:19markets at any point in time and we can
- 40:22never isolate the effect of features its
- 40:28everything combined right so there is no
- 40:31such thing in finance as collecting a
- 40:33sample from a particular individual and
- 40:36then collecting an independent sample
- 40:38why because the cross correlations are
- 40:39tremendous and then to make matters
- 40:42worse even the serial correlation is
- 40:44substantial now why is this relevant
- 40:48well it's relevant because think about
- 40:53some of the major breakthroughs in
- 40:56machine learning these days right when a
- 40:58couple of years ago algorithms were able
- 41:01to identify faces very effectively or
- 41:05drive cars even though that track record
- 41:09has been tarnished recently now when you
- 41:14think about it here is my friend Luna my
- 41:17friend Luna can recognize faces very
- 41:19well I know it because she doesn't bark
- 41:21at me she barks at the neighbor however
- 41:26even though my dog Luna can recognize
- 41:29faces as well as Google's algorithms my
- 41:34dog Luna she cannot manage my investment
- 41:37portfolio well she can manage my
- 41:39investment for Oh more or less as well
- 41:41as most or
- 41:43managers out there in Water Street but
- 41:44that's not exactly what you would expect
- 41:46anyway I don't pay her anywhere close
- 41:51whatever machine you know a worse
- 41:54rapport manager with respect or be
- 41:56satisfied with anyway unless they just
- 41:57want to get some you know cold meal
- 42:02at the end of the day so this is the
- 42:05problem right the problem is that what
- 42:07appears to be breakthroughs somewhere
- 42:10else like driving cars and recognizing
- 42:15faces there are plenty of people who can
- 42:18drive cars there are plenty of people
- 42:20who can recognize faces but there are
- 42:24not many people who can manage
- 42:26portfolios it happens to be a very
- 42:28complex problem and part of the reason
- 42:31it is a very complex problem is not
- 42:33because the system is chaotic
- 42:36there are cardig systems out there that
- 42:38can be predicted using machine learning
- 42:39if you read the press over the past week
- 42:44actually for instance there were a group
- 42:46of scientists who were able to predict a
- 42:50chaotic system like wide spread or the
- 42:52spread of spreading of a wildfire over
- 42:56multiple Lyapunov cycles which
- 42:59essentially are full cycles of
- 43:00uncertainty it's like eight cycles it
- 43:02was incredible a machine learning
- 43:04algorithm could predict a chaotic system
- 43:07this is something that nobody thought it
- 43:10would be possible so machine learning
- 43:13truly is an incredible tool that can
- 43:15solve for card existence like the
- 43:18economy but the problem with finance is
- 43:22that the data sets are not as good as
- 43:24the data sets you can form in physics
- 43:26and part of the difficulty is exactly
- 43:29what we are discussing in this slide
- 43:31right and it is that observations are
- 43:34non-unique these observations are not
- 43:36independent and identically distributed
- 43:38and one thing we can do is to control
- 43:43for that lack of uniqueness essentially
- 43:45what we can do is we can determine
- 43:48whether the observations are similar to
- 43:51other service observations we have made
- 43:53how well suppose that for instance
- 43:57you make you observe some features and
- 44:01now you are labeling these features
- 44:03based on the outcome that calls over the
- 44:06next 20 bars right or or using the
- 44:10triple barrier method until one of the
- 44:12berries is hit
- 44:15now the next observation has some
- 44:18overlap information right
- 44:19the next observation is going to look at
- 44:22the side the next twenty one or twenty
- 44:23three bars and there is an overlap and
- 44:25you can control for that overlap
- 44:27essentially you you can determine what
- 44:30is the amount of share information
- 44:33between these consecutive observations
- 44:36and once you do that something very
- 44:38interesting happens and it is that once
- 44:41you sample we when you contact your
- 44:45cross-validation once you sample
- 44:47observations taking into account the
- 44:49redundancy the uniqueness of the you
- 44:55sample of more observations that are
- 44:57more more unique than what of course is
- 45:00that all of a sudden your out-of-sample
- 45:04accuracy increases dramatically right
- 45:08meaning that if you contact across a
- 45:10cross-validation and you don't take into
- 45:14account the uniqueness of the
- 45:16observations your accuracy is not going
- 45:18to be as good as if you if you introduce
- 45:21that additional information to your
- 45:23classifier so that's something that not
- 45:25many people do but definitely it has a
- 45:28tremendous benefits now since we are
- 45:31already talking about cross-validation
- 45:33let's discuss one essential problem in
- 45:37financial data sets and that's leakage
- 45:40this is why one of the reasons many back
- 45:45tests look wonderful in sample and then
- 45:49you deploy the strategy and it doesn't
- 45:51work out the sample so one of the
- 45:52reasons is because the machine learning
- 45:56algorithm tested something learned
- 46:00something in sample and then tested that
- 46:04fit those fit parameters out-of-sample
- 46:07in in the testing set
- 46:10the testing said had leaked information
- 46:13into the training set right and how does
- 46:17this happen well in finance very often
- 46:19why because the series our exhibit
- 46:22serial correlation and the labels are
- 46:25overlapping and as a result when you
- 46:28combine these two features to your
- 46:29correlation and overlapping labels very
- 46:32often there will be some examples in the
- 46:36testing set that are sharing information
- 46:39with samples in the training set what
- 46:42can you do about it well one thing you
- 46:44can do is of course as we said before to
- 46:46try to control for the uniqueness of the
- 46:49observations but that doesn't suffice I
- 46:51think that you need to do is you need to
- 46:53you need to perform two operations one
- 46:57is called portion and the other one is
- 47:02called embargo the difference between
- 47:03the two is porting has to do with
- 47:06removing from the in-sample observations
- 47:11that share information with other
- 47:14observations in the in the testing set
- 47:20so that's something that we can do
- 47:22because we know what is the degree of
- 47:25overlap between the labels in the two
- 47:28sets and the second thing is embargo
- 47:30essentially this is necessary when
- 47:33you're testing set predates the training
- 47:38set so for instance here as you can see
- 47:40the testing set is between two training
- 47:43sets one that happens before one that
- 47:44happens afterwards and you need to
- 47:47remove that overlap which is what
- 47:49purlins does but in addition on the
- 47:51right side there are some observations
- 47:53in the training set that are after the
- 47:58testing set and they should be removed
- 48:01once you do that what happens is that
- 48:05well typically Sharpe ratios decline in
- 48:08the practice because that's what should
- 48:10happen essentially you are removing the
- 48:12effects of overfitting of leakage and by
- 48:17the way one thing to determine what at
- 48:20what point you have purged an embargoed
- 48:23enough is
- 48:23when the sharp stabilizes and it ceases
- 48:26to decline hopefully about zero all
- 48:31right people number seven last one my
- 48:35favorite back to sober feeling and this
- 48:39is what I call the most important flood
- 48:41in finance I call it I call it that way
- 48:44because it has helped me a lot during my
- 48:48career essentially the way these plot is
- 48:51generated is as follows suppose that you
- 48:54perform a number of experiments say a
- 48:56thousand you perform a thousand of
- 48:59practice and these Baptists are trying
- 49:04to determine the profitability of
- 49:05various strategies whether their mean
- 49:07reversion trend-following looking for
- 49:10calendar patterns machine learning you
- 49:12name it they are trying to identify a
- 49:15strategy and compute the performance of
- 49:17that strategy now the the feature where
- 49:24do where do these series you are using
- 49:29for developing this strategy where do
- 49:30they come from well suppose that these
- 49:32series are actually random walks they
- 49:34are unpredictable
- 49:35so essentially what we are doing is we
- 49:38are just computing investment strategies
- 49:40on series where by definition there is
- 49:44no investment strategy they are just
- 49:46unpredictable what is the Sharpe ratio
- 49:50that you expect to achieve surprisingly
- 49:52the answer is not zero right when you
- 49:55conduct when you contact a thousand
- 49:58experiments on a on a series on a single
- 50:05series where the series is unpredictable
- 50:08they expected maximum Sharpe ratio is
- 50:12around three isn't that astonishing
- 50:17remember the series is unpredictable
- 50:19there is no strategy and yet they
- 50:22expected maximum Sharpe ratio is three
- 50:27well if you conduct a million
- 50:30simulations where you know today to
- 50:32perform in a simulation this trivial
- 50:34impact is now the sharp respect
- 50:37maksimka ratio is 5 and what this sells
- 50:42is the following whenever you read the
- 50:46paper in the journal of finance in any
- 50:48of the best journals anywhere how many
- 50:54trials did they offer conduct nobody
- 50:59knows
- 51:01most likely the author doesn't know
- 51:03because he didn't keep track of them
- 51:05some of these papers are written over
- 51:08many years the referees had no clue and
- 51:15everybody assumed in their statistical
- 51:18tests that a single trial had taken
- 51:21place essentially that's what happens
- 51:23when we utilize a confidence level of
- 51:2695% a significance level of 5% we set
- 51:29the thresholds for rejecting the new at
- 51:33the 5% probability of a false positive
- 51:37under the assumption that a single trial
- 51:39has taken place now this is something
- 51:42that it has been known for a long time
- 51:44right already four or five years after
- 51:49the current framework for conducting
- 51:54statistical tests was set up people
- 51:59realize that these thresholds for
- 52:02rejecting the null couldn't be remain
- 52:05constant as you conduct multiple tests
- 52:09so for the past 90 years people have
- 52:14been conducting finance people have been
- 52:16conducting multiple tests without
- 52:17adjusting for the rejection thresholds
- 52:20so this is something that doesn't happen
- 52:24anywhere else right in medical research
- 52:26in physics people conduct multiple tests
- 52:30and they all adjust for this phenomenon
- 52:33the possibility that false positives
- 52:36appear more frequent as a result of
- 52:38multiple testing this is why a couple of
- 52:42years ago a friend of mine cam Harvey
- 52:46who also is a president of the American
- 52:48Finance Association published
- 52:50paper with this shocking conclusion most
- 52:53discoveries in finance are false it's
- 52:58just a matter of nobody is controlling
- 53:01for the number of trials so you said
- 53:02nobody even knows how many trials are
- 53:04taking place now when it comes to a
- 53:07strategy development is something that
- 53:09we need to keep always in mind we will
- 53:12always find profitable strategies even
- 53:17where there are none it's just a matter
- 53:20of trying and trying trying and I guess
- 53:24some people express this thought in the
- 53:28following ways if you torture the data
- 53:31hard enough eventually the data will
- 53:34confess whatever you want and this is
- 53:38the application to strategy development
- 53:41what can we do about it well this is the
- 53:45false strategy theorem is is a theorem
- 53:48that some colleagues and I prove in 2014
- 53:52essentially what it determines is this -
- 53:55line this - line the this - line is the
- 53:59result of that theorem and this kind of
- 54:04heat map is the experimental
- 54:08verification right experimental
- 54:09verification if you generate random
- 54:12strategies and you compute X the
- 54:14expected maximum Sharpe ratio they
- 54:16actually they maximal Sharpe ratio you
- 54:18obtain this distribution and this dashed
- 54:20line is what the theorem had predicted
- 54:21and as you can see the theorem is very
- 54:25accurate for a very different very wide
- 54:28range of number of trials actually it
- 54:31becomes even more accurate as the number
- 54:34of trials increases and what is the
- 54:38conclusion of this theorem that
- 54:39essentially there are two variables that
- 54:41are never reported in academic journals
- 54:44that are critical to determine whether a
- 54:48discovery is true or false and these two
- 54:51variables are number one the number of
- 54:52trials please if you ever find a paper
- 54:56in any academic journal that in finance
- 54:59that says and I conducted two hundred
- 55:02twenty three trials please
- 55:04tell me because it will be the first
- 55:05time that anybody ever reports the
- 55:08number of trials number two the second
- 55:14variable that is that is very critical
- 55:16to discount for the probability of a
- 55:21false positive is the variance of the
- 55:24outcomes right why is this relevant well
- 55:27if you are conducting research that
- 55:30involves stratus let's say coming from
- 55:35technical analysis or counting sore
- 55:42spots or something you know when were
- 55:45using any sort of variable or intuition
- 55:49to make a prediction the variance of the
- 55:51outcomes is likely to be very wide so
- 55:54essentially it would be it becomes all
- 55:56of a sudden very likely that you will
- 55:58obtain a strata with a very high ratio
- 56:00now when you conduct a strategy research
- 56:05where you stick to a model right you
- 56:08stick to some pre-ordained notion of how
- 56:12the world works now the variance is
- 56:16going to be much smaller right because
- 56:17your degrees of freedom are shrunk right
- 56:19so that's something that is these are
- 56:23essentially the two variables that are
- 56:26critical to determine whether if this
- 56:28positive whether it discoveries is a
- 56:30true discovery or false discovery and
- 56:32they are never reported well when you
- 56:36are conducting your research you can
- 56:37always keep track of these variables
- 56:39right essentially what you do is and
- 56:42that's something that my team does
- 56:44whenever someone conducts a practice the
- 56:49system automatically loves information
- 56:51about that practice
- 56:52you know whenever you have access to
- 56:54information the research is going to be
- 56:57penalized for accessing that information
- 56:59multiple times and eventually someone
- 57:02will arrive at my office and say Marcos
- 57:05we encounter in country Australia with
- 57:07the Sharpe ratio of two and I will look
- 57:09to the logs and say hey but you know you
- 57:11access the data sets like five hundred
- 57:13times I was affecting a Sharpe ratio of
- 57:15five and come back when you have
- 57:18average of five - doesn't excite me and
- 57:21then he will come back with sharpish of
- 57:24five and probably he will have conducted
- 57:2610,000 experiments and at some point in
- 57:29time it's good to give up at some time
- 57:32at some point then people should
- 57:33actually give up because remember you
- 57:36will achieve any Sharpe ratio you want
- 57:38ten twenty hundred hundred shirisha no
- 57:40problem is just a matter of trials and
- 57:43patience even though there is no
- 57:46strategy there so what can we do about
- 57:48it well we can compute the deflated
- 57:50Sharpe ratio and the deflated Sharpe
- 57:52ratio is a metric that takes into
- 57:54account the number of trials whether the
- 57:58distribution of the returns is skewed
- 58:01exhibits kurtosis it takes into account
- 58:03the sample length it takes into account
- 58:05all these features that are very
- 58:07relevant but in particular it takes into
- 58:10account these SR zip zero this variable
- 58:15that incorporates what is expected chart
- 58:17ratio under multiple trials and we take
- 58:21into account the variance of the
- 58:22experiments now a couple of days ago a
- 58:28colleague of mine and I published a
- 58:31paper titled detection of false
- 58:34strategies that explains a procedure for
- 58:39estimating these two variables very
- 58:43accurately so essentially what we have
- 58:46done is this paper will will show you
- 58:49how you can determine whether the
- 58:51strategy you have computed would you
- 58:54have identified is it true positive or a
- 58:57false positive and as you can see in the
- 58:59paper we have estimated the the efficacy
- 59:05of the method by running millions of
- 59:08Monte Carlo simulations and the method
- 59:11seems to be very precise essentially
- 59:14let's say that you come up with a
- 59:15strategy with a sharp edge of two and
- 59:18the the paper will teach you how to
- 59:22estimate the number of independent
- 59:24trials that have taken place which is in
- 59:28most cases much smaller than the number
- 59:31of actual
- 59:32the difference between actual tralala an
- 59:34independent trial independent trials
- 59:36typically are much less than number of
- 59:38trials and also it will teach you how to
- 59:42cluster your trials in a way that you
- 59:45can compute the variance between those
- 59:46independent trials and once you plug in
- 59:49these two variables you will have an
- 59:54accurate representation of whether this
- 59:56strategy is something you should be
- 59:57investing in or not is this a
- 59:59statistical fluke this is the result of
- 1:00:02lack or is this a strategy that performs
- 1:00:06much better than one what anybody
- 1:00:08Buddhist pegged they are sort of like
- 1:00:11and with that I conclude my remarks
- 1:00:13thank you again for your attention
- 1:00:16please go ahead and ask me any questions
- 1:00:19[Applause]
- 1:00:28yes definitely
- 1:00:42they're doing a great job and in fact we
- 1:00:45have for the past three years we have
- 1:00:47been writing papers where we are
- 1:00:51ignoring each other for the word that
- 1:00:53they are doing the work we are doing we
- 1:00:54are on the same page look I think we
- 1:00:59both recognize that it is very
- 1:01:01suspicious than in finance the rate of
- 1:01:06withdrawal of papers right the rate at
- 1:01:10which papers are recalled is essentially
- 1:01:14zero whenever whatever whenever a paper
- 1:01:17in finance is published most likely it
- 1:01:20will never be revisited and that's
- 1:01:24unheard in science right in medical
- 1:01:27research that with Robo rate can be as
- 1:01:31high as 20% in some journals meaning
- 1:01:33that the paper camp comes out and ten
- 1:01:35years later someone realizes well you
- 1:01:40know new evidence challenges what was
- 1:01:43published ten years ago and the paper is
- 1:01:46erased it disappears from the journal
- 1:01:49right it's no longer listed there and
- 1:01:52probably finance and theology or the the
- 1:01:55last two fields where papers are never
- 1:01:59recalled and hopefully you know cam has
- 1:02:03been a leader a thought leader on this
- 1:02:05respect that this must change
- 1:02:08Thanks yes yes
- 1:02:17so suppose that you have a series that
- 1:02:20is serially correlated right and so
- 1:02:25that's what you can see there in that is
- 1:02:26in that in the middle of the slide XT is
- 1:02:29approximately the same as XT plus 1 this
- 1:02:32is the serial correlated you make an
- 1:02:33observation and the next observation is
- 1:02:37very similar and at the same time the
- 1:02:41levels are overlapping the label that is
- 1:02:47associated with observation t shares a
- 1:02:50lot of information with the label
- 1:02:51associated with t plus 1 now if T and T
- 1:02:54plus 1 fall in different sets let's say
- 1:02:57that T belongs to the training set and T
- 1:02:59plus 1 falls in the testing set now the
- 1:03:04algorithm will learn in the testing set
- 1:03:07something that should only belong in the
- 1:03:09training set right and here what should
- 1:03:12happen is that observation T should be
- 1:03:15removed from the from the test from the
- 1:03:19training set so the algorithm should not
- 1:03:20be allowed to learn from something that
- 1:03:23is going to be used to evaluate the
- 1:03:25efficacy of the fit yep go ahead
- 1:03:43yes the so the question is what is the
- 1:03:45key attribute of success of a machine
- 1:03:48learning astrati well I think it has to
- 1:03:52do with number one the quality and and
- 1:03:57uniqueness of your data right you want
- 1:03:59to model strategies after data that is
- 1:04:02very hard to get not many people have
- 1:04:06perhaps they are data center are very
- 1:04:10hard to manipulate I know that I'm after
- 1:04:12after something when my data team
- 1:04:15complains right that's when my data team
- 1:04:18complains this data set is unbearable
- 1:04:20that I probably you know it's like going
- 1:04:24to strike gold in Alaska right where is
- 1:04:27their goal in the last quarter what's
- 1:04:28going on because nobody wanted to go to
- 1:04:30Alaska right so this is a data set that
- 1:04:32is that is intractable it's very hard to
- 1:04:35do process so that's one thing right
- 1:04:39another thing is to come up with good
- 1:04:43feature importance methods and that's
- 1:04:46something that you can see in the book
- 1:04:48there is a full chapter dedicated to
- 1:04:50feature importance why because research
- 1:04:53as it relates to financial markets
- 1:04:56back-testing is not a research tool and
- 1:04:59I know that that's a a polemic statement
- 1:05:03many people believe that a Baptist is
- 1:05:06what should confirm or unconfirmed
- 1:05:10a particular statement or strategy but
- 1:05:14then we are is once you are in the back
- 1:05:15testing mode research is already it's
- 1:05:18already finished you you cannot learn
- 1:05:20what something from a Bacchus and then
- 1:05:22reutilize if you realize it well you
- 1:05:24know you better keep control of the
- 1:05:26number of trials right and and then you
- 1:05:28will have to deflate the Sharpe ratio by
- 1:05:32the probability that this is a lucky
- 1:05:35discovering the typically what you want
- 1:05:38to do is you want to spend a lot of time
- 1:05:41identifying what are the features that
- 1:05:43are important for that strategy and once
- 1:05:47you come up with important features now
- 1:05:49you're going to build a strategy and at
- 1:05:50the last moment you're going to back
- 1:05:52test and
- 1:05:54you don't you really do not want to go
- 1:05:57into this cycle until eventually the
- 1:05:59data confesses whatever you wanted the
- 1:06:02data to confess you want to spend most
- 1:06:04of your time in feature importance one
- 1:06:10more
- 1:06:36[Music]
- 1:06:39yep
- 1:07:10well let's let's think a little bit
- 1:07:14about that it has to do a lot about how
- 1:07:17you process that data right you can
- 1:07:20distract a steal a lot of information
- 1:07:22from data sets that people have access
- 1:07:25to the ideal in the ideal scenario you
- 1:07:27have access to data set that is unpatch
- 1:07:29and nobody has it but that doesn't mean
- 1:07:31that that's the only way of developing
- 1:07:33strategies you can work with data sets
- 1:07:36that people have been working on for a
- 1:07:38long time and yet uncover strategies why
- 1:07:41because you are not using return since
- 1:07:43the Revolution returns you're going to
- 1:07:45use fractional differentiation and
- 1:07:46you're going to come up with a theory
- 1:07:50before applying machine learning let me
- 1:07:53let me give you an example brief example
- 1:07:55suppose that many people in finance
- 1:08:00think that machine learning is a black
- 1:08:02box and every time I feel that I I'd
- 1:08:04roll my eyes because machine learning is
- 1:08:07not a black box you can use it as a
- 1:08:09black box but you can use that the black
- 1:08:11box anything anything you want there is
- 1:08:14a way of using machine learning in a way
- 1:08:16that is not a black box
- 1:08:17it's a white box and the way is the
- 1:08:19following suppose that you are given
- 1:08:24some variables and you know you are put
- 1:08:29in the same position as Sir Isaac Newton
- 1:08:33when he had to come up with his equation
- 1:08:36for gravitational force so you're given
- 1:08:39this series and and you have you know
- 1:08:42some some series are related to the mass
- 1:08:45of the objects the density of the
- 1:08:47objects the reflectivity you know their
- 1:08:52their dimensions with their shape the
- 1:08:56distance between objects right there are
- 1:08:58a bunch of variables and now you run all
- 1:09:00these variables through machine learning
- 1:09:01algorithm and the machine learning
- 1:09:03algorithm comes back with the following
- 1:09:04answer well there are really really
- 1:09:06three variables that are important here
- 1:09:08one is the mass of object one mass of
- 1:09:10object to and the distance between the
- 1:09:11objects and all the rest is rubbish is
- 1:09:13relevant all right now
- 1:09:17Sir Isaac Newton would tell you ha
- 1:09:19that's very interesting I would never
- 1:09:21figure that out now what is the equation
- 1:09:25what is the equation that relates these
- 1:09:27these three magnitudes and the answer is
- 1:09:29well you know does the funny thing about
- 1:09:31machine learning it doesn't tell us the
- 1:09:34equation it doesn't tell us the theory
- 1:09:35we just tell us that these three
- 1:09:38variables are very relevant now the way
- 1:09:42I like using machine learning is machine
- 1:09:47learning as a research tool it tells me
- 1:09:49what are the relevant variables and now
- 1:09:51I have to come up with a theory that is
- 1:09:55going to combine that information into
- 1:09:56in order to make a prediction so to come
- 1:10:00back to your to your question I'm not
- 1:10:02super swated that the only way is to
- 1:10:06utilize rare data sets sometimes you can
- 1:10:09use data sets that people utilize but
- 1:10:13you actually are going to learn and
- 1:10:14you're not going to use these machine
- 1:10:16learning methods as a black box you are
- 1:10:18actually trying you will try to make
- 1:10:20sense of this data in order to come up
- 1:10:22with an explanation of what's going on
- 1:10:24so that's an example in addition to
- 1:10:26using fractional differentiation using a
- 1:10:30better sampling methods better labeling
- 1:10:32methods and so on and so forth there is
- 1:10:34a lot you can do with standard data sets
- 1:10:39yep
- 1:10:52so you have this deflated stop ratio yes
- 1:10:56and can use that to tell us that which
- 1:10:59machine learning algorithm is better
- 1:11:01than the other one you have a do you
- 1:11:04have a comfort yes and also can you tell
- 1:11:07us intuitively how you use the deeply
- 1:11:10Sharpe ratio to tell us which one is
- 1:11:13false positive yes so there is the idea
- 1:11:16the deflected sharpen issues to take
- 1:11:18into account information of whether this
- 1:11:21is a Lackey discovering right and as you
- 1:11:25saw in the in in the this volcanic plot
- 1:11:27that I had there that looks like an
- 1:11:30eruption but it's not this heat map it
- 1:11:33you can target any sort of shot ratio
- 1:11:36that you want the question is once you
- 1:11:38once you have achieve a particular shot
- 1:11:40ratio it is something that you should
- 1:11:42expect just out of lack randomness and
- 1:11:45and that's what they deflate the
- 1:11:47Charbagh should does so in the in the
- 1:11:49course of your research you should take
- 1:11:51you should keep track of the number of
- 1:11:53experiments right essentially what you
- 1:11:54would do is you would collect all the
- 1:11:56returns all the time series of returns
- 1:11:58that you obtain from every Baptist this
- 1:12:00is you can DAC I handed back this now
- 1:12:02you're going to have a T by 100
- 1:12:05matrix where T is the number of returns
- 1:12:07per practice and now you are going to
- 1:12:10use that information to determine the
- 1:12:13number of independent factors that you
- 1:12:15have actually conducted and that's
- 1:12:17something that you can read in the paper
- 1:12:18that I Parrish last Monday so that's the
- 1:12:21way to extract this number here in this
- 1:12:26equation K and the way I use this and my
- 1:12:31team uses this is that people conduct
- 1:12:34all these factors and we know that
- 1:12:36eventually we are always going to come
- 1:12:38back routinely with false positives
- 1:12:41right what we need to be very careful
- 1:12:43about is when we are doing a strategy on
- 1:12:45any particular data set whether we have
- 1:12:50exhausted our lack essentially we are
- 1:12:53now we are so unlikely that we have made
- 1:12:55a lucky discovery and that's what we
- 1:12:58need to keep track of
- 1:12:59and that's that's one way that for
- 1:13:02instance this community could cooperate
- 1:13:04you you don't know how many experiments
- 1:13:06someone is conducting on the same
- 1:13:08dataset you're conducting other
- 1:13:10experiments but here is kwan talkin that
- 1:13:12is able to keep track of all the
- 1:13:13experiments so that would be one
- 1:13:14possible application thank you very much
- 1:13:25thank you that's great
About this transcript
This page contains the full transcript of The 7 Reasons Most Machine Learning Funds Fail Marcos Lopez de Prado from QuantCon 2018 by Quantopian, generated from the public captions YouTube serves with the video. The transcript has 10,001 words across 1,484 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.