YouTube2Text

Q1: You Don't Know How Wrong You Are · Delaney Mackenzie — Transcript

by Chat With Traders · 14,730 words · 2,013 segments · language en · Watch on YouTube

Full transcript

  1. 0:00chat with Traders collaboration with
  2. 0:02quantopian episode
  3. 0:05[Music]
  4. 0:131 okay what's up guys uh if this is your
  5. 0:16first time listening to chatwi Traders
  6. 0:18podcast my name is Aaron Firefield so
  7. 0:21welcome and big thanks for tuning in
  8. 0:25what you're listening to right now is
  9. 0:27not a regular episode this is AAL
  10. 0:30six-part miniseries in collaboration
  11. 0:32with quantopian uh for those unfamiliar
  12. 0:35with quantopian quantopian is a
  13. 0:38crowdsourced investment firm who provide
  14. 0:40pretty much anyone with an internet
  15. 0:42connection to data a research
  16. 0:44environment and a development platform
  17. 0:47to write their own algorithmic
  18. 0:49strategies uh select authors then may
  19. 0:51also license their strategies to
  20. 0:53quantopian and get paid based on
  21. 0:57performance now the overarching theme
  22. 1:00for this miniseries is a look into the
  23. 1:03workflow of a professional Quant trading
  24. 1:06firm I will say I would consider some of
  25. 1:08the topics discussed to be quite
  26. 1:11Advanced but if you're into this sort of
  27. 1:13thing I think you'll really enjoy it if
  28. 1:15not then that's also totally fine but I
  29. 1:18feel like this first episode at least
  30. 1:21has relevance to Traders and investors
  31. 1:23of all styles because this episode to
  32. 1:26kick things off is titled you don't know
  33. 1:29how wrong you are and we specifically
  34. 1:32discuss numerous biases and the many
  35. 1:34ways that you can actually be wrong
  36. 1:36without knowing it anyway I want to keep
  37. 1:39this intro short and sweet because
  38. 1:40you'll hear more about what to expect
  39. 1:42from this podcast series very soon and I
  40. 1:45still want to mention a couple things
  41. 1:47that are important to address so first
  42. 1:50thing to find any of the links and
  43. 1:52resources mentioned throughout this
  44. 1:54series you can go to quantopian
  45. 1:58docomo Traders to find everything there
  46. 2:01all in one place uh I'll also have the
  47. 2:04same on the chatwi Traders website so
  48. 2:07whatever is easiest for you uh second
  49. 2:10like I said after this first episode
  50. 2:12some of the topics get a little complex
  51. 2:14at times so if you want to ask something
  52. 2:18you can go to quantopian
  53. 2:21tocom questions and submit your
  54. 2:24questions there that way we can collect
  55. 2:26them all in one place and we will do our
  56. 2:28very best to answer as many as possible
  57. 2:31on the sixth episode which is actually
  58. 2:33dedicated to
  59. 2:36Q&A and thirdly this series is sponsored
  60. 2:40by data Camp so if you're Keen to learn
  61. 2:43a programming language or further
  62. 2:45develop your programming skills I really
  63. 2:48encourage you to check out datac
  64. 2:50camp.com I've done a bunch of their
  65. 2:52python online courses and they're
  66. 2:54brilliant they also have many courses
  67. 2:57teaching R all of which are centered
  68. 2:59around data science stats and finance so
  69. 3:04visit datac camp.com and create a free
  70. 3:06account to get started just to repeat
  71. 3:09that's datac camp.com check them out now
  72. 3:12without any further Ado please welcome
  73. 3:14Delaney from the academic arm of
  74. 3:16quantopian let's get into
  75. 3:20it all right so Delany what's up buddy
  76. 3:23how you doing uh not too much I mean I
  77. 3:26would I say that semi- dishonestly cuz
  78. 3:28things are as usual incredibly busy here
  79. 3:31but uh nothing too much this evening
  80. 3:33I've just got this and then I'm I'm
  81. 3:34heading home good stuff yeah yeah I can
  82. 3:37imagine I can imagine you've got
  83. 3:38quantcon coming up too so I imagine um
  84. 3:40that's just Amplified things yes well
  85. 3:43thank you for giving me the opportunity
  86. 3:45to write off the bat start uh start
  87. 3:47pitching this uh but yeah we have a
  88. 3:49quanon Singapore coming up it's the
  89. 3:51first time we've done it not in New York
  90. 3:53City um so we're excited about that it's
  91. 3:56going to be in November I think on the
  92. 3:5810th or 11th we're there's a few days of
  93. 4:00events but the URL is Quant con. SG in
  94. 4:03case anybody wants to check it out good
  95. 4:05stuff yeah I'm really Keen to make it
  96. 4:07along I don't know if I'll make it out
  97. 4:08there to the Singapore event but if not
  98. 4:11uh definitely the next New York one or
  99. 4:12saying I'm really Keen to make it along
  100. 4:14but anyway man I'm really excited to be
  101. 4:16doing this so just to set the scene here
  102. 4:18give us a rundown on who you are your
  103. 4:21background and tell us a little bit
  104. 4:23about quantopian
  105. 4:24too sure so uh I'm Delan my last name is
  106. 4:29long and complicated so we're you know
  107. 4:31it's it's out there on the internet you
  108. 4:33can find it if you want to mostly I just
  109. 4:35go by Delaney um my background
  110. 4:38personally is in uh computer science uh
  111. 4:42statistics and and math kind of you know
  112. 4:44at the intersection of all those three
  113. 4:46and I joined quantopian uh right out of
  114. 4:49school actually and I currently run uh
  115. 4:52the academic arm of the business uh
  116. 4:55namely uh kind of what quantopian does
  117. 4:58is we try to democratize quantitative
  118. 5:01Finance quantitative Finance is one of
  119. 5:04the fields in which the barriers to
  120. 5:06entry are just amazingly High I think
  121. 5:08that some of them are so high that you
  122. 5:11don't even know how high they are a lot
  123. 5:12of people um you know kind of will sit
  124. 5:15there and they'll say oh well I have
  125. 5:17this great idea for how I could trade
  126. 5:18stocks but they there's just no sense of
  127. 5:22the path that you would go through to
  128. 5:24actually get that from idea into real
  129. 5:27implementation so what Quanto does is is
  130. 5:30we try to provide as many of the tools
  131. 5:33uh and data sets that Banks and hedge
  132. 5:35funds would have access to as possible
  133. 5:37and provide them to everybody in the
  134. 5:39world uh regardless of background or or
  135. 5:42geography and uh make it so that anybody
  136. 5:45has a shot to actually try to implement
  137. 5:48some of these ideas personally I
  138. 5:50actually didn't know um much Finance
  139. 5:54before starting at quantopian my
  140. 5:55background again is in kind of uh
  141. 5:57computer science and stats and
  142. 6:00um I was so fascinated by what you could
  143. 6:03do with this stuff when I joined
  144. 6:05quantopian um that that helped me
  145. 6:07realize that a lot of people do come to
  146. 6:09our platform to learn and uh almost
  147. 6:14accidentally um I uh ran into a
  148. 6:18professor at Harvard um actually got
  149. 6:21introduced to him by someone else who
  150. 6:23was taking his course but I ran into him
  151. 6:25and uh
  152. 6:27basically discovered that he was using
  153. 6:29one of the same technologies that
  154. 6:31quantopian uses internally to teach his
  155. 6:33course namely these Jupiter notebooks
  156. 6:35and they're such a powerful teaching
  157. 6:37tool um and what we said is hey well why
  158. 6:41don't we use the same technology and try
  159. 6:44to teach quantitative Finance to our
  160. 6:46users because you know it's one thing if
  161. 6:48you have a great idea already and you're
  162. 6:50educated but another barrier to entry is
  163. 6:53that nearly nowhere teaches quantitative
  164. 6:56Finance um and since we want people to
  165. 6:59be
  166. 7:00uh you know writing great strategies on
  167. 7:02our platform we want people to be
  168. 7:04educated in in doing that so we've
  169. 7:06actually created uh kind of in through
  170. 7:09the process of working with a lot of
  171. 7:10professors at schools including uh
  172. 7:13Harvard Princeton MIT uh MIT Sloan
  173. 7:16specifically Cornell um and many others
  174. 7:19that I don't have you know time to name
  175. 7:22uh we developed the the quantopian
  176. 7:24lecture series and that's where honestly
  177. 7:27kind of I think a lot of content that we
  178. 7:29discussed
  179. 7:30uh over the next podcast is going to be
  180. 7:32drawn from the lecture series are kind
  181. 7:34of designed to bring you from kind of
  182. 7:36knowing nothing about quantitative
  183. 7:38Finance but knowing a little math and a
  184. 7:39little programming to really actually
  185. 7:41being able to uh compete uh with a Quant
  186. 7:45uh in industry and again like the goal
  187. 7:47of this is uh quantopian primary
  188. 7:51business model is to uh allocate money
  189. 7:55to the best ideas that are produced on
  190. 7:58the platform and and uh so we actually
  191. 8:02recently um had some big news in which
  192. 8:05uh
  193. 8:06we uh entered into an agreement with uh
  194. 8:1072 in which they would give us uh
  195. 8:13through a separately managed account
  196. 8:15access for to up to $250
  197. 8:18million uh subject to some constraints
  198. 8:21um to allocate out to uh to our uh users
  199. 8:26algorithms and so now the idea is that
  200. 8:28we're trying to grow the size of
  201. 8:29allocations that we can make to
  202. 8:31algorithms on our website and uh pay the
  203. 8:34users uh a percentage of profits that
  204. 8:36they make on the algorithm so that's
  205. 8:38that's our our our main business model
  206. 8:41is doing a profit sharing um on
  207. 8:43algorithms that are sourced from our
  208. 8:45community and kind of our our Dream user
  209. 8:48our Dream use case is someone who comes
  210. 8:50from a background or region where they
  211. 8:53traditionally would just not have access
  212. 8:55to quantitative Finance they just
  213. 8:57wouldn't be able to do this but through
  214. 8:59quantopian um are able to kind of you
  215. 9:02know work hard be smart design a really
  216. 9:04good strategy and actually get an
  217. 9:07allocation and make kind of on the order
  218. 9:09the same amount of money that a a
  219. 9:11professional Quant would uh for doing
  220. 9:14the same work so our goal is really to
  221. 9:15make it way more mer meritocratic than
  222. 9:17it than it currently is and try to
  223. 9:19flatten out the playing field um within
  224. 9:22Quant Finance yeah right now just to
  225. 9:24pick up on a few things you said there
  226. 9:26right back at the very beginning you
  227. 9:28mentioned that the barriers to entry uh
  228. 9:30to becoming a Quant are very high in
  229. 9:33most cases why are these barriers to
  230. 9:36entry so high like is it the the
  231. 9:38knowledge that's necessary is it the
  232. 9:40expensive data that's required is it the
  233. 9:43tools I mean is it a mixture of
  234. 9:45everything what why are the barriers so
  235. 9:48high and unattainable for many I think
  236. 9:51it's in all of the above circumstance
  237. 9:53there's a lot of Industry forces in
  238. 9:56finance which push towards Secret
  239. 10:00and push towards not sharing what you
  240. 10:02have in any way and if you look at the
  241. 10:06way that traditional Finance firms have
  242. 10:07operated uh they've operated in this way
  243. 10:09that like all intellectual property that
  244. 10:11is generated at that firm belongs to the
  245. 10:14firm and it is incredibly rare for a
  246. 10:18firm to open up that intellectual
  247. 10:20property in any way um that is kind of a
  248. 10:23firms lifeblood in many cases and in the
  249. 10:26traditional business model uh you're you
  250. 10:29know activities are highly dependent on
  251. 10:31your ideas being new and and your ideas
  252. 10:33being unique and that nobody else can
  253. 10:35figure them out what that's led to is
  254. 10:37this circumstance in which um not only
  255. 10:39in many cases is the academic field kind
  256. 10:42of far behind industry practitioners or
  257. 10:44you just kind of going off in another
  258. 10:46Direction that's not really related uh
  259. 10:49but uh it's really you just don't even
  260. 10:51know what has to get done um you know
  261. 10:55things that would be kind of absolutely
  262. 10:57essential to a Quant work flow and as an
  263. 11:01example I'd say like uh strategy
  264. 11:04Capacity Analysis in that every trading
  265. 11:07strategy you know has um a minimum and
  266. 11:10maximum capacity that you can put
  267. 11:12through it and quants do all sorts of
  268. 11:15analyses on that capacity to kind of
  269. 11:17figure out how much they should be
  270. 11:19allocating to each strategy in their
  271. 11:21portfolio and and how they should adjust
  272. 11:23that over time and things like that if
  273. 11:25you know you're not already in that
  274. 11:27Community you just might not even have
  275. 11:30any idea have to be done and and you
  276. 11:32know there's so many sticking points
  277. 11:33that you can get stuck on when you're
  278. 11:35trying to do this on your own yeah you
  279. 11:37brought up the the fact of um you know
  280. 11:39there's a lot of secrecy that surrounds
  281. 11:41this you know a firm does need to be
  282. 11:45somewhat secretive about their
  283. 11:47operations though don't they to you know
  284. 11:50be viable and stay uh in in the game
  285. 11:53essentially is that the case like that's
  286. 11:55that level of secrecy is necessary so I
  287. 11:59I mean if if you make the argument that
  288. 12:02if assigning secrecy some kind of linear
  289. 12:04score between Z and 100 and you make the
  290. 12:06argument that some level of secrecy is
  291. 12:08necessary I would say yes but where it
  292. 12:11falls in there is highly dependent on
  293. 12:14the business model of the firm the you
  294. 12:17know lots of other factors I
  295. 12:19mean as an example one of the first
  296. 12:22things that quantopian did is that we
  297. 12:23actually open- sourced um pretty much
  298. 12:26most or all of our code base not all
  299. 12:29because you know we still had some
  300. 12:30proprietary code but kind of most of our
  301. 12:32codebase and I there may have been
  302. 12:34sometime in the history of the business
  303. 12:35I'm not sure but there may have been
  304. 12:37sometime a history of the business in
  305. 12:38which all of our codebase was open
  306. 12:39sourced um but we have a GitHub page for
  307. 12:43those of you who are are technical
  308. 12:44you'll know what that means for those of
  309. 12:46you who aren't GitHub is just a
  310. 12:48basically a a a a service that um
  311. 12:51companies use to store all their code
  312. 12:53that they've written and and you can
  313. 12:55make it open and freely available or or
  314. 12:57closed in private and we've made uh our
  315. 13:00back tester code many of our libraries
  316. 13:03just open and freely available and that
  317. 13:04that was something we did right off the
  318. 13:05bat um and the hypothesis was that
  319. 13:09open-source code you know you can have
  320. 13:12thousands of eyes on that piece of code
  321. 13:14and thousands of people looking at that
  322. 13:15code and finding bugs and making it
  323. 13:17better um and that's what we observe we
  324. 13:19have you know I don't even know how many
  325. 13:21views we've had on the on the zipline
  326. 13:23which is our back tester our zipline uh
  327. 13:26codebase and uh as a result you know
  328. 13:29like four years times you know thousands
  329. 13:33of eyes looking at that code have
  330. 13:35produced so many bugs so many bug
  331. 13:38reports have come out of you know having
  332. 13:39that thing be freely and available and
  333. 13:42open and and I just can't imagine that a
  334. 13:45system that's written internally at a
  335. 13:47hedge fund and maintained by five
  336. 13:49Engineers who look at it maybe you know
  337. 13:50like eight hours a day each um I just
  338. 13:54can't imagine that that system would be
  339. 13:57you know in any way bug free because
  340. 13:59because uh we have found so many bugs
  341. 14:01and we're still finding bugs in our
  342. 14:03system you know after 4 years and uh a
  343. 14:07bank that you know has two years times
  344. 14:09five Engineers looking at this thing is
  345. 14:11there's just no comparison yeah and that
  346. 14:13actually reminds me you know with on the
  347. 14:16quantopian platform uh users use python
  348. 14:19as the the programming language uh
  349. 14:22pandas which is a python Library uh if I
  350. 14:26understand correctly that actually came
  351. 14:27was originally developed
  352. 14:29by a person a man who worked within a
  353. 14:32hedge fund is that right yeah that's
  354. 14:34exactly right I believe that's Wes mckin
  355. 14:36you're talking about if I'm not getting
  356. 14:38my people confused and uh he was working
  357. 14:42at a hedge fund and he was saying well
  358. 14:44Python's great for most of what we have
  359. 14:46to do but you know there's some there's
  360. 14:49some key things that are lacking and so
  361. 14:51he said well why don't we just build
  362. 14:53those key things that are lacking and
  363. 14:54these are kind of General basic tools
  364. 14:56that could benefit everybody and I'm
  365. 14:58talking like people in finance people in
  366. 15:00science people in data science all
  367. 15:02across the field and uh so he built
  368. 15:05those tools he made it open source and
  369. 15:08as a result pandas has become this
  370. 15:10amazingly useful Library amazingly high
  371. 15:12quality library of code that's in use at
  372. 15:14so many funds all over the place um but
  373. 15:18you know it's kind of it's not a zero
  374. 15:20sum game many people think of it as a
  375. 15:22zero sum game and and some very specific
  376. 15:25parts of Finance if you zoom in close
  377. 15:27enough are a zero sum game but in in
  378. 15:29many ways it's not a zero sum game and I
  379. 15:31think that that's kind of the the the
  380. 15:33the failure um of logic when people try
  381. 15:37to keep everything super secret all the
  382. 15:39time with no exception okay and just so
  383. 15:41there's no confusion here would you mind
  384. 15:43explaining what a zero sum game is
  385. 15:46that's a good point so in economics uh
  386. 15:50specifically kind of game theory which
  387. 15:52is a branch of Economics which deals
  388. 15:53with uh what decisions kind of should
  389. 15:57one make uh if you are trying to
  390. 16:00optimize some you know utility some
  391. 16:02objective function you're saying I want
  392. 16:04the most money or I want the most
  393. 16:06happiness um and you're trying to say
  394. 16:08what decisions should you make in the
  395. 16:09presence of other people also playing
  396. 16:12the game often you know it's not just
  397. 16:14you who's making these decisions uh a
  398. 16:17zero sum game refers to the case in
  399. 16:19which um you know the amount that you
  400. 16:23get and the amount that the other person
  401. 16:25or other players get have to add to the
  402. 16:27same things so or or have to add to a
  403. 16:30single quantity so if you get more it
  404. 16:32means someone else is getting less and
  405. 16:34vice versa and that's the notion of a
  406. 16:36zero sum game is that you have to
  407. 16:37compete um and your competition and your
  408. 16:40success hurts others and and and your
  409. 16:41failure benefits others and um that
  410. 16:46again it's true in some cases but I I
  411. 16:49really don't think it's nearly as common
  412. 16:52uh as people think it is and in fact one
  413. 16:53interesting thing that I could talk for
  414. 16:55about for hours and and we don't have
  415. 16:58time to delve into but um many people
  416. 17:00learn basic Game Theory what know as
  417. 17:04equilibriums which are kind of optimal
  418. 17:05strategies to take uh game theory
  419. 17:07equilibriums in in in school especially
  420. 17:10if you'll take like kind of intro to
  421. 17:11economics courses and uh those
  422. 17:14equilibriums kind of uh in the same way
  423. 17:16that many physics theorems are proved in
  424. 17:19vacuums with no friction those
  425. 17:21equilibriums are often proved
  426. 17:23mathematically assuming many things and
  427. 17:26these things include assumptions about
  428. 17:27like infinite computing power and
  429. 17:29perfect information um and never seeing
  430. 17:32this person again ever you know like
  431. 17:34these are called like single single play
  432. 17:36games and what computer scientists have
  433. 17:39done recently they said that that really
  434. 17:40does not sound like a reasonable set of
  435. 17:42assumptions to model the real world and
  436. 17:44so they went back in and they've they've
  437. 17:46simulated these games in the presence of
  438. 17:48things like inefficient information
  439. 17:51transfer and and uh inconsistent
  440. 17:54geographical distribution of of people
  441. 17:56and all sorts of you know real world
  442. 17:58type conditions
  443. 17:59and what they find is that whereas the
  444. 18:02you know very uh sanitary um I would
  445. 18:05argue unrealistic assumptions that are
  446. 18:07made in the original equilibrium proofs
  447. 18:09say that you're always better off kind
  448. 18:11of backstabbing people and you're rarely
  449. 18:13good collaborating because the risk of
  450. 18:15someone else backstabbing you is too
  451. 18:17high uh what's found is that when you re
  452. 18:20simulate these games in the presence of
  453. 18:22real world conditions often times the
  454. 18:24reverse holds true and cooperation and
  455. 18:26generally being nice tends to be of the
  456. 18:29optimal strategy in those cases right
  457. 18:31right
  458. 18:32okay I again you can tell I'm a little I
  459. 18:35could rant about this for a while
  460. 18:37because it it is a it is a sticking
  461. 18:39point for me that so many people go
  462. 18:40through these interlevel courses and and
  463. 18:42graduate into life thinking that you
  464. 18:44know uh screwing over other people is a
  465. 18:47is a is the best thing to do okay no
  466. 18:50that's excellent now just to pick up on
  467. 18:53something you bought up earlier uh the
  468. 18:55$250 million from uh investment from
  469. 18:59Steve Cohen at uh 72 um what does this
  470. 19:02mean for users like how is this actually
  471. 19:04going to change what's been happening
  472. 19:06sort of to date and moving forward once
  473. 19:09this um investment sort of comes into
  474. 19:12play sure so I mean when we talk about
  475. 19:16um anything to do with allocation I just
  476. 19:18have to be you know a little careful to
  477. 19:20to make sure I don't say anything
  478. 19:22inaccurate cuz you know we now have to
  479. 19:25start uh preparing to to make sure that
  480. 19:27we're uh SEC compliant um and you know
  481. 19:32they they monitor any statements you
  482. 19:34will make about you know Investments and
  483. 19:37and in general also I like to be
  484. 19:38accurate about these things but
  485. 19:40specifically what this meant what this
  486. 19:42means is that um point72 has agreed to
  487. 19:47make available to strategies on
  488. 19:50quantopian up to $250 million and that's
  489. 19:53going to be released uh over the course
  490. 19:55of a year uh and there are certain you
  491. 19:57know performance con straints that are
  492. 19:59going to be have to be satisfied um of
  493. 20:02the strategies that that are picked uh
  494. 20:04you know so it's not just like uh $250
  495. 20:06million cash is getting delivered to
  496. 20:08anybody here um it's you know it's a
  497. 20:11it's a well-reasoned deal and uh what
  498. 20:14that means though is that uh
  499. 20:16previously um any allocations we were
  500. 20:19able to make to the strategies that we
  501. 20:21liked in the community tended to be very
  502. 20:24small um and they were basically kind of
  503. 20:26test allocations that we made off of our
  504. 20:29balance sheet and uh now what we can
  505. 20:32finally do is start ramping up the size
  506. 20:35of allocations and uh our goal is just
  507. 20:38to ramp the size of the allocations up
  508. 20:41higher and higher uh until the
  509. 20:43portfolios that are being managed um by
  510. 20:46algorithms on quantopian are kind of you
  511. 20:49know as big as the portfolios that you
  512. 20:51would see at large financial
  513. 20:53institutions and and therefore the
  514. 20:54people who wrote those algorithms can
  515. 20:57get paid on the same scale as people at
  516. 21:00the large financial institutions uh and
  517. 21:02again all of this is contingent on the
  518. 21:04strategy itself performing and
  519. 21:07quantopian being able to secure um you
  520. 21:10know uh Capital to allocate out to
  521. 21:12algorithms but that's that's our goal
  522. 21:15yeah now that's really excellent I mean
  523. 21:17um it's a huge win for you guys and
  524. 21:19obviously uh users of the platform too
  525. 21:21so no that's very cool um now let's
  526. 21:24let's get into this so you know this is
  527. 21:26going to be the first episode of about
  528. 21:28six we're going to be doing another four
  529. 21:30episodes after this and then a Q&A uh at
  530. 21:33the end um what's the overarching theme
  531. 21:36of this series obviously I've given a
  532. 21:38quick summary in the pre-recorded intro
  533. 21:41for this episode but let's hear your
  534. 21:43take on what someone can expect to learn
  535. 21:44from listening to this series sure so
  536. 21:48like I said I think what we're trying to
  537. 21:50do here is we're trying to give more
  538. 21:52windows into the workflow of a
  539. 21:55professional Quant or a professional
  540. 21:57quantitative Finance firm and this is
  541. 22:01some of this is really complicated stuff
  542. 22:03you know I'm not going to sugarcoat it
  543. 22:04some of this is is really hard stuff and
  544. 22:07you know you shouldn't expect to listen
  545. 22:09to a podcast and then you know come out
  546. 22:11being able to uh do some kind of
  547. 22:15multivariate portfolio optimization
  548. 22:17analysis but um the goal is to kind of
  549. 22:21give you some some some holding points
  550. 22:24give you some points some some skeleton
  551. 22:27such that uh if you're interested in
  552. 22:29learning more um you kind of see some of
  553. 22:33the paths that you can take and and
  554. 22:35point you to resources that you can use
  555. 22:37to to start fleshing out your knowledge
  556. 22:38of the system so again like the goal is
  557. 22:41to going to be to give you like a a
  558. 22:43broad understanding of the lay of the
  559. 22:45land uh and and how quants work and how
  560. 22:47they're different from other Traders and
  561. 22:50uh you know what they do and what they
  562. 22:52don't do and what they worry about at
  563. 22:53night um but you know not necessarily to
  564. 22:56be able to execute on any of the tech
  565. 22:58techniques that Quant quants use because
  566. 23:00honestly that just requires more time to
  567. 23:02learn and more hands-on experience um
  568. 23:05one thing I will say just right off the
  569. 23:07bat is uh quantopian again maintains
  570. 23:10this lecture series uh as a resource in
  571. 23:13addition to tutorials and if you go to
  572. 23:15quantopian dcom
  573. 23:18sln uh SL learn will get you to a page
  574. 23:21when you can see tutorials if you just
  575. 23:23want to learn like how to get started on
  576. 23:25the platform and also it will have a
  577. 23:27link to the lecture series
  578. 23:29um where you can kind of get at more of
  579. 23:31this stuff in a in a in a much more
  580. 23:33Hands-On way and actually play with the
  581. 23:35code and see what happens in addition
  582. 23:37we're also try to set up uh some uh uh a
  583. 23:41post on our blog uh so that we can kind
  584. 23:44of uh collect any of the resources and
  585. 23:46links that we talk about in these
  586. 23:48podcasts and and make there be kind of a
  587. 23:49a single source for people who want to
  588. 23:52just go there and look at it all at once
  589. 23:54but that's something we'll we'll be
  590. 23:55setting up um at some point and
  591. 23:57depending on the magic of of of free
  592. 23:59recording it may or may not be available
  593. 24:01at the time you're listening to this
  594. 24:03podcast yeah we'll definitely sort
  595. 24:05something out in that regard but anyway
  596. 24:07the title of this episode being the
  597. 24:09first episode is you don't know how
  598. 24:13wrong you are do you want to explain why
  599. 24:16we've why we've titled it this well I
  600. 24:18mostly because you don't know how wrong
  601. 24:20you are as The Listener um and uh what I
  602. 24:24mean by that is one of the main
  603. 24:27differences I would say between a
  604. 24:30non-statistical and a statistical
  605. 24:33framework for thinking about the world
  606. 24:35is that a lot of Statistics is an effort
  607. 24:38to quantify certainty and quantify
  608. 24:43uncertainty and say more so than make
  609. 24:46this choice or don't make this Choice
  610. 24:49really look at like the distribution of
  611. 24:51outcomes um that you could have after
  612. 24:53making a choice or not making a choice
  613. 24:56uh and and and try to estimate hey how
  614. 24:59certain am I that this choice is the
  615. 25:01right one and how how uncertain am I
  616. 25:04about you know these choices that I'm
  617. 25:06making in general and one of the things
  618. 25:09that you know I I find pops up quite
  619. 25:12consistently uh especially when I talk
  620. 25:14to people who aren't from a quantitative
  621. 25:16background or kind of came from a
  622. 25:18non-quantitative background and
  623. 25:19transitioned into trying to do more
  624. 25:21Quant stuff is that something that you
  625. 25:23learn when you go through a kind of a a
  626. 25:26classic statistics education either
  627. 25:28undergrad or graduate program is you
  628. 25:30learn a lot of these biases and a lot of
  629. 25:32these things that can come back and and
  630. 25:34bite you and and and just be completely
  631. 25:36invisible if you don't know about them
  632. 25:39and um one of the one of the examples of
  633. 25:42this that I I'll just go over briefly to
  634. 25:44start is something called multiple
  635. 25:47comparisons bias and multiple
  636. 25:49comparisons bias refers to uh you know
  637. 25:53it's a fancy name it sounds complicated
  638. 25:55but it refers to something that's pretty
  639. 25:57simple and kind of core and in fact I
  640. 26:00think everybody is vulnerable to this
  641. 26:02like even you making your your life
  642. 26:04choices you know about in general
  643. 26:05regardless of what you're doing on a
  644. 26:07computer with Finance or vulnerable to
  645. 26:08this and what multiple comparisons bias
  646. 26:11means is the following so when you are
  647. 26:14looking at some event or some piece of
  648. 26:17data and you're trying to decide you
  649. 26:19know whether some other thing is true
  650. 26:22whether this data is significant whether
  651. 26:24it reflects some overall trend you know
  652. 26:27you you do some kind of test and that
  653. 26:30test might be a rigorous statistical
  654. 26:32test that you do on your computer uh
  655. 26:35that test might be something just inside
  656. 26:36your head that you just say yeah I think
  657. 26:39this is significant you know it could be
  658. 26:41either uh it could be you know you get
  659. 26:43in a bunch you get into a room a bunch
  660. 26:45of people talk about it and then you all
  661. 26:46end up voting you know these are all
  662. 26:49processes that transform that data into
  663. 26:53a yes no
  664. 26:55decision and whenever you have a test
  665. 26:58like this if you make uh you know each
  666. 27:02test is not perfect so there's a chance
  667. 27:05that you get the wrong answer right and
  668. 27:08so let's say let's look at the case in
  669. 27:10which um you know you're looking for
  670. 27:13examples of when to trade and you're
  671. 27:15your your your data is flowing in and
  672. 27:17you're looking for examples of when you
  673. 27:19should pull the trigger and actually
  674. 27:21place a position and uh every time you
  675. 27:24look at that data you're making a test
  676. 27:26you're saying you know should I trade or
  677. 27:28should I not trade and there's a chance
  678. 27:31that there's a false positive right
  679. 27:33there's a chance that your test misfires
  680. 27:36and says yes you should trade when
  681. 27:38really you shouldn't trade and there was
  682. 27:40something maybe the data just popped up
  683. 27:42happened to look like the pattern you
  684. 27:43were looking for um you know you don't
  685. 27:46know something happened that caused it
  686. 27:47to to be a false positive
  687. 27:50and because your test is imperfect the
  688. 27:54rate of false positives is not going to
  689. 27:55be zero you know you're going to get
  690. 27:57some percentage of false positives and
  691. 28:01as you make more and more tests the
  692. 28:04overall number of false positives that
  693. 28:07you should expect to get gets higher and
  694. 28:09what I mean by this is let's say that
  695. 28:11the chance in every test that you get
  696. 28:13you get it wrong is is is 5% let's say
  697. 28:15the chance that you get a false positive
  698. 28:17is 5% well if you run 1,000 tests you
  699. 28:23know and that's not too unreasonable you
  700. 28:24make you make thousands of decisions
  701. 28:26every day in your regular life if you
  702. 28:28you run 1,000 tests you should expect to
  703. 28:30be
  704. 28:32wrong 50 of those times cuz 5% of 1,000
  705. 28:36is 50 and you should expect 50 false
  706. 28:39positives to pop up from a body of 1,000
  707. 28:42tests um and the danger is let's say
  708. 28:46that you know you you look at a thousand
  709. 28:49different choices and you run your test
  710. 28:51on each you will get 50 choices that
  711. 28:55look good just place just based on
  712. 28:57random chance you know and some of them
  713. 28:59may be good and some of them may not be
  714. 29:01good but you know you don't know there's
  715. 29:03no way to distinguish between them just
  716. 29:04from the data you already have so that's
  717. 29:06that's an example of a bias that a lot
  718. 29:09of people just don't even think about
  719. 29:11when they're going through their lives
  720. 29:12when they're trading whatever they're
  721. 29:14doing but is really core to how a
  722. 29:17statistician thinks about the world and
  723. 29:19and is an example I think of um you know
  724. 29:22people just not knowing how wrong they
  725. 29:24might be when they make decisions right
  726. 29:27so first thing want to ask you based off
  727. 29:29of that is what is a false positive
  728. 29:32maybe if you could just explain that for
  729. 29:34anyone listening who might be unsure
  730. 29:36yeah so I think a lot of the language in
  731. 29:38in modern statistics came from how it
  732. 29:40was developed and and statistics was
  733. 29:43developed uh you know there's a few
  734. 29:45major uses when it originally started
  735. 29:47you know getting off the ground and one
  736. 29:48of those was kind of medical uh you
  737. 29:51that's a natural source of of you want
  738. 29:53to gather data about how sick people are
  739. 29:55and when they get sick and uh let's say
  740. 29:57you're testing for for a disease um well
  741. 30:00you say someone is positive or negative
  742. 30:02for a disease right let's say you're
  743. 30:03testing someone for the common cold and
  744. 30:05you you have some test which is based on
  745. 30:08the symptoms you see and you you write
  746. 30:10the symptoms down and the computer you
  747. 30:12know says here's a score and if the
  748. 30:13score is above something you say yes
  749. 30:15they have a cold if it's below something
  750. 30:16you say no they don't so you know very
  751. 30:18common workflow so in that case a false
  752. 30:21positive would be when your test says
  753. 30:25yes they have a cold but they don't
  754. 30:28actually have a cold and the test saying
  755. 30:32yes was based on the data randomly
  756. 30:35lining up in such a way that it looked
  757. 30:39like they had a cold when actually they
  758. 30:41didn't uh and this can happen
  759. 30:43equivalently if you're saying um I'm
  760. 30:46going to test to see if two stocks um
  761. 30:50move in the same way if they're
  762. 30:52correlated you know and if you look at
  763. 30:54many many pairs of stocks and try to say
  764. 30:57are you know give me some pairs that
  765. 30:59move in the same way so I can try to
  766. 31:01trade off of them um you're likely to
  767. 31:04come up with some pairs that just have
  768. 31:08happened to move similarly in the past
  769. 31:11but that's not really indicative of any
  770. 31:13relationship and it's because the data
  771. 31:15just happened to kind of line up in that
  772. 31:17in in that way does that make sense it
  773. 31:20does yeah so I mean just going back to
  774. 31:22that um that example you gave there of
  775. 31:24the stocks I think that's a really good
  776. 31:25one so you know you said it it just so
  777. 31:29happened that the data happened to line
  778. 31:31up and these two stocks appeared that
  779. 31:33they were correlated I mean why were
  780. 31:36they not correlated why was it a matter
  781. 31:39of a matter of fact that the data just
  782. 31:41happened to
  783. 31:43be that way so that it looked correlated
  784. 31:46why were they not actually correlated
  785. 31:48does that make sense yeah absolutely and
  786. 31:50I will say that as we talk about this if
  787. 31:52anybody is interested in kind of seeing
  788. 31:55this in a more rigorous setting we have
  789. 31:57a a lecture called Paris trading in the
  790. 32:00lecture series and and that Paris
  791. 32:02trading lecture actually deals with a
  792. 32:03situation that's pretty similar to this
  793. 32:05so if you want to actually muck around
  794. 32:07with real examples of this and and and
  795. 32:09see this all laid out in front of you um
  796. 32:11check out that lecture but we'll talk
  797. 32:13we'll start with a super simple example
  798. 32:15right let's say that you represent
  799. 32:17stocks as up or down right you you don't
  800. 32:20actually care about the magnitude of the
  801. 32:22returns but you just have you have up or
  802. 32:24down at each minute or day whatever you
  803. 32:27want to whatever your sample frequency
  804. 32:30is right um and so let's say that you're
  805. 32:32looking at stocks and you have uh one
  806. 32:36minute worth of data so again super
  807. 32:38simple example but you know we'll we'll
  808. 32:41we'll blow out from here and hopefully
  809. 32:42it should become like apparent um how
  810. 32:45this works but let's say you have one
  811. 32:47minute's worth of data and stocks can go
  812. 32:49up or down and you're looking at two
  813. 32:51stocks right what's the chance that they
  814. 32:55both end up moving in the same direction
  815. 33:01and it's it's it's not a trick question
  816. 33:03I mean the answer is if they can one can
  817. 33:05so if one can go up and if one can go
  818. 33:07down uh then it's a 50% chance that they
  819. 33:10line up and and you can kind of you can
  820. 33:12you can do out the probabilities on a
  821. 33:14piece of paper if you want to convince
  822. 33:15yourself of this but it's basically the
  823. 33:17same as flipping two coins and saying
  824. 33:19what's the chance that they both come up
  825. 33:21the same you know not that they both
  826. 33:23come up heads but what's the chance that
  827. 33:25they both come up the same and so
  828. 33:28once you have that you know fixed
  829. 33:30non-zero probability well let's say now
  830. 33:32you have two time points you know and
  831. 33:35then you say what's the chance that both
  832. 33:38stocks ended up um you know going in the
  833. 33:41same exactly the same over those two
  834. 33:43time points and it's some probability
  835. 33:45know you can work it out and then three
  836. 33:47time points and and four time points and
  837. 33:49you extend it all out and so now it's
  838. 33:50like to 100 time points right so you
  839. 33:53have 100 time points and you're
  840. 33:54representing the stocks is just up or
  841. 33:56down the chance that you know they're
  842. 34:01both have going to they're both have
  843. 34:02going to done the exact same thing and
  844. 34:04all of those time points is is minuscule
  845. 34:08right and so if you looked at two stocks
  846. 34:11and you said wow they have been exactly
  847. 34:15the same over the last 100
  848. 34:17samples what a statistical test is
  849. 34:19really getting at is like what is the
  850. 34:21likelihood that I would have observed
  851. 34:24this Behavior if they were if there's no
  852. 34:27underlying
  853. 34:28relationship and and the likelihood is
  854. 34:30super low if if they're just moving
  855. 34:32randomly the chance that they would have
  856. 34:34lined up over 100 time points super low
  857. 34:37so in practice though you know they're
  858. 34:40not just moving up or down and there's
  859. 34:42going to be some noise right and so what
  860. 34:45you do is you look at the two movements
  861. 34:47and you say how similar are they right
  862. 34:51it's not just exact or not exact it's
  863. 34:54like you know how many of how much of
  864. 34:56the time do they both move up how much
  865. 34:57of the time do they both move down and
  866. 34:59so the probability that two stocks line
  867. 35:02up in a way that's like enough to pass
  868. 35:05your test starts increasing it's not
  869. 35:09like you know something minuscule
  870. 35:11anymore now it's let's say you know it's
  871. 35:13it's uh it's 1% that the chance over 100
  872. 35:16time points they move similarly enough
  873. 35:19so that they pass your test and so again
  874. 35:22now we're at this point where it's 1%
  875. 35:24and there's a 1% chance of a false
  876. 35:27positive in which you have two random
  877. 35:29stocks but they have happened to move
  878. 35:31similarly enough over the last 100 time
  879. 35:34points that they pass your test of being
  880. 35:36related even though they're not related
  881. 35:39and so if you do a 100 different tests
  882. 35:42on different pairs of stocks you should
  883. 35:44expect to get one that pops out one pair
  884. 35:49because you should expect 1% of those
  885. 35:51tests to have false
  886. 35:53positives so does that make sense and
  887. 35:55how like basically what you're looking
  888. 35:57at is the false positive rate is the
  889. 36:00rate at which two random things can line
  890. 36:03up enough to pass your test but in
  891. 36:07incorrectly and and different tests have
  892. 36:09different false positive rates and in
  893. 36:11statistics one of the really nice things
  894. 36:14is that you can calibrate the false
  895. 36:17positive rates and you can kind of test
  896. 36:18what they are and you can know about
  897. 36:20them and one of the problems is is that
  898. 36:22if you're just making these decisions in
  899. 36:23your head or in some other method it's
  900. 36:26pretty much imposs possible not
  901. 36:28impossible but it's pretty close to
  902. 36:29impossible to really effectively
  903. 36:32calibrate those decisions and know what
  904. 36:35your false positive rate is okay so it
  905. 36:39really kind of comes back to the
  906. 36:42underlying relationship and there
  907. 36:43actually been some meaning as to why
  908. 36:45those two stocks should be correlated or
  909. 36:48shouldn't be correlated right yeah so I
  910. 36:51mean statistics is really about testing
  911. 36:53for relationships in your data and and
  912. 36:57deciding like what is the certainty I
  913. 36:59have that this relationship is real or
  914. 37:02that it's just kind of nonsense and
  915. 37:05again like two things can line up so
  916. 37:09that they look like they're related and
  917. 37:11they're actually not and that happens
  918. 37:13all the time you know all the time and a
  919. 37:15famous example of this is uh I forget
  920. 37:18which website does this but if you kind
  921. 37:20of Google weird correlations um you will
  922. 37:24find I think if if I'm if I'm remember
  923. 37:27incorrect L uh you'll find websites
  924. 37:31um that show you correlations on
  925. 37:35historical data and so I just pulled one
  926. 37:37up and uh this website is called uh
  927. 37:40spous spous is the statistics word for
  928. 37:43kind of like not really meaningful spous
  929. 37:46correlations and uh this this they give
  930. 37:49you a random correlation and so the
  931. 37:51random correlation they give you is if
  932. 37:53you look at the last uh 10 years in the
  933. 37:56US the
  934. 37:58and you sample us or sorry if you yeah
  935. 38:02let's look at the last 10 years in the
  936. 38:03US and if you look at the number of
  937. 38:05people who drowned falling into a pool
  938. 38:08and if you look at uh the number of
  939. 38:11films that Nicholas Cage appeared in
  940. 38:14they line up pretty
  941. 38:17closely like pretty closely right and
  942. 38:20you'd look at this You' be like oh my
  943. 38:21goodness there's a there's likely a
  944. 38:24relationship there that I I should look
  945. 38:26into this um but of course what's
  946. 38:28happening is just that there's just so
  947. 38:29many things so many things you can keep
  948. 38:32track of that over that Incredible
  949. 38:34Universe of things the chance that two
  950. 38:37of them don't happen to line up over
  951. 38:39some time period is super low so what
  952. 38:42they're doing is they're just saying
  953. 38:44because there's so many possible
  954. 38:46relationships there's so many things I
  955. 38:48track there's so many possible
  956. 38:49relationships I just have to look at
  957. 38:51like a a thousand relationships and one
  958. 38:54will pop up that looks pretty close um
  959. 38:58and and that's this notion of kind of
  960. 38:59multiple comparisons bias right no
  961. 39:02that's that's awesome I think you've
  962. 39:03done a really good job of explaining
  963. 39:05this Delaney um I appreciate you you
  964. 39:07know really fleshing this out so
  965. 39:09sticking in line with the theme of this
  966. 39:11episode you don't know how wrong you are
  967. 39:13let's go into some of the other biases
  968. 39:16let's let's talk about overfitting what
  969. 39:18is overfitting and maybe let's talk
  970. 39:20about some best practices for how to
  971. 39:23avoid
  972. 39:25overfitting sure so uh again if people
  973. 39:28want to like muck around with this more
  974. 39:30there's a there's a full lecture in the
  975. 39:32quantopian lecture series on on
  976. 39:33overfitting and again you can get to the
  977. 39:35lecture series if you to quantopian dcom
  978. 39:37learn or directly if you wanted by
  979. 39:39quantopian dcom lectures and overfitting
  980. 39:43at its core I would say is actually kind
  981. 39:46of one of the biggest problems that
  982. 39:48people deal with in finance and what it
  983. 39:50is
  984. 39:52is um it's it's similar to multiple
  985. 39:55comparisons bias so like kind of try to
  986. 39:57keep the same same kind of ideas
  987. 40:00floating around in your head if you can
  988. 40:02um but the idea is that if you look at
  989. 40:05some set of data you know and again you
  990. 40:08you're making decisions you're looking
  991. 40:10at some set of data some of that data is
  992. 40:12going to be you know if it's the right
  993. 40:14data set some of that data is going to
  994. 40:16be like useful data you can make
  995. 40:18decisions off of it it's related to the
  996. 40:20thing that you're trying to predict um
  997. 40:22and then some of that data is just going
  998. 40:24to be random noise you know and and as
  999. 40:26an example of this this let's say that
  1000. 40:28you're trying to model uh temperature
  1001. 40:32you know and temperature in some
  1002. 40:34neighborhood and you have a data set and
  1003. 40:36the data set is the temperatures of all
  1004. 40:39the surrounding neighborhoods you know
  1005. 40:41as measured by by the the the the
  1006. 40:44thermometers in in the surrounding
  1007. 40:45neighborhoods you just don't have a
  1008. 40:47thermometer in this neighborhood um and
  1009. 40:49then also uh the number of pop songs
  1010. 40:53that were played on a local radio
  1011. 40:54station that day you know like one of
  1012. 40:57those is unrelated and it's it's just
  1013. 41:00noise it's it's Pure Noise there's it's
  1014. 41:02not related to the outcome in any way
  1015. 41:05and um what overfitting is is when you
  1016. 41:08make a model that fits really really
  1017. 41:12well to the data set you have in fact so
  1018. 41:16well that it's also fitting to that
  1019. 41:19noise in addition to the real signal
  1020. 41:22that relies under underneath and um it's
  1021. 41:25a little tricky to kind of get a get an
  1022. 41:28exact sense of this without seeing an
  1023. 41:29example so again for people who are
  1024. 41:31familiar I recommend just looking up
  1025. 41:32overfitting and there's a bajillion
  1026. 41:34examples of it again like I said the
  1027. 41:35lecture Series has examples of it but
  1028. 41:37the idea is that you know you construct
  1029. 41:41a model which has 100% predictive
  1030. 41:43accuracy over that historical data set
  1031. 41:47you're looking at and if it has 100%
  1032. 41:49accuracy it has to take into account you
  1033. 41:52know the noise that's coming from uh you
  1034. 41:56know your data not being perfect and if
  1035. 41:59it's able to take an imperfect data set
  1036. 42:02and create and and have a perfect
  1037. 42:05prediction then if you take that going
  1038. 42:09forward it's going to be too finely
  1039. 42:11tuned in to all the little noise and and
  1040. 42:14and and little things that popped up
  1041. 42:16right and um so you could as an example
  1042. 42:22if you're making a back test right what
  1043. 42:25you could do is you could say uh I have
  1044. 42:27a back test I have a trading strategy
  1045. 42:29and I want to be not vulnerable to
  1046. 42:32another Financial collapse like happened
  1047. 42:34like the one that happened in 2008 and
  1048. 42:37so what I'll do and and this is actually
  1049. 42:39where multiple comparisons bias can come
  1050. 42:41in here what I'll do is I'll look for
  1051. 42:44signals that seemed to match with you
  1052. 42:47know the collapse happening in 2008 so
  1053. 42:50what you do is you say okay well two in
  1054. 42:532008 I noticed that uh you know housing
  1055. 42:57uh housing growth followed this pattern
  1056. 43:00I noticed that the LA Dodgers had run
  1057. 43:03had won and lost in this pattern and I
  1058. 43:05noticed that the temperature in
  1059. 43:07Sacramento followed this pattern so my
  1060. 43:09model for avoiding the next financial
  1061. 43:11crisis is going to take those three
  1062. 43:13variables and look and and say if at any
  1063. 43:16point these three variables line up with
  1064. 43:17what happened in 2008 I'm going to move
  1065. 43:20to cash right and that's a particularly
  1066. 43:23ludicrous example but you know when you
  1067. 43:26start saying okay okay well I'm going to
  1068. 43:27look at the movements of Apple in 2008
  1069. 43:32I'm going to look at um you know uh JP
  1070. 43:36Morgan's stock price which probably is
  1071. 43:38related to 2008 Apple maybe not as sure
  1072. 43:41and I'm going to look at the movements
  1073. 43:44of uh you know Pepsi colola in 2008 is
  1074. 43:48that related I mean maybe I don't know
  1075. 43:50what you can start doing is just looking
  1076. 43:52for these incredibly specific patterns
  1077. 43:54that have no bearing on what's going to
  1078. 43:56happen into the future fure and and
  1079. 43:57you've become overfit to this historical
  1080. 44:00data and it's it's amazing how easy it
  1081. 44:03is to do that and how subtle it is to
  1082. 44:05you know to to to to detect and um it's
  1083. 44:09actually one of the biggest problems
  1084. 44:10that we have to deal with at quantopian
  1085. 44:14every day because we have to
  1086. 44:15differentiate between algorithms who
  1087. 44:17look really good historically because
  1088. 44:19they're overfit and algorithms who look
  1089. 44:21really good historically because they're
  1090. 44:22going to keep performing well into the
  1091. 44:25future so how do you different iate
  1092. 44:27between the two like what are some of
  1093. 44:29the things you do to get around this
  1094. 44:32issue so really kind of like there's
  1095. 44:35there's two main things you can do and
  1096. 44:37and and the the first and foremost and
  1097. 44:39it's really like the gold standard for
  1098. 44:40avoiding overfitting is something known
  1099. 44:43as out of sample testing and again now
  1100. 44:46you know we can go as deep into the
  1101. 44:47weeds with this as we want um I don't
  1102. 44:51want to necessarily kind of bore or
  1103. 44:52scare people who who haven't done much
  1104. 44:55with the statistics in the past but what
  1105. 44:57the idea of out of sample testing
  1106. 44:59is you do is you develop your model and
  1107. 45:02you do all of your model development and
  1108. 45:04your strategy development on one data
  1109. 45:06set but you've saved some of the data
  1110. 45:08you you haven't run out of data you've
  1111. 45:10taken some of the data and you just
  1112. 45:11haven't looked at it at all and I mean
  1113. 45:13that like you haven't even explored it
  1114. 45:14you haven't poked around it you've just
  1115. 45:15cut it off you've taken your Excel file
  1116. 45:18you've cut it off under a certain number
  1117. 45:19of rows you've taken that you've put it
  1118. 45:21into a safe and then what you do is once
  1119. 45:24you're done your strategy testing um
  1120. 45:27sorry your strategy training as you call
  1121. 45:28it we call it training and then testing
  1122. 45:30you've got your you you like you're
  1123. 45:32training your strategy on the on the on
  1124. 45:34the ins sample data that you that you
  1125. 45:36use and then once you've done that you
  1126. 45:39say okay
  1127. 45:41now I I think it works really well on
  1128. 45:44this data set but I want to test whether
  1129. 45:48it's just fit to noise in the data set
  1130. 45:50or whether these are like real patterns
  1131. 45:52I found that will continue forward into
  1132. 45:54the future and so what you do then is
  1133. 45:56you say I run this I run my model on the
  1134. 45:59testing data set which you haven't
  1135. 46:00looked at at all and it hasn't been used
  1136. 46:03in the construction of your model um and
  1137. 46:06because it hasn't been used in the
  1138. 46:07construction of your model your model
  1139. 46:09cannot be you know overfit to the random
  1140. 46:12noise that occurs in the testing data
  1141. 46:14set and so its performance over the
  1142. 46:15testing data set is usually far more
  1143. 46:18indicative of the quality of your model
  1144. 46:21than the performance over the training
  1145. 46:22data set um but the problem is that you
  1146. 46:25only have a finite number of tests and
  1147. 46:27rarely is just your model working the
  1148. 46:28first pass so generally you'll have to
  1149. 46:30like save several out of sample testing
  1150. 46:33segments from your data or wait for new
  1151. 46:35data to be collected as time goes by or
  1152. 46:38something like that okay so what's a
  1153. 46:41good ratio to have of ins sample and out
  1154. 46:45of sample data like if you have a you
  1155. 46:47know let's say 10 years worth of
  1156. 46:49minutely data for the Spy how would you
  1157. 46:52segment that data into in and out of
  1158. 46:55sample sure so
  1159. 46:57so I mean again we're getting into
  1160. 47:00things which are very well studied in
  1161. 47:03statistics and you know I I may miss you
  1162. 47:07know crucial papers and you know I we if
  1163. 47:10if you're if you're a statistician and I
  1164. 47:13say something right now that's just
  1165. 47:14completely wrong or completely misses a
  1166. 47:16key a key paper please angrily write to
  1167. 47:18me because I want to know but but not
  1168. 47:20too angrily um how I would approach this
  1169. 47:24is uh basically the following I mean
  1170. 47:27this is where it kind of gets into more
  1171. 47:29of an art than a science to an extent
  1172. 47:32but generally some people like doing
  1173. 47:35like 910 as a split um one thing you
  1174. 47:39have to be careful about is that with
  1175. 47:42Market data uh things change over time
  1176. 47:45that's known as nonstationarity if
  1177. 47:47things change over time and so if you're
  1178. 47:50developing a model on you know 20 2000
  1179. 47:53to 2009 and then you're saving 2009 to
  1180. 47:562010 as you're out of sample test well
  1181. 47:592009 to 2010 may just have completely
  1182. 48:01different behavioral characteristics
  1183. 48:04than the 9 years prior and so it may not
  1184. 48:07be like a great test of your model that
  1185. 48:11you know that's just something to
  1186. 48:12consider um and so doing things like
  1187. 48:14rather than splitting across time
  1188. 48:17sometimes it can be better to split
  1189. 48:18across say you know tradable assets and
  1190. 48:21just take a bunch of your tradable
  1191. 48:23assets uh and and move them into your
  1192. 48:25your out of sample test superi uh out of
  1193. 48:28sample test uh set so that's one way to
  1194. 48:32that's one way to handle it um again in
  1195. 48:34practice there's there's lots of
  1196. 48:36resources for this online if you just
  1197. 48:38look up out of sample testing you can
  1198. 48:40get comp I mean like there's lots of
  1199. 48:42people who like do things like uh cross
  1200. 48:45validation some people do this thing
  1201. 48:46called Jack knifing some people do
  1202. 48:48things like bootstrapping unlimited data
  1203. 48:51sets lots of different crazy things you
  1204. 48:53can do um but at its core the concept
  1205. 48:56that really want to get across is just
  1206. 48:58this idea that uh you know you need to
  1207. 49:01take some of this data and and not touch
  1208. 49:04it until you're done developing your
  1209. 49:06model and the other thing that's
  1210. 49:08dangerous is that let's say that you are
  1211. 49:10developing some model and you follow
  1212. 49:12this procedure really well and you
  1213. 49:14develop the model and then uh you know
  1214. 49:17you you save 10% of your data and you go
  1215. 49:21ahead and you you test uh your model on
  1216. 49:23the other 10% of your data and it
  1217. 49:24doesn't work so you give up okay you
  1218. 49:26come come back two months later you have
  1219. 49:27a new idea so you develop your model in
  1220. 49:29the first nine years and then you test
  1221. 49:31it on the next
  1222. 49:33year and it doesn't work okay you do
  1223. 49:36this like 10 times right well now we're
  1224. 49:39starting to get into multiple comparison
  1225. 49:41bias territory in which if you try
  1226. 49:44enough ideas one of them will get past
  1227. 49:48the the out of sample test purely based
  1228. 49:50on random chance you know it's it's just
  1229. 49:53there there's some chance it gets
  1230. 49:54through so it's it's it's just important
  1231. 49:58to realize that these these biases kind
  1232. 50:01of pervade in many different directions
  1233. 50:03and it's hard to account for all the
  1234. 50:05different directions that they pervade
  1235. 50:07and you can pretty much never completely
  1236. 50:10avoid these biases you can just minimize
  1237. 50:13the chance that you run into them okay I
  1238. 50:15like how you brought up the point about
  1239. 50:17you know different sets of data
  1240. 50:20non-stationarity is that what you mean
  1241. 50:22yeah yeah yeah how there's different
  1242. 50:24market conditions you know so if you
  1243. 50:25have a strategy that you've tested from
  1244. 50:272009 to 2000 uh 2000 to 2009 um and then
  1245. 50:31you run it on 2010 might be very
  1246. 50:33different market conditions in 2010 so
  1247. 50:35it's not a fair test I really liked that
  1248. 50:37point uh that you bought up just moving
  1249. 50:40on now to another type of bias and
  1250. 50:42that's uh survivability bias um take us
  1251. 50:45through that what does this refer to and
  1252. 50:47what measures can a Trader take to
  1253. 50:49eliminate
  1254. 50:50this so again I I'll just pick on that
  1255. 50:53language point of eliminate because like
  1256. 50:55you know basically Al just just to to to
  1257. 50:58drive this point home you you can't
  1258. 51:00eliminate these biases they are they are
  1259. 51:03kind of things that are always there in
  1260. 51:05some quantity and and your your best bet
  1261. 51:08is just to try to reduce that quantity
  1262. 51:10as much as possible um with
  1263. 51:13survivability bias survivability bias is
  1264. 51:16the notion that uh let's start with a
  1265. 51:19simple example let's say that you have
  1266. 51:21uh 1,000 coins okay and you flip all of
  1267. 51:27those coins once you go down in a row
  1268. 51:28and you flip the first one and the
  1269. 51:29second one and the third one the fourth
  1270. 51:31one Etc and then when you you've gotten
  1271. 51:32through flipping them all you step back
  1272. 51:34and you say okay how many how many heads
  1273. 51:38did I get and uh well the answer is that
  1274. 51:41if they're Fair coins um and you your
  1275. 51:44your flip is a fair flip uh you should
  1276. 51:46get about 500 heads right so you you say
  1277. 51:50okay I'm going to get rid of all the
  1278. 51:52Tails just knock them out knock them out
  1279. 51:54my set okay now I have 500 coins left
  1280. 51:56and you go down and do everything again
  1281. 51:57you flip them all and you get left with
  1282. 52:00250 heads and you knock out all the tals
  1283. 52:03and you just repeat this process well it
  1284. 52:05turns out that there is a kind of a
  1285. 52:08Decay uh of how many heads you should
  1286. 52:11expect after a certain number of of
  1287. 52:14flipping processes and
  1288. 52:17so um survivability bias refers to the
  1289. 52:20fact that uh if you look at one of these
  1290. 52:24coins you know and and you say oh wow
  1291. 52:27this coin has gotten 10 heads in a row
  1292. 52:29well you might not be looking at all the
  1293. 52:32coins that didn't get 10 heads in a row
  1294. 52:35and are just never coming across your
  1295. 52:37radar because of that so let's take this
  1296. 52:39analogy and let's put it into Traders
  1297. 52:42right let's say that you start with a
  1298. 52:44population of 1,000 Traders and they're
  1299. 52:47all making trades and let's say that
  1300. 52:49they're all making random trades there's
  1301. 52:52literally no skill in this population of
  1302. 52:54Traders um well after one year you know
  1303. 52:58there's some chance that you were you
  1304. 53:00were up or you were down and let's say
  1305. 53:02it's 50/50 because kind of these Traders
  1306. 53:04either place largely up bets or largely
  1307. 53:06down Bets with a lot of Leverage and so
  1308. 53:08the traders that you know got the market
  1309. 53:11wrong they're all going to have lost all
  1310. 53:12their money and they're going to be out
  1311. 53:13of the business you know they're not
  1312. 53:15going to be posting on the trading
  1313. 53:16forums there's not going to be any news
  1314. 53:18articles written about them you know and
  1315. 53:21then you go for two years you go for
  1316. 53:23three years you go for four years well
  1317. 53:25there's still going to be a few left you
  1318. 53:27know it's not going to be a ton there's
  1319. 53:28still going to be a few left who just
  1320. 53:30based on random chance have gotten it
  1321. 53:33right every year and made tons of money
  1322. 53:36and generally these are the people you
  1323. 53:38hear about these are the people and
  1324. 53:40again I'm not saying that everybody you
  1325. 53:42hear about is unskilled and just lucky
  1326. 53:45I'm saying that you it's hard to
  1327. 53:46distinguish it's really hard to
  1328. 53:48distinguish because you hear about
  1329. 53:49someone and they say this person has
  1330. 53:51gotten 70% per year for the last 3 years
  1331. 53:55well what about all the people who did
  1332. 53:56didn't get 70% per year for the last 3
  1333. 53:58years and and and dropped out of the
  1334. 53:59running and aren't on TV right now so
  1335. 54:02survivability bias is this is this kind
  1336. 54:04of very pervasive notion in finance that
  1337. 54:06whenever you're looking at performance
  1338. 54:08results uh it can be really hard to tell
  1339. 54:12if they're based on luck or or they're
  1340. 54:14based on something real and actually out
  1341. 54:17of sample testing is one way to try to
  1342. 54:20get at that you say okay well I don't
  1343. 54:22know if this is based on luck so let's
  1344. 54:24test it going forward
  1345. 54:26uh for another you know year and see you
  1346. 54:29know if this guy can make mostly right
  1347. 54:31trades you know that that's that's one
  1348. 54:33of the ways you can try to get at it
  1349. 54:35okay excellent answer and just moving on
  1350. 54:38to the fourth bias which um I'd like to
  1351. 54:41cover and that's uh data cleaning bias
  1352. 54:44what do we need to know about this one
  1353. 54:46so I mean this is this is a fun one in
  1354. 54:49finance and and other people may call it
  1355. 54:51something other than than data cleaning
  1356. 54:53bias um that's just what I call it uh so
  1357. 54:56when you are using data to set up some
  1358. 54:59kind of trading system you know and I'm
  1359. 55:01sure many of your users get data from
  1360. 55:03many different places right uh some of
  1361. 55:06your users may just get kind of daily
  1362. 55:08data that they they scrape off of Yahoo
  1363. 55:10some of your users may get uh they
  1364. 55:13purchase data from some data vendor uh
  1365. 55:16whatever you know it comes from all over
  1366. 55:18the place uh and I think I might have
  1367. 55:20just said user rather than listener
  1368. 55:21which just shows you how in How Deeply
  1369. 55:24deeply dug into the uh the startup
  1370. 55:26culture I am here um but uh but uh so
  1371. 55:31the idea is when you buy that
  1372. 55:33data often times in fact I would I would
  1373. 55:37say I don't know I don't have statistics
  1374. 55:39on this so I'll just say oftentimes uh
  1375. 55:41that data will have Corrections baked
  1376. 55:44into the data and what I mean by this is
  1377. 55:47let's say that you know your data
  1378. 55:50provider uh comes out and they says they
  1379. 55:53say uh the price of Apple
  1380. 55:56today is $1 trillion per share you know
  1381. 56:01and you know you as a human say hm I
  1382. 56:04don't know about that one uh but you
  1383. 56:06know an algorithm that's making
  1384. 56:08decisions uh may say oh my God this is
  1385. 56:11the greatest short opportunity of all
  1386. 56:14time right and uh so you you this this
  1387. 56:18data says apple is $1 trillion per share
  1388. 56:22and then they come out the next day and
  1389. 56:25they say
  1390. 56:27uh the price of Apple today is $101 per
  1391. 56:31share and we have issued a correction
  1392. 56:34for yesterday uh the price yesterday was
  1393. 56:37actually $100 per share and someone put
  1394. 56:40their finger at the zero key too many
  1395. 56:41times or something you know
  1396. 56:44so that's a correction and the data that
  1397. 56:48you look at most times that you get from
  1398. 56:50data vendors has had this pre- cleaning
  1399. 56:53done to it they've gone back and they've
  1400. 56:55wiped out the cases in which they were
  1401. 56:57wrong live and so when you are testing a
  1402. 57:01strategy on this data that you get from
  1403. 57:04your data vendor you will not have any
  1404. 57:08of these bad things happen in the back
  1405. 57:11test of your strategy you won't be able
  1406. 57:13to say oh how does my strategy do if my
  1407. 57:17data vendor just gives me a completely
  1408. 57:19wrong piece of information you know is
  1409. 57:20it robust to that and so you may have
  1410. 57:23these inflated performance numbers B
  1411. 57:26based on your data that you're back
  1412. 57:27testing on being higher quality than the
  1413. 57:30data that you're actually going to get
  1414. 57:32in a live feed from the data vendor um
  1415. 57:35and you know this is kind of one of
  1416. 57:37those catastrophic scenarios often where
  1417. 57:40uh an algorithm could be vulnerable in
  1418. 57:42some weird way to um you know some some
  1419. 57:45weird extreme piece of data coming down
  1420. 57:48the wire and you know you could like
  1421. 57:50make some really horrific trade and and
  1422. 57:52end up having to lose a lot of money uh
  1423. 57:54you know but but this is just something
  1424. 57:56something that you will not notice
  1425. 57:57necessarily unless the data that you're
  1426. 58:00using has kind of a a representative
  1427. 58:02amount of dirt in it compared to what
  1428. 58:04you'd get normally okay so why do these
  1429. 58:07bad prices or these bad prints occur
  1430. 58:10like what triggers
  1431. 58:11that it it can really be anything I mean
  1432. 58:15I don't know if you've ever used a piece
  1433. 58:17of software and had something weird
  1434. 58:18happen but I mean just back that out to
  1435. 58:21imagine that piece of software is is
  1436. 58:23producing data you know it's it's uh
  1437. 58:26it's really they can come from anywhere
  1438. 58:29because there the stock exchanges are
  1439. 58:31running a piece of software and then uh
  1440. 58:35oftentimes like there will be one data
  1441. 58:36vendor that consumes it from the stock
  1442. 58:38exchange that will then sell it to a
  1443. 58:39second data vendor which like packages
  1444. 58:41it up and then maybe that second data
  1445. 58:43vendor licenses it to a third data
  1446. 58:44vendor which sells it in a retail basis
  1447. 58:46so this data often times will will will
  1448. 58:50change hands and go through many
  1449. 58:51different systems and it's really
  1450. 58:54difficult to track where in those
  1451. 58:56systems you know you might have weird
  1452. 58:58bugs like this pop up but they can be
  1453. 59:00things that are as in name like I said
  1454. 59:02to someone literally putting their
  1455. 59:04finger out a button too many times which
  1456. 59:05I which I think has that's that's
  1457. 59:07happened in the past um to you know as
  1458. 59:10subtle as just like uh a rounding error
  1459. 59:13in a computer software that was hard to
  1460. 59:15catch uh that caused the price to wrap
  1461. 59:18around from uh you know one cent all the
  1462. 59:21way up to Infinity dollars or something
  1463. 59:23you know like little things like that
  1464. 59:24can happen right okay and so how does a
  1465. 59:27Quant deal with you know misprints or
  1466. 59:31bad data uh unclean data in a live
  1467. 59:34environment so there's a few different
  1468. 59:37kind of main ways to deal with it I
  1469. 59:39think one way uh is basically kind of
  1470. 59:42ignoring outliers and this is this is a
  1471. 59:45common tactic in in statistics which is
  1472. 59:48just a predefine before you've looked at
  1473. 59:50your data kind of say there's a
  1474. 59:52threshold Beyond which just I don't kind
  1475. 59:55of I I think data is probably just like
  1476. 59:58noise or or something wrong with the
  1477. 1:00:00system and and and set those points and
  1478. 1:00:02maybe have those points change as the
  1479. 1:00:04data that you come in change so a common
  1480. 1:00:06thing would be to say maybe to make it
  1481. 1:00:08so that if the data is more than three
  1482. 1:00:11standard deviations away from the the
  1483. 1:00:13the current mean over the last month
  1484. 1:00:16then just don't look at it or it don't
  1485. 1:00:17you know pretend it doesn't exist um so
  1486. 1:00:20that's one way uh and that's that's
  1487. 1:00:23known as as outlier getting rid of
  1488. 1:00:25outlier and then there's another way
  1489. 1:00:27which is called Windsor Rising which is
  1490. 1:00:29similar except that instead of getting
  1491. 1:00:32rid of outliers you just set them to be
  1492. 1:00:35the maximum threshold that you could you
  1493. 1:00:37know feasibly observe so if you get a
  1494. 1:00:39price for Apple and it's $1 trillion per
  1495. 1:00:42share and the standard deviation of the
  1496. 1:00:45price of Apple over the last month has
  1497. 1:00:46been $10 a share and the mean has been
  1498. 1:00:49$100 a share then you say okay well mean
  1499. 1:00:52of 100 plus 3 * 10 which is the standard
  1500. 1:00:55deviation that's
  1501. 1:00:57$130 so you know I don't know what's
  1502. 1:01:00going on here but I'm just going to say
  1503. 1:01:01this price is $130 you know and so you
  1504. 1:01:04kind of you limit the damage to your
  1505. 1:01:06system in that way and and a third and
  1506. 1:01:08more structural way that quants will
  1507. 1:01:10deal with this I think is really the
  1508. 1:01:12most powerful which is you say quants
  1509. 1:01:15are good quants are really good at
  1510. 1:01:18admitting when they don't know stuff and
  1511. 1:01:21that's actually one of the things that
  1512. 1:01:22kind of defines and and kind of can set
  1513. 1:01:24AP quants apart is that they're just
  1514. 1:01:26they're really good at admitting when
  1515. 1:01:29they are wrong and uncertain and don't
  1516. 1:01:31know stuff and again that gets back to
  1517. 1:01:32this core of Statistics which is
  1518. 1:01:34quantifying uncertainty and if you're
  1519. 1:01:36really good at kind of saying hey you
  1520. 1:01:38know
  1521. 1:01:39what I don't really think that you know
  1522. 1:01:42the chance that one stock is going to
  1523. 1:01:44have a misprint is too high for me so
  1524. 1:01:47what I'm going to do is I'm just going
  1525. 1:01:48to invest in so many assets that the
  1526. 1:01:52chance that you know enough of them have
  1527. 1:01:54misprints at the same time to really
  1528. 1:01:56damage my portfolio is very low so this
  1529. 1:02:01idea of accepting that bad things can
  1530. 1:02:04happen and then adjusting the structure
  1531. 1:02:07of your portfolio or strategy based on
  1532. 1:02:09that acceptance is is I think very
  1533. 1:02:11common in quantitative workflows and and
  1534. 1:02:14gets at again like I said one of the
  1535. 1:02:16ways in which quants might think
  1536. 1:02:18differently from more traditional or or
  1537. 1:02:20or you know discretionary Traders okay
  1538. 1:02:23another really great answer so I'll lock
  1539. 1:02:25this point all right Delan so let's
  1540. 1:02:27shift gar here a little bit talk to us
  1541. 1:02:29about quants when did they come to be
  1542. 1:02:32what's their history there like when did
  1543. 1:02:34quantitative trading actually become a
  1544. 1:02:36thing so I mean I'm not an expert on the
  1545. 1:02:40timelines uh of of you know how things
  1546. 1:02:43started happening but my general
  1547. 1:02:45understanding is that kind of in the
  1548. 1:02:471950 to 2000 window and really when
  1549. 1:02:50computers started being available um you
  1550. 1:02:54know is when Quant started popping up
  1551. 1:02:56and the idea was well you're sitting
  1552. 1:02:59there and you have access to all this
  1553. 1:03:01data and why would you make kind of by
  1554. 1:03:04hand decisions on this data when you
  1555. 1:03:06could gain a ton of information based on
  1556. 1:03:08looking at you know summary statistics
  1557. 1:03:11Trends all of the stuff that you know
  1558. 1:03:12statisticians look at in their in their
  1559. 1:03:14day-to-day work so just as computers
  1560. 1:03:17proliferated it became more and more
  1561. 1:03:19available and as more and more this data
  1562. 1:03:21became quickly available um more and
  1563. 1:03:24more you know quants started being you
  1564. 1:03:26know popping up on on Wall Street and
  1565. 1:03:28and and assets under management has been
  1566. 1:03:32um you know kind of slowly trickling out
  1567. 1:03:35of from you know more traditional
  1568. 1:03:36Traders towards quants and and whereas
  1569. 1:03:40quantitative Investments like purely
  1570. 1:03:42algorithmic Trading still makes up a
  1571. 1:03:45smaller percentage of assets under
  1572. 1:03:47management um what's interesting is that
  1573. 1:03:50uh so many firms incorporate some level
  1574. 1:03:53of quantitative analysis so it might not
  1575. 1:03:55be that everything is controlled by an
  1576. 1:03:56algorithm but it might be that they have
  1577. 1:03:59Traders whose trades go to a risk system
  1578. 1:04:01which is quantitative you know it might
  1579. 1:04:03be that they have some analyst who uses
  1580. 1:04:06some quantitative measures of a of some
  1581. 1:04:08investment's quality before they go and
  1582. 1:04:10Pitch it to the board or you know
  1583. 1:04:12there's many different ways that you can
  1584. 1:04:14incorporate quantitative analysis into
  1585. 1:04:17your strategies it's not just uh
  1586. 1:04:21everything being completely
  1587. 1:04:22algorithmically driven um and the other
  1588. 1:04:24thing is that I believe the majority of
  1589. 1:04:27trading volume right now is driven by
  1590. 1:04:31Quant uh Quant strategies algorithmic
  1591. 1:04:34strategies so one thing that's
  1592. 1:04:35interesting is whereas you know a
  1593. 1:04:37smaller percentage of AUM is is is uh
  1594. 1:04:41you know quantitively managed um Quant
  1595. 1:04:43strategies tend to trade more and so
  1596. 1:04:46because they're trading more uh they are
  1597. 1:04:48actually a higher percentage of of uh
  1598. 1:04:51Market volume I believe I could be wrong
  1599. 1:04:54on that um don't actually have the
  1600. 1:04:56statistics in front of me and so what's
  1601. 1:04:59interesting is that nowadays if you as
  1602. 1:05:00like an individual go to place a trade
  1603. 1:05:04you're no longer really competing
  1604. 1:05:05against people like you because that
  1605. 1:05:08trade is going to be matched against I
  1606. 1:05:11think probably most likely a trade made
  1607. 1:05:12by some kind of algorithm whether it's
  1608. 1:05:14an execution algorithm or a market maker
  1609. 1:05:16algorithm or or whatever it is and so to
  1610. 1:05:19an extent when you're trying to enter
  1611. 1:05:21into a position um you don't just have
  1612. 1:05:24to worry about other Traders anymore you
  1613. 1:05:26have to worry about is there an
  1614. 1:05:27algorithm that knows something that I
  1615. 1:05:29don't and that's why it's selling me
  1616. 1:05:30this stock so this is probably a good
  1617. 1:05:32point to ask like how have quants
  1618. 1:05:35evolved since first sort of coming onto
  1619. 1:05:37the scene like are there are there
  1620. 1:05:39Trends evolving of current new ways of
  1621. 1:05:42how quants are trading and looking to
  1622. 1:05:44gain an
  1623. 1:05:45edge so a lot of this stuff is really
  1624. 1:05:47hard to know because of all the secret
  1625. 1:05:50secrecy in finance and um you know it's
  1626. 1:05:54it's really hard to know exactly what
  1627. 1:05:55people are doing inside the firms and
  1628. 1:05:57and you can kind of try to reverse
  1629. 1:05:58engineer it based on what departments
  1630. 1:06:00they're hiring from and all that um but
  1631. 1:06:04in general I think that quants haven't
  1632. 1:06:07changed a whole ton um since they got
  1633. 1:06:10started and and part of that is because
  1634. 1:06:13you know a lot of places actually didn't
  1635. 1:06:16trust they they just didn't think quants
  1636. 1:06:18were as valuable as they were and so a
  1637. 1:06:21lot of like I think Quant shops got
  1638. 1:06:23started as Quant shops it wasn't like
  1639. 1:06:25quants went to work for a larg
  1640. 1:06:28institution all the time so um you know
  1641. 1:06:32one of the things that is always
  1642. 1:06:33separated Quant shops is like a lot of
  1643. 1:06:35these people are much more uh you know
  1644. 1:06:37like Silicon Valley not Silicon Valley
  1645. 1:06:40but just laidback in their culture you
  1646. 1:06:41know like quants much more often tend to
  1647. 1:06:43be closer to scientists than they are to
  1648. 1:06:47uh you know more of the suit wearing
  1649. 1:06:48types you'd see on a traditional uh you
  1650. 1:06:51know trading floor or or bank and uh you
  1651. 1:06:55know
  1652. 1:06:56just it's it's just kind of an
  1653. 1:06:57interesting little uh you know different
  1654. 1:06:59community that exists on Wall Street and
  1655. 1:07:02part of that is because a lot of them
  1656. 1:07:03are hired from Academia uh a lot of
  1657. 1:07:07Quant shops uh you know now and always
  1658. 1:07:10have uh hired from physics and math
  1659. 1:07:12departments they hire from computer
  1660. 1:07:14science departments um because these are
  1661. 1:07:17the people who are used to thinking
  1662. 1:07:19about the world as kind of a a thing
  1663. 1:07:22that you can model and and a stream of
  1664. 1:07:24data that you can work with with so I
  1665. 1:07:27don't necessarily think that quants have
  1666. 1:07:29changed too much I think that what they
  1667. 1:07:30work on has changed um but but you know
  1668. 1:07:34I don't know if necessarily like the
  1669. 1:07:35roles have changed a tremendous amount
  1670. 1:07:38over time okay sure and I know one of
  1671. 1:07:41the one of the interesting points we
  1672. 1:07:43were discussing before we hit record
  1673. 1:07:45were some of the Exotic data sets that
  1674. 1:07:47have been used by quants uh today do you
  1675. 1:07:50want to tell us about some of these uh
  1676. 1:07:52data sets some of the more obscure ones
  1677. 1:07:54and how they're actually being used yeah
  1678. 1:07:57this is uh I actually have a lot of fun
  1679. 1:08:00with these because it's just so sci-fi
  1680. 1:08:03you know when you when you get into some
  1681. 1:08:04of these things and and and and start
  1682. 1:08:06actually like being like Oh my goodness
  1683. 1:08:08they're actually doing that so let me
  1684. 1:08:10tell you one of my one of my favorite
  1685. 1:08:11examples of something that quants came
  1686. 1:08:14up with uh to try to get an edge on the
  1687. 1:08:16market and and one of my favorite
  1688. 1:08:18examples is the following so computer
  1689. 1:08:20vision is actually pretty good now and
  1690. 1:08:22what I mean by computer vision is the
  1691. 1:08:24ability of a computer to look at an
  1692. 1:08:26image and tell you interesting stuff
  1693. 1:08:27about the image and one of the things
  1694. 1:08:30that's actually kind of a very Wells
  1695. 1:08:32solved problem because many different
  1696. 1:08:34parties have been working on it is
  1697. 1:08:36identifying
  1698. 1:08:38cars and uh you know car companies have
  1699. 1:08:42worked on it uh DARPA which is the US uh
  1700. 1:08:46you know Robotics and and computer
  1701. 1:08:48science defense department has worked on
  1702. 1:08:50it uh you know now of course like Tesla
  1703. 1:08:53and anybody else who's developing
  1704. 1:08:54self-driving cars has worked on
  1705. 1:08:56identifying cars so there's all sorts of
  1706. 1:08:58freely available scientific research on
  1707. 1:09:00like how to get your computer to to
  1708. 1:09:02identify whether or not something in an
  1709. 1:09:05image is a car and so what uh some
  1710. 1:09:09quants did is they went in and they said
  1711. 1:09:12oh also we have Google Maps now right we
  1712. 1:09:16have satellites and I don't think they
  1713. 1:09:17use Google Maps but they have satellites
  1714. 1:09:20that get satellite imagery and there's
  1715. 1:09:22many companies which will sell you
  1716. 1:09:25imagery from their satellites kind of
  1717. 1:09:27live imagery they get maybe they'll take
  1718. 1:09:29one or two pictures a day or even more
  1719. 1:09:31frequently depending on how the
  1720. 1:09:32satellite orbits and everything and so
  1721. 1:09:34what these firms did is they said um
  1722. 1:09:37okay we're going to go in we're going to
  1723. 1:09:39look at the satellite imagery and we're
  1724. 1:09:41going to count the number of cars in
  1725. 1:09:43parking lots outside of retail
  1726. 1:09:47locations and by counting the number of
  1727. 1:09:50cars in parking lots outside of retail
  1728. 1:09:52locations you can actually look for when
  1729. 1:09:56uh there's going to be changes in
  1730. 1:09:58earnings and more accurately predict
  1731. 1:10:01sales figures uh for these retail and
  1732. 1:10:04Retail retail change you can look for
  1733. 1:10:06downward or upward Trends you can look
  1734. 1:10:07for shocks you know all these things
  1735. 1:10:09that basically anything that doesn't
  1736. 1:10:10match what you'd expect you can say in
  1737. 1:10:13what direction does it not match what I
  1738. 1:10:14expect and and therefore I expect a
  1739. 1:10:16positive or negative surprise uh when
  1740. 1:10:19they actually release their figures next
  1741. 1:10:21quarter so what they did is they just
  1742. 1:10:22did that they said you know we're going
  1743. 1:10:24to count the cars we're going to say if
  1744. 1:10:25we expect a positive or negative
  1745. 1:10:27surprise and we're going to enter into
  1746. 1:10:29positions uh based on that positive or
  1747. 1:10:31negative expectation and and and I just
  1748. 1:10:33think that's a pretty kind of like
  1749. 1:10:35pretty futuristic and and crazy way of
  1750. 1:10:38of getting at this information yeah
  1751. 1:10:41satellite imagery is super crazy I I
  1752. 1:10:44recently interviewed uh Michael hore
  1753. 1:10:46from quantstart who I'm sure you're
  1754. 1:10:48familiar with um and he also spoke about
  1755. 1:10:50that it just totally blew my mind it's
  1756. 1:10:52um it's just so out there I mean while
  1757. 1:10:55these these sorts of data sets like you
  1758. 1:10:57know as the example here satellite
  1759. 1:10:59imagery it sounds very sexy it's very
  1760. 1:11:02edgy have these types of exotic data
  1761. 1:11:05sets actually shown any sign of
  1762. 1:11:07producing significantly greater returns
  1763. 1:11:10than more traditional data I mean I know
  1764. 1:11:12it sort of comes down to how you
  1765. 1:11:13actually use it but you know broadly
  1766. 1:11:16speaking are you able to shine any light
  1767. 1:11:18on that so one thing that I will say is
  1768. 1:11:21like my opinions here are kind of again
  1769. 1:11:26it's hard I don't have this data in
  1770. 1:11:29front of me and I haven't done an
  1771. 1:11:30analysis on uh this particular data set
  1772. 1:11:34so for like any particular data set I
  1773. 1:11:37don't know uh you know like when it was
  1774. 1:11:40able to produce better returns if it was
  1775. 1:11:42able to produce better returns how is
  1776. 1:11:44able to produce better returns but my
  1777. 1:11:46understanding is that basically these
  1778. 1:11:49types of techniques uh and and another
  1779. 1:11:52type of technique which I'll talk about
  1780. 1:11:53in a sec in in in in a minute but these
  1781. 1:11:55types of kind of getting at these exotic
  1782. 1:11:57data uh were able to you know basically
  1783. 1:12:01be incredibly valuable uh to the point
  1784. 1:12:04that um my understanding is that the the
  1785. 1:12:07cars and parking lot thing is actually
  1786. 1:12:09like washed out now because everybody
  1787. 1:12:11started doing it so it it's no longer a
  1788. 1:12:14novel piece of information it's just
  1789. 1:12:16like kind of fully Incorporated but
  1790. 1:12:18again I'm not sure I believe that's the
  1791. 1:12:19case um and uh I was actually recently
  1792. 1:12:23at a uh a conference in in Hong Kong put
  1793. 1:12:27on by uh mccy bank which is I'm sure
  1794. 1:12:31you're familiar with coming from
  1795. 1:12:32Australia they at that conference they
  1796. 1:12:34had one of their presenters was um
  1797. 1:12:37terabella which is a a satellite imagery
  1798. 1:12:40startup which was recently acquired by
  1799. 1:12:42Google and terabella was showing some of
  1800. 1:12:46the new imagery techniques that they had
  1801. 1:12:49and not only can they create videos
  1802. 1:12:52satellite videos of like planes flying
  1803. 1:12:54over the land which is more for fun I
  1804. 1:12:57think than than than than for
  1805. 1:12:59quantitative techniques but they were
  1806. 1:13:01able to do things like um what you can
  1807. 1:13:04do is for every uh GPS location and time
  1808. 1:13:07of year you know exactly what angle the
  1809. 1:13:09sunlight is going to be hitting the
  1810. 1:13:10ground right and uh you can just kind of
  1811. 1:13:13compute that and you can say okay well I
  1812. 1:13:15know what angle the sunlight's coming
  1813. 1:13:16from so what you can do is you can look
  1814. 1:13:18at the tops of oil tanks this is just
  1815. 1:13:21one example of like what they can do you
  1816. 1:13:23look at the tops of oil tanks and say I
  1817. 1:13:26compute the size of the shadow on the
  1818. 1:13:28top of the oil tank and something that
  1819. 1:13:29not everybody knows is that actually
  1820. 1:13:31when you drive past these big oil tanks
  1821. 1:13:33the top actually raises or lowers
  1822. 1:13:35depending on the amount of oil that's in
  1823. 1:13:37the tank um and that's just so that
  1824. 1:13:40there's just not this huge amount of air
  1825. 1:13:42in there um probably one of the reasons
  1826. 1:13:44is to prevent a fire risk uh but the top
  1827. 1:13:47raises are lowers depending on how much
  1828. 1:13:48oil is in the tank and so what you can
  1829. 1:13:50do is you can actually compute for oil
  1830. 1:13:53refineries and oil storage location
  1831. 1:13:55how much oil is in the
  1832. 1:13:58tanks and what they were showing is they
  1833. 1:14:00can do things like look at uh Iran and
  1834. 1:14:04look at the refineries in Iran and
  1835. 1:14:06actually show like where they're moving
  1836. 1:14:08their oil around to and look at the
  1837. 1:14:10refineries in the Middle East and show
  1838. 1:14:11how the oil is being moved around and
  1839. 1:14:13basically get the jump on big
  1840. 1:14:15announcements of like you know uh cuts
  1841. 1:14:18to production or increases to production
  1842. 1:14:20or whether a company says they have more
  1843. 1:14:21or less than they actually do they can
  1844. 1:14:23kind of they know that because they can
  1845. 1:14:25just track where the oil is being stored
  1846. 1:14:27and like as a result I think that people
  1847. 1:14:28have actually started putting up like
  1848. 1:14:30tents over their oil drums so that these
  1849. 1:14:33satellites can't you know can't the
  1850. 1:14:35Iranian government doesn't want uh the
  1851. 1:14:38US knowing where they're moving their
  1852. 1:14:40oil to so that struck me as another
  1853. 1:14:43example of like something that you can
  1854. 1:14:44do with this data and and a kind of just
  1855. 1:14:47a new piece of information you can learn
  1856. 1:14:50which was just have been completely
  1857. 1:14:51impossible to hold you know 5 years ago
  1858. 1:14:54yeah yeah I mean it's again it's just so
  1859. 1:14:57crazy to think that people are are
  1860. 1:14:59actually doing this I mean it's it's
  1861. 1:15:00just wild to think about but anyway
  1862. 1:15:03deloney Let's uh let's leave it at that
  1863. 1:15:04for now um so like I mentioned earlier
  1864. 1:15:07we're going to be doing another four
  1865. 1:15:08episodes following this one plus a Q&A
  1866. 1:15:11uh would you like to give just a maybe a
  1867. 1:15:13brief overview for some of the upcoming
  1868. 1:15:15topics we'll be discussing yeah so I
  1869. 1:15:18think the next four episodes are really
  1870. 1:15:20designed to try to get into um some of
  1871. 1:15:24the major
  1872. 1:15:25components of how a Quant actually works
  1873. 1:15:28in their day-to-day and I think the
  1874. 1:15:30purpose of today and I felt that we
  1875. 1:15:32actually able to hit a lot of these
  1876. 1:15:33points is just kind of um give people a
  1877. 1:15:36sense of of of what some of the
  1878. 1:15:38differences are between kind of a more
  1879. 1:15:40traditional Trader in a Quant and what
  1880. 1:15:41quants do differently and how quants
  1881. 1:15:43think and what quants worry about and
  1882. 1:15:45now for the next four episodes we'll try
  1883. 1:15:47to dive into uh specific parts of their
  1884. 1:15:49workflow a little more so something
  1885. 1:15:51we'll talk about is what's known as
  1886. 1:15:52Alpha factors and Alpha factors uh is
  1887. 1:15:56the idea of um by valuing everything in
  1888. 1:16:00the tradable universe uh you know can I
  1889. 1:16:03produce a a ranking of things based on
  1890. 1:16:06their future values uh that produces a
  1891. 1:16:09trading strategy which has Alpha um and
  1892. 1:16:12if you if you don't understand what that
  1893. 1:16:14means unfortunately there's not really a
  1894. 1:16:16greater way to explain it without really
  1895. 1:16:18getting into it so you'll have to wait
  1896. 1:16:19until that episode um and then we'll
  1897. 1:16:22have an episode on how well in reality
  1898. 1:16:25uh quants really don't trust any
  1899. 1:16:27individual Alpha Factor uh to work well
  1900. 1:16:30on its own so they actually will end up
  1901. 1:16:32combining Alpha factors um together and
  1902. 1:16:36and combining different methods of
  1903. 1:16:38predicting stock movements together uh
  1904. 1:16:40to try to get a better picture of how
  1905. 1:16:42the Market's going to move as a whole
  1906. 1:16:44and therefore be able to you know make
  1907. 1:16:46better trades episode 4 uh we'll talk
  1908. 1:16:49about okay well let's say now you have
  1909. 1:16:51this combined uh Alpha factor that you
  1910. 1:16:54actually think works pretty well well
  1911. 1:16:56the next step is actually taking its
  1912. 1:16:58output and converting it to trades on
  1913. 1:17:01the market and and we get into this this
  1914. 1:17:04new game there of uh risk optimization
  1915. 1:17:07and portfolio optimization and the idea
  1916. 1:17:10of how do you decide whether or not to
  1917. 1:17:12enter into a new portfolio and it turns
  1918. 1:17:14out that quants have all sorts of
  1919. 1:17:16definitions of portfolio risk and
  1920. 1:17:19quantitative hedge funds will basically
  1921. 1:17:21every trade they make before they make
  1922. 1:17:23it will go through extensive
  1923. 1:17:26optimization and risk calculation which
  1924. 1:17:28just says is there a better way to make
  1925. 1:17:30the trade and if we make this trade will
  1926. 1:17:33we be violating any of our risk
  1927. 1:17:35tolerances and if if if you know if the
  1928. 1:17:37latter is true the trade is not made so
  1929. 1:17:41uh every single trade will will kind of
  1930. 1:17:43enter through one of these uh one of
  1931. 1:17:46these uh these checks at a at a
  1932. 1:17:48quantitative firm often and and these
  1933. 1:17:50things are done in the course of you
  1934. 1:17:52know like less than a second um often
  1935. 1:17:55times way faster than obviously if
  1936. 1:17:56you're doing something higher frequency
  1937. 1:17:58uh and uh then episode five is you know
  1938. 1:18:02machine learning is a really popular
  1939. 1:18:04concept it's a really popular topic all
  1940. 1:18:06over the place not just in finance a lot
  1941. 1:18:09of people uh constantly ask us hey how
  1942. 1:18:12do you are you going to have lectures on
  1943. 1:18:13machine learning are you going to do
  1944. 1:18:15this with machine learning you going to
  1945. 1:18:16support machine learning on the platform
  1946. 1:18:18um and machine learning is another one
  1947. 1:18:21of those things where it's a really
  1948. 1:18:23really powerful technique but it's also
  1949. 1:18:25really easy to shoot yourself in the
  1950. 1:18:27foot with machine learning so we're
  1951. 1:18:28going to talk about that on that episode
  1952. 1:18:29and then episode 6 as you mentioned I
  1953. 1:18:32think we're just going to have a have a
  1954. 1:18:33chance for us to iron out some of the
  1955. 1:18:36Kinks that maybe came up and things I
  1956. 1:18:37didn't explain very well or or others
  1957. 1:18:39didn't explain very well and and and
  1958. 1:18:42here it depends on people's schedules
  1959. 1:18:44but we'll try to bring on not just
  1960. 1:18:46myself but we'll try to bring on
  1961. 1:18:48Jonathan Lin who's the chief investment
  1962. 1:18:50officer at quantopian he's worked at
  1963. 1:18:51some really large financial institutions
  1964. 1:18:53we'll try to bring on Jess stth who's
  1965. 1:18:55our um VP of Quant strategy and she's
  1966. 1:18:58actually in charge of selecting which
  1967. 1:18:59strategies are or are not included in
  1968. 1:19:02the portfolios that we develop um and uh
  1969. 1:19:05Thomas Waki who's uh our in-house uh
  1970. 1:19:08director of data science and you know
  1971. 1:19:10he's a PhD in Neuroscience from Brown
  1972. 1:19:12University and and works a lot on the
  1973. 1:19:15strategy selection side and and also Max
  1974. 1:19:18uh margut who's a and I completely
  1975. 1:19:21mispronounced his name there so I
  1976. 1:19:22apologize to him um but but uh he is
  1977. 1:19:25someone we just hired actually to work
  1978. 1:19:27on the lectures uh and Max's a
  1979. 1:19:30background is in statistics and he can
  1980. 1:19:31explain some of this stuff really well
  1981. 1:19:33so we'll try to try to bring those
  1982. 1:19:35people on as well to answer some of
  1983. 1:19:36these questions more specifically yeah
  1984. 1:19:39it's going to be good it's going to be
  1985. 1:19:40good so where can listeners go in the
  1986. 1:19:42meantime uh to get these resources maybe
  1987. 1:19:44if you just want to give that that URL
  1988. 1:19:46you mentioned earlier again yeah so for
  1989. 1:19:49now let's go ahead and say the the best
  1990. 1:19:51way to get these resources is going to
  1991. 1:19:53be quantopian
  1992. 1:19:55learn l e a RN uh and that's going to
  1993. 1:19:59bring you to a page where um you can you
  1994. 1:20:01know get started with tutorials or you
  1995. 1:20:03can kind of try to dive into these
  1996. 1:20:05lecture Concepts and I think I mentioned
  1997. 1:20:06some specific lectures during today's
  1998. 1:20:09podcast um that you can dive into that
  1999. 1:20:11were related to the concepts we
  2000. 1:20:13discussed and so you can find those in
  2001. 1:20:15the lectures page you can go there
  2002. 1:20:16directly quantopian dcom lectures all
  2003. 1:20:20right Delan well this has been a lot of
  2004. 1:20:21fun man I really look forward to picking
  2005. 1:20:23up from uh where we leave off right now
  2006. 1:20:26on the next episode thanks very much
  2007. 1:20:28yeah absolutely it's been a lot of fun I
  2008. 1:20:29appreciate the chance to to talk to you
  2009. 1:20:31and indirectly to to many more people
  2010. 1:20:33about this stuff cool and guys thanks
  2011. 1:20:35very much for listening we'll catch you
  2012. 1:20:37on the next episode
  2013. 1:20:38[Music]

About this transcript

This page contains the full transcript of Q1: You Don't Know How Wrong You Are · Delaney Mackenzie by Chat With Traders, generated from the public captions YouTube serves with the video. The transcript has 14,730 words across 2,013 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.