Learn Python with Talk Python's 270 hours of courses

#120: Python in Finance Transcript

Recorded on Friday, Jun 2, 2017.

00:00 This week, we'll enter the world of stock markets, trades, hedge funds, and more.

00:04 You'll meet Eve Hilpich, who runs the Python Quants, where Python, open source, education,

00:09 and finance all intersect.

00:11 This is Python in Finance on Talk Python to Me, episode 120, recorded June 1st, 2017.

00:18 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the

00:48 ecosystem, and the personalities.

00:49 This is your host, Michael Kennedy.

00:52 Follow me on Twitter, where I'm @mkennedy.

00:54 Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter

00:59 via at Talk Python.

01:00 Talk Python to Me is partially supported by our training courses.

01:04 How does your team keep their Python skills sharp?

01:07 How do you make sure new hires get started fast and learn the Pythonic way?

01:11 If the answer is a series of boring videos that don't inspire, or a subscription service you

01:18 way too much for and use way too little, listen up.

01:20 At Talk Python Training, we have enterprise tiers for all of our courses.

01:24 Get just the one course you need for your team with full reporting and monitoring.

01:29 Or ditch that unused subscription for our course bundles, which include all the courses, and

01:34 you pay about the same price as a subscription once.

01:37 For details, visit training. talkpython.fm/business, or just email sales at talkpython.fm.

01:45 Yves, welcome to Talk Python.

01:47 Thank you.

01:48 Thank you for having me, Michael.

01:49 It's great to have you on the show.

01:50 And I'm really looking forward to learn about Python and finance.

01:55 And in fact, it's been really fascinating just to do the research to find the questions and

02:00 interesting things to talk to you about.

02:01 So I'm really looking forward to talking to you about Python, finance, quants, all this

02:07 kind of stuff.

02:08 But before we get into that, let's start with your story.

02:10 How did you get into programming in Python?

02:12 Yeah, well, it's kind of, at least for people at my age, kind of a typical story.

02:16 So I started, my first computer was a C64 Commodore.

02:20 And back then, I was fascinated by programming already.

02:23 So it's a long time ago where I started doing basics, basic, back then also assembler.

02:28 I know if you talk to younger people these days and you say that you've been doing assembler

02:33 on a machine level, moving around bits and bytes, nobody, almost nobody can imagine it

02:39 anymore.

02:40 But this is not actually hard.

02:41 They might ask you, is that the, they might say, hey, is that the new JavaScript framework?

02:45 I heard of that.

02:46 Yeah, something like that, maybe.

02:48 So, but I think the world has become well too complex to get through the programming.

02:53 For sure.

02:53 Yeah.

02:53 You couldn't build very much in assembler anymore.

02:56 No, but sometimes I'm fascinated when I'm walking through kind of the, across the shelves

03:02 and bookstores and I still have assembler books, like, you know, 1,200 pages and just to do

03:07 a simple arithmetic operation or what.

03:10 So it's still fascinating.

03:12 And some people might still do it.

03:14 I just met one guy, it was a Russian guy at the London meetup that I did.

03:18 They said, well, I'm doing assembler.

03:19 But that's the one guy over the last maybe 10 years who told me that he he would be doing assembler.

03:23 So, but yeah, Python, frankly, after my early programming experience, it more or less stopped

03:32 because I decided to study business administration.

03:34 I somehow thought that kind of this would be the path to make money, decent money.

03:39 And yeah, I mean, the fascination for technology never disappeared.

03:46 But after my business administration degree in German, we called this Diplom Kaufmann, which

03:52 is kind of the equivalent of an MBA.

03:54 I followed up with a PhD in math finance.

03:57 And this was actually the point where I got into finance.

04:00 So back then, nobody can imagine in our field today that I've written kind of a PhD thesis

04:07 without any numerical analysis or programming even.

04:10 So it was a...

04:11 Oh, wow.

04:12 So it was really theoretical.

04:13 It was just the theory of finance, not here.

04:16 We're going to simulate something.

04:17 Yeah, it's kind of...

04:19 Indeed, today you would probably call these people kind of model quants.

04:22 They really work on new models.

04:24 But if you have maybe a thousand quants that you ever look at, maybe only 10 are still working

04:29 at models, really.

04:31 But back then, there was much more to discover still.

04:35 So today, more or less all people working in banks, hedge funds, whatsoever, they are more

04:40 or less concerned with the numerical side, with the implementation, with the usage of the

04:43 models that are around, with a couple of improvements left and right.

04:46 But I did really a theoretical PhD in mathematical finance and a little bit of numerical analysis,

04:55 but more or less by hand.

04:57 Just examples, no coding at all.

04:59 Right.

05:01 But still, I haven't answered the question how I got into Python, because this was more

05:05 or less my incident.

05:05 Yeah, so this theory has not yet gotten you anywhere near Python.

05:09 Yeah.

05:10 So, but the two things come together.

05:12 It was a couple of years later when I was working as a management consultant for an IT company.

05:17 And I didn't do anything IT there.

05:20 It was just on a strategic level.

05:21 But people simply didn't stop talking about Python and how nice Python is and how efficient

05:26 they are with Python.

05:28 And it seemed to be like, you know, kind of the best thing after sliced bread.

05:33 And I had to look at it simply out of curiosity.

05:36 So there was no real kind of need for me or whatsoever.

05:40 But I said, well, this sounds so interesting.

05:42 Maybe there's something in it for finance.

05:44 And indeed, from the very beginning, I was convinced this is well more than 10 years ago, maybe 12, 13 years, maybe even 15 years ago, when this happened.

05:52 I said, well, this is something I would have loved to have when I did my PhD.

05:55 This is kind of so close to finance, to math, to all the formula.

05:59 You can simply write stuff down.

06:01 And it looks not kind of a cane code.

06:03 It looks still like math and mathematical finance.

06:06 And that's when I discovered Python and decided to start using it more as a hobby in the beginning.

06:12 And it took us a couple of years.

06:14 And now I don't do anything else.

06:15 But that sounds really great.

06:17 Those were pretty early days.

06:19 Yes, and so the tooling for computation in Python wasn't as good as it is today, right?

06:25 Sure, sure, sure.

06:26 I mean, this is what most people said back then and still some do today.

06:30 Kind of, this is slow.

06:31 This is an interpreted language.

06:32 There's, yeah, if you have to write loops, which is kind of common, of course, in mathematical finance, everything is more or less about loops when you implement a financial algorithm.

06:41 And it was true.

06:43 So back then, we didn't even have NumPy.

06:45 It was numeric.

06:46 We started using it, which later became NumPy.

06:49 And, yeah, but we still started doing it because of syntax and everything.

06:53 And from a research perspective, we had more or less back then.

06:58 It wasn't that important whether it's kind of a one-second or a ten-second thing or even sometimes a one-minute or ten-minute thing.

07:05 You know, maybe for people working in production in a financial institution, this is, of course, a decisive question.

07:11 But for what I had in mind in the first place, it wasn't kind of really a thing.

07:15 I just saw the efficiency gains that you could get by using a high-level language like Python.

07:20 I see.

07:21 So in the beginning, it was like, I need to explore this data.

07:23 And if it takes a minute, that's totally fine.

07:25 You weren't trying to do, like, high-frequency trading with it.

07:28 Yeah, sure.

07:28 Exactly.

07:29 Exactly.

07:29 Yeah, I see.

07:31 Okay.

07:31 So you get what's close to your MBA, and then you get a PhD in, like, theoretical finance, and then you, like, play around with Python.

07:39 What does that end up meaning for you today?

07:43 Like, what do you do day to day?

07:44 Yeah, today, I said it before, everything is centered around Python for finance.

07:48 We don't do anything else.

07:49 Of course, sometimes I say, well, we talk about Python, but it's more or less open source in finance.

07:55 So for what we do, we also use other open source technologies.

07:58 But at the core of the core of what we do is Python.

08:01 So all our offerings, like the trainings, for example, they're centered around Python and finance.

08:08 So we don't do, for example, any JavaScript training, nor do we do any kind of Python training for another industry.

08:16 So it's really at the intersection of Python and finance what we do.

08:20 And in these areas, we do events, like our conference or a boot camp series, which is called for Python Quants.

08:26 I'm running a big meetup with 2,000 members in London called Python for Quants Finance.

08:31 And yeah, we make currently mostly our living off training, online training.

08:38 And there, the focus is on Python for algorithmic trading, which has become kind of a rather popular topic.

08:44 Yeah, definitely the algorithmic trading has been.

08:47 Absolutely, absolutely.

08:48 Also for retail investors, for single people, but for the big ones as well.

08:53 So we have usually people attending our classes from the biggest institutions down to students who are just interested in this topic.

09:01 And the technological requirements to enter the field have become that low, so to say, the barriers of entry, as we say in business, are almost have vanished that everybody can start algorithmic trading with, let's say, 50 or 100 US dollar within an hour.

09:18 So this is how far we have gone.

09:20 That's very far from the Ivy League university degrees and master's degrees and whatnot, right?

09:27 Yeah, sure, sure.

09:28 So you can, everybody can start.

09:30 Yeah, yeah, that's, that's really great.

09:31 So you don't need too much mathematical background and statistics and training and sort of theoretical stuff to get started?

09:38 Ah, well, it doesn't hurt.

09:40 Let's put me, let's put it that way.

09:42 But many people even argue that a former background in finance might be hurting in the sense that you believe in the wrong paradigms.

09:49 Right.

09:50 You studied a world that no longer exists, maybe?

09:52 Or it has changed a lot, yeah.

09:55 When I studied finance and still people who study finance at university, the basic theory still is based off end of day data.

10:02 Back in the days when you, when you had to look at the newspapers in order to pick out current stock prices, you know, this is more or less the data that all the theory is based on.

10:13 But today when we talk about intraday, this was kind of the first step, you know, the day traders came up, they started trading intraday.

10:20 And now we have arrived at the high frequency trading space.

10:24 And of course, things have changed.

10:26 But from my point of view, theory hasn't kept up really well.

10:29 Yeah, sure.

10:30 Almost the computational side probably has kept up closer than theory, right?

10:34 Yeah, sure.

10:35 Because you need to have the capabilities to process the huge amounts of data.

10:39 I mean, if you just have a look, if you have 30 years of data for a single stock price, this is kind of, you have roughly 250 trading days per year.

10:49 Times 10 is 2,500 times 3 is 7,500 end of day points for a single stock.

10:58 If you have a look for example, for example, at Apple or what, you easily get beyond 15,000 points per day when you work with the intraday data.

11:08 So it's twice as much in a single day that is available now compared to kind of 30 years of end of day trading data, you know.

11:16 So, yeah.

11:18 It has changed quite a bit.

11:20 So the area that you focus on is the whole quants.

11:24 Could you maybe tell us what quants are?

11:27 Give us kind of a spectrum of different things.

11:30 You said model quants, computational quants, other types of things.

11:33 What's this landscape look like?

11:35 Yeah, I mean, the expression quant comes from a quantitative finance or quantitative analysts.

11:43 So people that do anything that is somehow quantitative or regionally opposed to a little bit like theoretical, you know, kind of you have numbers and you work with numbers.

11:54 But usually I think people understand that people are working with models in the sense of, yeah, they are implementing them.

12:03 They analyze them.

12:05 They tweak them.

12:06 They optimize them.

12:07 They write code based on them and so forth.

12:11 But this is maybe my point of view.

12:13 If you ask 10 people in the industry, everybody might come up with a different definition in this regard.

12:18 But mostly people who have a formal education, formal background, like in engineering, in math, in physics.

12:26 So, you know, they have the math tools available these days.

12:29 Also, of course, the programming tools and they now do quantitative stuff and modeling in the financial industry.

12:35 And this can be from A to Z.

12:37 This can be credit modeling.

12:39 This can be in trading.

12:41 This can be in option pricing.

12:42 Many people in this area work or with the title work in risk management, which are huge departments in the banks.

12:50 So it's a diverse set, actually.

12:53 Sure.

12:53 Yeah.

12:54 It sounds like quite a large group, actually.

12:56 The people that do high frequency trading and like create the algorithms and code that does that, would those be quant?

13:03 I think you don't hear quant kind of in this context quite often.

13:08 So they are more technologists from my point of view.

13:11 So this complete high frequency space is more driven by the technology itself and not this much by the quantitative analysis from my point of view.

13:21 So I would say, well, I would exclude it, but it's not the first area that comes to my mind.

13:27 I see.

13:27 Right.

13:28 Of course.

13:28 Okay.

13:29 So let's see.

13:30 Let's maybe start with the state of Python in the financial industry.

13:35 So 10 years ago, it sounded to me like using Python was kind of like, hey, what are you doing?

13:41 Why are you using that language?

13:43 Like you should be using Fortran or C or something, or maybe Java, something compiled and faster and more trusted.

13:51 Right.

13:51 This actually was the case.

13:52 So speed, especially in an area where you haven't had kind of the nice hardware way as of today.

14:00 So both, of course, on a single level machine, on a single machine level, as well as on cluster level, we have seen tremendous advances on the hardware side of things.

14:10 So speed was more or less gained by implementing the models in the best fashion possible, which meant, of course, to have a compiled language.

14:19 And C++ has established itself back then as a standard.

14:23 And most of the pricing and analytics libraries these days still in use are based on C++.

14:29 So there are millions and millions of lines of code in C++ that do pricing work on a daily basis, risk management, front office pricing, and so forth.

14:38 So this is where we came from.

14:39 And then, of course, if you have an expert who knows how to optimally compile kind of the C++ code, highly efficient manner, even back then with parallelization and so forth.

14:51 And you come along and say, Python, they just, the only thing that did is laugh at you, you know?

14:57 Yeah.

14:58 But, of course, everybody saw, for example, the benefits of having such an efficient language, like on a system administration level and so forth, just to have to write scripts, you know, instead of using Bash or whatsoever.

15:09 This was kind of the first area where Python was used back then.

15:13 But...

15:14 To kind of glue things together.

15:15 To glue your C++.

15:16 Glue things together, yeah, to automate things.

15:19 And maybe even to orchestrate stuff that was written in C++ and other languages.

15:24 Sure.

15:24 And still, it took kind of a long while, I must say, until we reached a point where, yeah, we now have the big, first point here, big users, or even, I would say, the biggest financial institutions that are heavy users, strategic users of Python, like Bank of America, Merrill Lynch, and JP Morgan.

15:45 And they have both implemented core systems based on Python.

15:49 And...

15:51 Yeah.

15:51 Yeah.

15:52 It was pretty incredible at PyCon.

15:54 Were you at PyCon this year in the US?

15:55 Just a few weeks ago?

15:56 No.

15:56 Yeah.

15:57 Saving it for EuroPython?

15:58 I used to.

15:59 I used to attend the first EuroPython's religiously, especially when they were in Florence, kind of a really nice place, but I even stopped going to them.

16:07 So, the year is only that many months, weeks, and days.

16:10 Yeah.

16:11 And I focus more or less on the finance side of things these days, our own conferences.

16:16 So, I'm traveling anyways, all year round.

16:18 If you're already running your own conferences.

16:20 So, what was interesting about PyCon, which is really a technical developer type conference, right?

16:26 And really, maybe data scientists as well these days, were there were actually quite a few financial companies with booths, large expo booths, and basically on display.

16:37 And so, for example, JP Morgan Chase, Last Capital One, or also Chase.

16:43 There's a number of companies, right?

16:46 Why do they have a booth here?

16:48 What are they doing here, you know?

16:50 And basically, they're like, we need as many Python developers as we can get.

16:55 Sure, sure.

16:56 That's what I was saying.

16:57 It's not kind of one piece of technology that is kind of used in certain areas.

17:03 No, it's Python is at the core, the core system.

17:07 So, the core risk management trading system at Bank of America is called Quartz, and it's Athena at JP Morgan.

17:16 And there are now hundreds, if not even thousands of people writing Python code on a daily basis for these systems.

17:23 So, they need talent, of course, of course.

17:25 They need talent in order to support, maintain, and further develop their platforms.

17:30 Yeah, that's really interesting.

17:31 Yeah, that's really interesting.

17:31 And how many other projects at any company of any size have thousands of developers working in Python on a single project in a day?

17:40 You know?

17:41 Not many.

17:41 Yeah.

17:42 Not many.

17:42 Not many, actually.

17:43 But the banks have become technology companies anyway.

17:47 So, they have thousands of developers.

17:49 I heard once somebody saying that Bank of America has more developers than Microsoft.

17:53 I never followed up on that.

17:55 But, you know, with a bank that has 300,000 people, you can imagine how many of them are doing technology these days.

18:03 And they have budgets, they have IT budgets in the billions.

18:07 So, the bigger ones beyond 5 billion per year for IT only.

18:10 So, they're huge technology companies.

18:14 Yeah.

18:15 Another financial area that was using or still does use Python a lot is PayPal.

18:19 They use Python for many, many things.

18:23 And they have one of their services that does real-time pricing for transactions and exchanges.

18:28 That's running on Python and doing several billion requests a day.

18:32 It was really interesting to see this move from, oh, that's not going to be fast enough.

18:37 Oh, you can't build real stuff with that.

18:39 And so on.

18:39 To now, it's like at the center of some of these things.

18:41 Yeah, sure.

18:42 I mean, sometimes when you reach a bottleneck in a certain area, of course, you still have the option to use another technology.

18:48 And that's the beauty of it.

18:49 If you go the Python route, it's not that you have only Python available.

18:53 It's so easy to interface with C++, C code, other technologies in general that might be better suited for this particular task.

19:02 So, that Python is not a choice where you lose out on other things.

19:07 Yeah, that's right.

19:08 The decision there is always a good one because it's very flexible.

19:12 And you could just even call web services, right?

19:15 All those types of things.

19:16 Everything.

19:16 Everything.

19:17 It's a general purpose, really flexible language.

19:20 And talking about performance, we now have also many, many interesting native performance technologies available.

19:27 So, especially interesting for the finance part there.

19:32 So, it's not that you need to resort to other technologies in order to get the performance.

19:36 We have now lots to offer in this regard as well.

19:41 This portion of talkpython.fm is brought to you by Linode.

19:44 Are you looking for bulletproof hosting that is fast, simple, and incredibly affordable?

19:48 Look past that bookstore and check out Linode at talkpython.fm/Linode.

19:53 That's L-I-N-O-D-E.

19:55 Plans start at just $5 a month for a dedicated server with a gig of RAM.

19:59 They have 10 data centers across the globe.

20:02 So, no matter where you are, there's a data center near you.

20:05 Whether you want to run your Python web app, host a private Git server, or even a file server, you'll get native SSDs on all the machines, a 40 gigabit network, 24-7 friendly support, even on holidays, and a seven-day money-back guarantee.

20:19 Want a dedicated server for free for the next four months?

20:22 Use the coupon code python17 at talkpython.fm/Linode.

20:28 Do you know some interesting stuff going on?

20:30 Are people using GPU clusters to try to make things faster?

20:35 Anything you can talk about there?

20:37 Yeah, sure.

20:37 I mean, this is around since they started using GPUs as GPUs, so general purpose GPUs, ever since.

20:47 But in the beginning, there was kind of the major problem that the working memory was typically too small to do something significant.

20:55 So, when you think, for example, of kind of a Monte Carlo simulation, which is an American method of choice in risk management and for many analytics tasks, just to, for example, just to price a simple American option.

21:07 Now we're getting a little bit technical.

21:09 By Monte Carlo simulation, there's a regression involved and stuff like that.

21:14 You might, for a single option, you might need, I don't know, from a gigabyte onwards, upwards of working memory.

21:22 And when you think that kind of banks like Morgan Stanley, they typically have 3 million open positions overnight.

21:29 So, you need to value and revalue a thousand of times 3 million options.

21:34 So, this somehow illustrates what kind of the requirements are in terms of the hardware that you need.

21:41 Then GPUs are kind of nice for certain tasks due to the massively parallel code that you can write.

21:49 But other constraints like 32 bits and the working memory have been issued.

21:54 Now, we see, of course, that the GPUs are getting bigger.

21:59 Kind of, you get 12 gigs of RAM and so forth.

22:02 So, I would see that this will further improve the stuff that you can implement.

22:08 But everything I was aware of, of course, all the big banks and everybody was trying to figure out what the potential is of GPUs.

22:17 But I haven't seen it kind of deployed on a really large scale in the sense that people in the industry, the big banks,

22:24 and they are all still using kind of regular clusters with regular CPUs and lots of memory and all the stuff that you need in order to do our calculations there.

22:34 Yeah, that's pretty interesting.

22:36 Maybe the people who figured it out just don't talk about it.

22:39 Which is possible, right?

22:40 Yeah, usually.

22:41 I mean, the finance industry overall is kind of secretive in a certain sense.

22:47 Yeah, it's a little secretive that understandably like, hey, we found this amazing new algorithm where we make 1% on every trade that we do as a baseline.

22:55 Oh, yeah.

22:56 Tell us about that.

22:57 Yeah, for sure, for sure.

22:58 That's always what I say.

22:59 If somebody finds it, they probably won't tell you.

23:02 Yeah, exactly.

23:03 For sure.

23:03 I suspect that at some point people will probably pull these in.

23:07 Or, you know, maybe they just leapfrog over them, right?

23:11 Like, the big news out of Google I.O.

23:14 And theoretically coming out of WWDC at vastly different scales are, you know, Google has come up with dedicated AI chips.

23:25 Like, instead of using GPUs for this kind of stuff, they have now chips just for this kind of stuff.

23:30 Yeah, the GPUs.

23:32 The Tensor processing units.

23:33 Exactly.

23:34 And, like, Apple is supposed to be shipping an AI chip in the new phones, for example.

23:39 So, maybe at some point there will be just a dedicated chip that's not this general GPU, but it's something even more focused.

23:47 Yeah, that's kind of it.

23:48 I mean, it's the same thing in the blockchain space, you know.

23:50 GPUs were kind of a vogue for a certain period of time because much faster than the CPUs.

23:56 But now they have the ASICs, their application-specific integrated circuit chips, and GPUs are gone, you know.

24:03 Yeah, absolutely.

24:04 You don't need them anymore there.

24:06 A transition technology.

24:07 Yeah.

24:07 So, since you bring up the blockchain stuff, there's plenty more areas to cover, but what do you think about these cryptocurrencies?

24:14 I consider them really interesting in terms of technology and what is going on there.

24:20 But maybe you're referring to the recent developments and kind of the explosion in the Bitcoin price, for example.

24:25 So, I see the market from an economic and financial point of view a little bit overhyped.

24:31 Yeah.

24:31 But from a technological perspective, it's really interesting because it combines many, many technologies that have been around for quite a while.

24:37 They add kind of new stuff to it and solve a couple of issues in very, very elegant ways.

24:43 So, I really enjoy it.

24:45 I've given out some webinars about it and I'm into it a little bit, but just a little bit.

24:51 It's just, it's not at the core of what we do, but still, I consider this finance part and you can do quite a bit and learn about it in particular based on Python.

25:03 Yeah, for sure.

25:04 There's also a lot of things that the finance industry seems to be trying to do with the blockchain, regardless of the cryptocurrency side of it.

25:12 Yeah, sure.

25:12 This is what I refer to when I said, well, the blockchain space solves kind of certain problems in a very elegant fashion.

25:20 So, property rights or settlement, for example, when you think of trading of financial instruments and documentation of property rights and things that have happened in an immutable way.

25:31 I mean, in the end, the blockchain is nothing else than an immutable database.

25:34 You know, it's very hard to mutate it.

25:37 So, we talk about the immutable database and to document property rights.

25:41 Also, for example, when you think of emerging markets and the world and so forth, and there is potential in there.

25:47 If this is enough potential to have Bitcoin now at 2,500 or something, US dollar, I don't know.

25:54 I tweeted about it and said the bubble is about to burst soon.

25:57 But then you read again that the big players are getting into the space that Fidelity recently revealed that they are in Bitcoin mining and that they will offer kind of a bunch of cryptocurrency related services to their clients.

26:12 And Fidelity is one of the biggest asset managers in the world.

26:15 Then you might say, well, of course, if these big players now start doing that stuff and getting into the space, of course, there is a push.

26:21 Yeah, there's definitely going to be a push.

26:24 So, you're telling me it was a mistake for me to put my entire life savings into Bitcoin?

26:28 I mean, if you put it in there at 100 and now you might think of an exit, this might be an excellent strategy.

26:37 Yeah, I only wish I had been so smart.

26:40 All right.

26:41 So, another thing I wanted to ask you about, you talked about these big users and these big projects.

26:45 And I know it's a little bit difficult for people to talk about what they're doing.

26:49 In Python in general, open source and shared libraries and sharing is a big thing.

26:56 How does that look in finance?

26:58 Yeah, it's still an issue.

26:59 So, when I give a talk and sometimes even keynotes and then I talk about the state of Python in finance,

27:05 it's always kind of, yeah, this little spot where we say, well, we have many big users.

27:11 We have many users that benefit and make heavy use of the ecosystem in general, but they, at the same time, don't really contribute back.

27:20 So, when I talk about the big banks, for example, just to make it concrete based on anecdote,

27:27 when I run my events and I approach people working in banks, what they typically say, well, when is it?

27:33 And I say, well, 12 weeks from now.

27:35 And then I say, well, then it might be impossible for me to speak because I won't get clearance for my slides within 12 weeks.

27:42 Yeah.

27:43 And we are not talking about code.

27:44 We are talking about somebody talking about what they're doing and talking about the code.

27:50 And not about the code itself.

27:52 You know, this is kind of this 100% policy in a sense that they don't get anything out of their doors.

28:00 In a sense, what is developed here belongs to the banks.

28:03 People are not allowed to speak about it.

28:05 People are for sure not allowed to open source something.

28:09 And it is a big deal.

28:11 I mean, you referred to the big financial institution trying to hire people at the conferences, but they will have a hard time because many brilliant people,

28:20 people in our ecosystem, they really enjoy being there at their events, giving talks, sharing stuff, discussing things and so forth.

28:29 But at the bank, you hardly ever get the opportunity.

28:33 Beyond something really abstract and really general, you know, it's kind of.

28:37 And this is then typically the managing directors or whoever who deserve for themselves that they go about it.

28:43 On the other hand, we have then the people more or less exclusively on the hedge fund side that have implemented different cultures and policies there.

28:53 So probably the most prominent and best example of this regard is AQR, capital management.

28:59 Pandas started out at AQR.

29:02 And Wes McKinney worked there as a quant analyst.

29:05 I didn't realize that origin.

29:07 That's cool.

29:07 Yeah.

29:08 And when he worked there, they tried simply to solve their internal issues.

29:12 They started early on using Python, but there was nothing comparable to the data frame in R.

29:18 And Wes McKinney said, well, let's implement something like the data frame from R to have easier times with time series management.

29:27 And Pandas now is the big project, but only because AQR back then said, well, this is not at the core.

29:34 We benefit from it, obviously.

29:36 So it's something we use on a daily basis, but we make money by generating alpha, which means by outperforming the market.

29:43 So and by earning returns.

29:44 So this is the core typically of a hedge fund.

29:47 And they said, well, please open source it.

29:49 So the basic idea there, and this is the, if you like, the business case, open sourcing it is to say, well, if beyond our company, maybe a few hundred or someday a few thousand, or in the case of Pandas, maybe a few million people are using it on a daily basis.

30:06 They contribute back to the project and we will have the benefit as well.

30:09 Because again, Pandas is not at the core of AQR capital management.

30:12 So they have the direct and indirect benefits of open sourcing it.

30:16 Inconceivable for the bank world.

30:19 So due to compliance, legal reasons, and so forth.

30:22 Another good example is, for example, in London, man, AHL, one of the bigger hedge funds.

30:27 They, from my point of view, completely opened up for their people, for their culture.

30:32 They're hosting since, I don't know how many months, maybe it's already close to two years.

30:37 They're hosting the Pi Data Meetup with monthly events of about 150 people.

30:43 Wow, that's a big event.

30:45 Yeah, that's cool.

30:46 It's a big event.

30:47 And they are really proactive in this area.

30:50 They have open source Arctic, which is a tick data store.

30:53 They also said, well, we solved our issue.

30:56 We needed a high-performance tick data store.

30:58 But again, it's not at the core of AHL.

31:01 They're also a money manager.

31:02 And money managing and creating, generating alpha is at the core of what they do.

31:06 And they open sourced it.

31:08 And I've had many speakers from AHL, sometimes even two, and the CTO at my meetup and so forth.

31:14 They come and talk about it.

31:16 They talk about the change from other languages, other platform technologies to Python.

31:21 And they know that in order to attract the most brilliant people, they need to open up and they need to embrace open source, not only as a technology, but also as a culture.

31:32 It's really interesting to see how the hedge funds would operate differently.

31:36 It seems like there's a lot more flexibility in sort of whatever that company decides, that those are the rules that go for the hedge funds, whereas the big banks are very conservative.

31:46 Yes, they are.

31:47 But this is driven by legal and compliance.

31:49 You know, if you have a Bank of America, if you have hundreds of thousands of people employed, it's hard to make exceptions, you know, because how do you go about exceptions?

31:59 It's much easier to say, well, 0% or 100%.

32:03 So these policies are much easier to implement.

32:06 And if you have a hedge fund with, let's say, I don't know, 200 people or whatsoever, you have a couple of people in the leadership team.

32:14 And it's much easier to say, well, yes, of course, you can go out and talk about this and that, but make sure to not talk about X, Y, Z.

32:21 And this is much easier.

32:22 But if you have hundreds of thousands of people, it's so hard, you know.

32:26 And all the government regulation.

32:27 Yeah, absolutely.

32:29 It sounds really hard, actually.

32:30 Then you said also there are individuals that come to your classes that use Python and finance things.

32:37 What kind of things would an individual be doing?

32:39 Would this be like day traders or just one-off traders?

32:42 Or what is this?

32:44 This is my typical example.

32:45 I'd say, well, it all started out with a day trader.

32:49 So back in the days, I don't know, early 90s, it started out that you as an individual could rent at such a day trading farm.

32:59 I call them kind of a trading desk with all the technology that you need, the data feeds and execution capabilities, and start day trading.

33:06 So not being employed by a bank or a big buy-side company, you were nevertheless able to start trading on a daily basis, intraday, not by calling a broker in the morning and say, please buy 10 stocks from Apple, 20 from Amazon, whatsoever.

33:22 You could do it on your own.

33:23 This was kind of the first wave.

33:25 And now, as I said it before, with all the programmatic APIs offered by the online brokers and so forth, I can sit here, if you would have a webcast, and I would fire up my shell or my Jupyter notebook.

33:39 I would fire up the trading thing, and within minutes, I would start trading.

33:43 And minutes later, I would stop trading.

33:46 So it has come to the desktop, to the notebooks.

33:49 Just need, frankly, just need kind of a current machine and kind of a decent internet connection.

33:56 That's all you need to get started in this space as of today.

34:00 It's really fascinating to think of someone firing up a Jupyter notebook and trading from it, but it makes perfect sense.

34:08 Hey, everyone.

34:10 Michael here.

34:11 Let me take just a moment and thank one of our sponsors who makes this show possible.

34:14 This portion of Talk Python to Me has been brought to you by Rollbar.

34:17 One of the frustrating things about being a developer is dealing with errors.

34:21 Relying on users to report errors, digging through log files, trying to debug them, or a million alerts just flooding your inbox and ruining your day.

34:28 With Rollbar's full-stack error monitoring, you get the context, insight, and control you need to find and fix bugs faster.

34:36 Adding the Rollbar Python SDK is just as easy as pip install Rollbar.

34:40 You can start tracking production errors and deployments in eight minutes or less.

34:44 Rollbar works with all the major languages and frameworks, including the Python ones, like Django, Flask, Pyramid, as well as Ruby, .NET, Node, iOS, and Android.

34:54 You can integrate Rollbar into your existing workflow, send error alerts to Slack or HipChat, or automatically create new JIRA issues, pivotal tracker issues, and a lot more.

35:02 They have a special offer for Talk Python to me listeners.

35:05 Visit talkpython.fm/rollbar, sign up, and get the bootstrap plan free for 90 days.

35:10 That's 100,000 errors tracked for free.

35:13 But, you know, just between you and me, I hope you don't encounter that many errors.

35:16 Give Rollbar a try today.

35:18 Just go to talkpython.fm/rollbar.

35:21 So, I know for the high-frequency traders, like, latency, network latency matters.

35:29 Like, they'll use microwave connections instead of fiber because they can save two milliseconds.

35:34 They can get, like, a four-millisecond ping time versus a six-millisecond ping time.

35:38 And they'll buy servers in, like, data centers next to the exchanges and all sorts of crazy stuff.

35:45 The individuals you're talking about is probably, like, much higher, much more coarse-grained trading than that, right?

35:51 Not ultra, ultra high-frequency trading, but just watching the market, right?

35:55 Once again, what you're referring to, this is a game of a few.

35:59 So, like, the high rollers in our space, so to say.

36:02 You need millions and millions of hardware investment to get started in this space.

36:07 And it's not what I would call really trading.

36:09 It's, of course, called high-frequency trading, but they more or less provide trading infrastructure in the sense that they are kind of keeping up the markets.

36:19 So, it's not that some of these guys says, well, Apple is a nice stock.

36:23 They don't care about Apple or whether they will bring out iPhone 9 soon or 10 or 12.

36:30 You know, this is not their reasoning at all.

36:32 What a typical trader is all about, oh, well, I'm fascinated by Apple.

36:35 I think that here and there, you know, all these things going on.

36:38 Or even by quant analysis, let's have a look at the history and can we identify certain patterns?

36:43 Can I trade this pattern with the Apple stock or whatsoever?

36:45 High-frequency trading, they just provide markets.

36:48 They're market makers.

36:49 So, they trade, but for completely different reasons.

36:51 They want to make money no matter what happens with the iPhone, no matter what kind of historical patterns there have been or whatsoever.

36:59 They're trying to capture a one-cent change, not long-term.

37:02 I think the price is going to double over the next five years or whatever, sure.

37:06 They don't care about anything that typical traders would care about.

37:09 Sure.

37:10 So, what are some of the other areas that Python shows up in finance?

37:13 Well, you name it these days.

37:15 So, you have it in many.

37:18 Yeah, pretty much.

37:18 I mean, if you have a look at my books, for example, it's in derivatives analytics.

37:24 So, pricing and risk management and simulation.

37:27 You can use it thanks to advances on the software side as well as on the hardware side.

37:32 So, well to slow on a pure Python level can be implemented in a numerically efficient way and fast enough way today.

37:41 So, our library, for example, DX Analytics is a completely Monte Carlo simulation-based pricing library.

37:49 So, it's very, if you think of Monte Carlo, it's the, from a computational point of view, the most demanding numerical method that you can have.

37:56 So, it's the most general one, but this comes at the price.

37:58 It's computationally really demanding.

38:00 But nevertheless, with pure Python on a regular machine, once again, you can implement that.

38:04 It's not that you need a cluster to do proper pricing there, not even for somehow bigger portfolios.

38:09 The software and everything around that.

38:11 And then, when I speak of typical regular hardware as of today, we have come a long way.

38:16 So, this is fast enough to do some decent stuff.

38:19 Not for the big banks with what I mentioned before, kind of the 3 million open positions that need to be re-evaluated thousands of times overnight.

38:27 So, this is a different use case.

38:29 But, again, you see it in principle in all areas.

38:33 Be it on the retail side, where we are not involved typically, but on the quant side, in almost every area.

38:40 So, it's rather the other way around.

38:43 I'm just thinking of spaces where not.

38:45 So, you have brought up high-frequency trading.

38:48 I think this is one of the areas where you won't see that much Python.

38:51 Because for the mini nanosecond, microsecond timescales, it's then still too slow, no matter what performance technology you use.

39:03 Right.

39:04 When you were joking about the assembly code, the one place I can see people still writing that is like a little inline assembler in some C code in high-frequency trading.

39:12 Yeah, sure.

39:13 I mean, this is where they use it.

39:15 When I get to the hardware level, you know.

39:18 For my thinking, this is a hardware game, this high-frequency space.

39:22 Yeah.

39:22 More than a software or financial theory game or so.

39:28 So, I want to dig into your quant platform and your DX analytics library.

39:32 But maybe give us like a broad view of the popular libraries, you know.

39:38 In computation, we have NumPy and Pandas.

39:41 What does that look like in finance?

39:44 The quant platform is the first thing you mentioned.

39:46 Back in the days where we started, it's kind of three years ago.

39:50 Thinking of the quant platform, what we wanted to provide was kind of an interactive financial analytics environment in the browser.

39:56 Because back then, our major work consisted of working with bigger companies, financial institutions.

40:02 And it was always kind of the issue of deployment.

40:05 Deployment in a sense that, yeah, if you want to make use of Python, there are a couple of things that you need to install.

40:12 You need the toolchain.

40:13 You need certain packages.

40:14 You need to keep them updated and consistent and all these things.

40:19 And we thought, well, we have the web technologies available.

40:22 And frankly, we were not the only ones.

40:24 But we focused on this Python side of things in the financial area where we said, well, let's go about and provide something in the browser.

40:32 And yeah, it has evolved to our central tool somehow in the sense that not only with currently close to 10,000 people registered on the platform.

40:42 Some of them is like usual with regard to the distribution heavy users, users on a daily basis.

40:47 Others just registered and not using it at all.

40:51 But for example, our training, our students for the training programs, they find all the resources that we provide that they need on the platform.

40:59 So thinking of training for us is kind of the delivery mechanism where we not only provide static content in the sense of text written there, a little bit of code, sometimes picture slides and so forth.

41:12 You can think of training stuff in a regular way.

41:15 But also the videos are provided there and the ability to execute it at the same time.

41:21 So if we provide there a Jupyter notebook, people just need to click and can watch the video.

41:27 And alongside the video on the same platform, they execute the Python code that is shown in the video.

41:32 So it's a fully integrated environment with all tools that you need for Python development and other languages as well.

41:39 We have R and Julia kernels running on the platform.

41:42 But Python is our focus.

41:44 And I think this is why people come to the platform.

41:47 Yeah.

41:47 But it's the one thing on the one end, so to say.

41:49 Yeah.

41:50 Yeah, it's great.

41:51 So basically, if you have a browser, you can do a lot of this computational stuff with no setup at all, right?

41:55 And you can pick Python 2.7, Python 3, R, like you said.

41:59 Really nice.

42:00 Sure, sure.

42:00 Yeah, I mean, this is.

42:01 So we, people ask, is it, I get this asked kind of regularly.

42:06 What is kind of special proprietary?

42:09 When I start using your platform, is there a lock-in?

42:11 Can I only use your training material, for example, on the Chrome platform?

42:14 No, we just rely on open standards.

42:17 So we are open.

42:18 We try to live the open source culture.

42:20 The Jupyter Notebook team is fantastic.

42:22 So why reinvent the wheel?

42:24 I never understood.

42:25 There are a couple of companies out there, venture capital finance, sometimes, yes, sometimes not.

42:29 They have developed their own platform, Jupyter Notebook equivalent.

42:33 You know?

42:34 I don't see a point in that.

42:35 It's a fantastic tool.

42:36 It's a fantastic team.

42:38 It was behind that.

42:39 And we make use of that.

42:41 So we adjusted a little bit for our purposes and try to tightly integrate it to the platform, what others do as well.

42:47 So it's also nothing unique about what we do.

42:50 In this regard, we rely on the fantastic tools out there.

42:54 But we curate it.

42:55 We integrate it.

42:56 We provide our proprietary content, at least there.

42:59 But if people decide, well, now I've followed along this course for, let's say, 12 weeks.

43:04 I want to do it on my own machine or in any other platform.

43:07 It's the same thing.

43:07 So there's nothing proprietary.

43:09 We even have kind of this.

43:10 This is what I always refer people to.

43:12 We have this zip all thing where I get a huge, sometimes huge zip file of your account data and everything.

43:18 And you can download it and go away.

43:20 And we close it down.

43:21 So it's open.

43:22 And we don't charge.

43:23 For individual accounts, there is no charge on the platform.

43:27 That's kind of more or less a service that we provide to the community.

43:30 Nice.

43:30 Do you use, like, Docker internally to isolate things?

43:34 Or can you talk about that?

43:35 Actually, not.

43:36 From the beginning, we played around with it.

43:38 And we make, yeah, kind of intensive use of Docker.

43:42 But not in this particular instance.

43:44 We decided against it.

43:45 And with kind of the JupyterHub functionality.

43:48 And back when we started out, this is more or less the major reason.

43:51 We decided to build the platform from scratch, which meant for us, from the Linux level, user-based level.

43:59 So all rights and roles and everything is kind of dealt with on a Linux level.

44:03 But we don't use it to separate things because we share stuff.

44:08 We have people working together on same content things and elements and so forth.

44:11 So sharing and working together.

44:13 We decided.

44:14 But maybe today, with all the advances in this area as well, we would decide differently.

44:18 But when we started out, this was the choice we made.

44:21 But still, I mean, this training that I'm giving today is about deployment.

44:26 And Docker will be kind of a major part there.

44:30 I'm fascinated, you know.

44:31 Yeah, Docker seems to show up in so many places.

44:34 Or containers, anyway.

44:35 And for good reason, you know.

44:37 Just think of the new world.

44:39 You can run a Linux operating system on a Windows machine.

44:43 This is kind of...

44:44 Yeah, cats and dogs living together, right?

44:46 It's the bad thing about Docker.

44:47 Yeah, nice.

44:49 So you talked a little bit about your DX analytics library.

44:52 Do you want to talk a little bit more about it?

44:54 Maybe dig into it a bit?

44:55 Yeah, I mean, this whole thing is really financially and technically involved.

45:00 So if you have nothing to do with derivatives pricing, it's probably nothing for you.

45:06 So this is the first thing, the cautionary note, so to say.

45:09 But what we try with this library is to provide a nevertheless professional analytics library based on pure Python.

45:16 So we don't make use of any fancy stuff.

45:19 In principle, it's more or less all about NumPy, Pandas, and the multiprocessing library for parallel processing and stuff like that.

45:27 And nevertheless, we are able to do valuation and risk management for complex portfolios of derivatives instruments.

45:35 And it's all based on numerical method.

45:38 We can calculate, estimate all the creaks on a portfolio level on a single instrument level.

45:43 Again, this is really involved, but people from our finance space, they might know and grasp what I'm talking about.

45:50 And in the end, yeah, it's used.

45:52 I have many, many users from around the world, but many, not many in the sense of millions.

45:58 It's more maybe in the hundreds.

46:00 Many as a percentage.

46:03 Yeah, many as a percentage.

46:04 And it's even from, I just, I'm in a regular touch with somebody from, for example, from the SEC, who's making heavy use of it.

46:13 The American regular regulation authority there and other places.

46:19 So it's in use.

46:20 But again, this is, this targets really, really a niche.

46:23 So when we talk about Python for finance, which is a niche, this is the niche of the niche.

46:28 Sure.

46:29 Yeah, of course.

46:30 But it still is like 215 GitHub stars.

46:32 That's pretty awesome.

46:33 And what's, what's interesting is you've got the DX.

46:36 Is that a package in there?

46:37 Let me look.

46:38 Yeah, it looks like a DX package.

46:39 But then also coming along with that, you've got a bunch of IPython notebooks, which is really interesting.

46:45 A way to like share, like, here's the package and some ways to explore it, right?

46:51 Yeah, sure.

46:52 I mean, this is sometimes, you know, you find on GitHub nice packages, but maybe then even kind of a quick start installation thing, but then you are lost.

47:02 So we have written, I think, kind of a decent documentation.

47:05 And the documentation is based on Jupyter notebooks.

47:08 I don't know.

47:08 It must be something like 13 or 14 Jupyter notebooks, lengthy ones, because the library is kind of powerful.

47:16 And using Sphinx with the respective conversion operations, we've made up the documentation for that.

47:24 That is cool.

47:25 It's not that you get the static documentation or PDF.

47:27 You have the executable codes with all the text also as Jupyter notebooks.

47:31 And it's kind of the nicest way from my point of view to share that stuff these days, you know?

47:35 Okay, so you're telling me at dx-analytics.com, that set of documentation came from, was generated from the IPv3 notebooks?

47:42 Yeah, sure, sure.

47:43 This whole thing.

47:44 Oh, okay.

47:45 Yeah, that's really awesome.

47:46 How cool.

47:47 Okay.

47:48 Yeah, that's great.

47:49 I really do find that I have that same problem.

47:51 I'll go to GitHub and I'm like, oh, this is such a great library.

47:53 Like, I was doing some OAuth 2-based stuff.

47:57 I'm like, this is really great, but wow, how do I use it?

48:01 This is really not, you know, it's just like I almost got it, but I just, there's a few more things I need to know, and it doesn't seem to have it there.

48:08 So, it's cool that you have it.

48:09 This is fantastic.

48:11 I've even given, I think, two times talks about kind of scientific tool chain, you know, what you can do starting from Jupyter Notebook and what results and documentation, in this case, you can get out of that.

48:23 For example, my last book, List of Volatility and Barriering Serialities, was written from the first sentence to the last one in Jupyter Notebooks.

48:29 So, it was converted to LaTeX, and I handed in LaTeX to Wiley Finance, and they took the LaTeX and published it.

48:38 And they might not have even known that it came from Jupyter.

48:41 I told them, but most probably they didn't realize what it meant.

48:44 They're probably like, this guy's crazy.

48:46 It doesn't come from space.

48:47 I don't know what he's talking about.

48:47 Here, take the LaTeX.

48:49 Something like that.

48:50 Nice.

48:52 So, some of the other stuff you've got going on, you've got a boot camp.

48:55 Is that right?

48:55 Is this like a one day, one week, one month?

48:58 Like, what does boot camp mean?

49:00 Yeah, it was just, it ended two weeks ago, the last one.

49:03 We do it twice a year.

49:04 Once, it's an autumn in London, and once in May in New York.

49:10 And we do four days.

49:12 So, this time it was from the 8th of May to the 11th of May in New York.

49:19 And, yeah, it's four days of intensive Python.

49:23 We start with a very introductory day.

49:25 So, we have usually a couple of people that are starting out with Python.

49:29 And for them, it's the first day.

49:31 Then we have on the second day, we cover kind of, let's say, financial data science.

49:36 We typically call it.

49:37 So, to work with NumPy, to work with pandas, time series management, plotting.

49:41 All their basic stuff, not too fancy in terms of data science.

49:44 And day three and four are centered around the algorithmic trading side of things.

49:50 So, people coming to the boot camp from day one, 9 a.m. in the morning until Thursday afternoon,

49:57 they are able then to algorithmically trade on a platform that we use to this end.

50:02 Wow.

50:02 That's a pretty high-speed acceleration from zero to user.

50:09 But that's great, right?

50:10 That also speaks to Python.

50:11 Like, if you did this in C++, it probably wouldn't be possible to do it that short.

50:14 It would be a four-month to four-year exercise, yeah.

50:18 Exactly.

50:19 And then you also run the Python for Quant Finance Meetup, and that's in London?

50:23 That's in London, exactly.

50:24 We've grown the group to 2,000 people.

50:27 It started out some three years ago.

50:28 And we're really active.

50:30 So, really active.

50:31 We have close to 100 people per event.

50:33 And I'm really grateful that Thomson Reuters is a strategic partner of this regard.

50:37 They provide the venue and usually also lots of drinks afterwards.

50:40 And it's really nice to see this group.

50:45 And it's also related to the cultural aspect that we discussed briefly that I find it fascinating

50:51 that back in the days what you had is kind of a network more or less composed of people

50:57 that work or worked in the same company or sometimes even only on the same floor.

51:05 You know, you know your colleagues, the floor down, the floor up.

51:08 You share lunch together and so forth.

51:11 But today you have this meetup movement or these open social networks.

51:16 You have the opportunity to talk to people from other areas, from other banks, even other industries.

51:21 You can exchange ideas.

51:22 You see stuff that's going on in other industries, in other companies when they're open and not allowed to talk about it.

51:29 And it's kind of fascinating.

51:30 People always thank me.

51:32 A couple of people have said, well, I'm more or less the only one in my department, my bank, who uses Python.

51:37 I'm really enjoying to have here the opportunity to exchange ideas and to talk to others who do the same stuff I do.

51:43 But in my bank, there are not that many people, you know.

51:47 And all these stories, you know, open social networks is kind of a nice movement that I really enjoy being part of.

51:54 I really enjoy it.

51:55 Well, I think it serves a super important role.

51:58 I think you're right.

51:58 There are a lot of people, whether it's finance, web development, mechanical engineering, whatever, where there's just one or two people that do Python or whatever it is that you're interested in.

52:12 And going to these meetup slates, you find your tribe and not just be that weird person in the corner that works in that language without curly braces.

52:20 Yeah, exactly, exactly.

52:21 Yeah.

52:22 And you learn quite a bunch.

52:24 So, I mean, usually it's, I would say it's high level talks, you know, it's not kind of nonsense that's presented there.

52:31 It's high level talks presented by experts in their fields.

52:35 And, yeah, and times are changing that fast that picking up a book, you can be convinced that typically this is already a little bit dated and rusty.

52:44 So, here you get kind of the latest, the greatest, the cutting edge, and even sometimes stuff that is not even out there, you know.

52:50 People talking about what they're working on and what might come out in the near future.

52:55 And they say, well, I was thinking of that.

52:57 And then we'll tell my boss about this and that, you know, all these kind of things that are going on there.

53:02 Exchange of information, getting new ideas, seeing what's going on.

53:05 So, keep learning curve.

53:07 Yeah, it's really exciting.

53:08 And it's good to at least see some of the finance industry taking the open source vibe and, like, you know, using it internally, if not the huge banks, which I understand why.

53:19 So, let me ask you, you know, we're kind of getting near the end of the show.

53:22 Let me ask you one more question.

53:23 Then there's two questions I always ask at the end.

53:26 And the last one specifically for you I wanted to ask was about AI.

53:32 You know, AI and machine learning, this is something that it's felt like, you know, kind of like fusion.

53:38 It's always 30 years in the future, right?

53:41 No matter when you ask, it's way out in the future, even though it's definitely coming.

53:46 But I feel like the last two years, two or three years, things are really starting to unlock and machines are really starting to do a lot.

53:52 We were getting self-driving cars.

53:54 We're getting artificial intelligence that are better than radiologists at discovering cancer.

54:01 What's it going to look like when that finally clicks into place for the financial industry?

54:06 And has it yet?

54:08 Yeah, it's a good question.

54:09 And indeed, the question I'm currently really, really interested in.

54:13 So I just yesterday finished another book on the singularity.

54:17 And in particular, the day before I gave my introductory webinar about the upcoming algorithmic trading certificate program, where I said, well, there are two things.

54:31 So the one thing is that machine learning and algorithmic trading are not too different.

54:35 Actually, they are more or less process wise and from the approach, the same thing.

54:38 So you start out with data, algorithms and hardware in both cases.

54:43 You then have kind of this big step in between where you're at least in an algorithmic trading or finance, you have this optimization or your training model.

54:52 You have learning, you have deep learning.

54:54 You do your testing, you do your validation.

54:57 So this is the middle step.

54:58 And the third pillar then is in machine learning that you try to create predictions that are in line with reality, with the tastes of people, or to refer to your example, to have self-driving cars.

55:14 And you say, well, now it's time to turn left.

55:16 Now it's time to turn right.

55:18 And it's all about automation in the end.

55:20 You know, you train these models not to have them sit around and to just give answers when you ask them.

55:27 It's about automating things.

55:28 A self-driving car is supposed to drive.

55:31 So to do it on its own.

55:33 And the same is true for algorithmic trading.

55:35 The third step there is to trade.

55:37 And to algorithmically trade in general means to automatically trade.

55:41 So the two things are, from a conceptual point of view, more or less the same.

55:46 So it's the same approach, same things, same algorithms these days that are used there.

55:52 Maybe in finance we have a few others, like rules of thumb, whatever.

55:55 But from this conceptual point of view, it's the same thing.

55:59 So this is the one area.

56:00 Not too different.

56:01 And the second thing is that I'm convinced that before we see the general singularity, the day when kind of machines are taking over,

56:10 in the sense that we will have beyond human level intelligence and maybe even consciousness built into a machine,

56:17 we will see, let's say, niche or specific singularities.

56:22 And even if you Google this up, there is kind of the expression of a financial singularity,

56:26 which then means that the machines are making markets, are trading and doing all the things and are much better.

56:34 I sometimes use the example when you read even papers from the 70s or whatever, research papers about models and so forth.

56:42 They typically start with certain assumptions when they say, well, let's assume everybody acting in the market has complete information.

56:50 So this is a typical financial assumption, complete information.

56:53 In a model context means that nothing is unknown, hidden or whatsoever, you know, you know, if the market can go up and down, you know that it can go up and down.

57:01 This is what is meant.

57:02 But complete information in our age has changed kind of dramatically.

57:07 And we will see machines, at least in the financial field, that will have something like complete information in a sense that they will have everything that is out there that is relevant for a specific decision at hand.

57:20 And for sure, we all know that we human beings are not really well suited to crunch, let's say, gigabytes, terabytes or petabytes of data to come up with an informed decision about that.

57:29 And I myself have started kind of an internal research project where I've picked out from one online platform that provide historical data, let's say, for free.

57:40 And even with the demo accounts, you can get their data, the historical data I have.

57:45 And I finished this process on kind of a cloud instance.

57:48 I've collected all the data that they provide back to, I don't know, 2001.

57:51 Five second data for all the instruments traded there.

57:54 So this first step, you see, it's simple.

57:57 And with a few bucks only, you are able to collect all the financial data that is out there.

58:03 If you say all the relevant data, I would say, I don't know, probably not, because there's news and there's other stuff.

58:08 But at least it's all the data.

58:10 It's tons of gigabytes of data that you can collect there.

58:13 And you have now the machines that are able to process this more or less in real time.

58:19 So first, I would say AI and machine deep learning and all these nice technologies have changed the place anyways.

58:26 So it's not kind of coming.

58:28 It's there.

58:29 This is the one thing.

58:31 And I see that before we see the general singularity in a sense that we have the big machine as depicted in, let's say, Terminator or 2001 Odyssey or what?

58:42 We have so many science fiction movies which have the machine, the superhuman intelligence, AI doing things.

58:50 We will see kind of industry niche specific singularities and the financial place will be one of the first.

58:57 The incentives are definitely there to get it right.

59:00 It's going to be a wild world if that does come out, right?

59:05 I mean, now it's maybe hard to understand why an algorithm does what it does.

59:09 But when it's a super complicated AI, you won't know why it's trading.

59:14 You'll just have to, you know, kind of hope it's doing the right thing or continue to teach it.

59:20 And then, you know, you gave it this historical data.

59:22 But as AIs get better at sentiment analysis, text, speech, understanding, visual understanding, they could pull in all sorts of social data, all sorts of news data, real time, CNBC, CNN, MSNBC.

59:37 Like, look at all these news channels coming in and maybe capture a news event from the feed before it actually appears in the market, right?

59:49 I mean, there's just amazing stuff there, yeah.

59:51 Sure, this is kind of, I'm a big fan of the show Person of Interest, where the whole background story is about such a machine.

59:57 And when they talk about there is this new machine coming up beyond the machine, it's called Samaritan.

01:00:02 And when they talk about, do we give them access to the data streams, you know, this is kind of, once you have the machine and the machine gets access to it, is exactly what you're describing, then these things might happen.

01:00:16 And we have kind of reached a state where we can simply give access.

01:00:19 So a real world example, one of my partners, I mentioned them before in the context of the meetup is Thomson Reuters.

01:00:27 And they just released the beta version of a Python wrapper for the new API.

01:00:32 And the API, the new one, it's a multi-year project that they've implemented there, gives you programmatic access to the complete data universe of Thomson Reuters, which means all the historical data.

01:00:45 Wow.

01:00:46 In structured form, as well as an unstructured form, which means news, blah, blah, blah, as well as just stock prices on a tick data level, tick data level, you know.

01:00:56 And to the real-time feed.

01:00:59 So real-time news, real-time streaming data, and then, and then, and so.

01:01:05 To be able to provide programmatic access, this is one thing that we have reached already, you know.

01:01:11 And if you have the machine and you plug them together, strange things, amazing things, good things, bad things might happen.

01:01:18 Many, many, many things.

01:01:21 It's going to be an interesting time that we're going to live through, I'm sure.

01:01:25 Yeah, I'm excited about it, especially in this algorithmic trading field, because, talked about it, barriers of entry are low, and you have the real markets, you know, you connect to the markets.

01:01:34 It's not like kind of a physicist having pen and paper and thinking of the universe.

01:01:37 You have the universe, and you can play in the universe.

01:01:40 You can fly your spaceship through it just with your MacBook on your desktop and the internet connection.

01:01:47 You're able to participate and to test your ideas and to work with the data and to collect all the data and to see what's in there.

01:01:54 Fascinating.

01:01:55 All right.

01:01:56 That's very fascinating.

01:01:57 All right, let's leave it there for the show.

01:01:59 But I have two more questions for you.

01:02:00 You can get out of here.

01:02:01 One, I think I can guess on this, looking at your GitHub repo, but if you're going to write some Python code, what's your favorite editor?

01:02:08 I'm using two.

01:02:09 What I'm using most is Wim, because I have it on every platform, and it's really efficient.

01:02:14 I even write my current training material in Wim, so it's not only for coding.

01:02:18 I also write in it for a couple of reasons, but I'm also using for certain things like, I don't know why, but for web stuff.

01:02:24 I don't know why, but for an HTML line.

01:02:25 I don't know.

01:02:25 I'm exclusively using Supply.

01:02:27 So I used to Supply for many, many things, but it's now down to a couple of certain things.

01:02:34 But Wim is my favorite these days.

01:02:36 All right, cool.

01:02:37 And we now have over 100,000 packages on PyPI.

01:02:41 What's one that maybe people haven't heard of, maybe something from the financial space that they should check out?

01:02:46 My favorite, when I refer other people to our industry, is Pandas.

01:02:50 So I think Pandas has been a major, major breakthrough for our industry.

01:02:54 This is the most fantastic package we have around to do finance stuff.

01:02:59 So I would pick this as my favorite one.

01:03:02 All right.

01:03:03 Awesome.

01:03:03 Definitely a good one.

01:03:04 I didn't realize the finance origin, so that's cool to learn.

01:03:08 All right.

01:03:09 So final call to action.

01:03:10 People want to get involved in Python or finance for Python and apply their Python skills to it.

01:03:16 How do they get started?

01:03:17 It's a little bit self-centered, but since we've been working since 10 years, and even if you Google Python for finance,

01:03:21 you probably end up with 40 hits at the Google page out of 50 on the first page pointing to our material.

01:03:29 So pick up a book.

01:03:30 When I started out, there was no book around.

01:03:33 There are good ones available, not only mine.

01:03:37 Go to my private webpage, hillpish.com.

01:03:40 You find 100 talks plus with Jupyter Notebooks, with videos, with whatsoever.

01:03:45 This is kind of a study program in and of itself, I would assume.

01:03:49 All for free.

01:03:51 All the resources are for free.

01:03:52 Yeah, actually, that's a good point.

01:03:54 There are a lot of videos on YouTube that you've done, a lot of conference talks, a lot of tutorials.

01:04:00 So that's a good place to get started for sure.

01:04:02 Yeah, sure.

01:04:03 And usually during a talk, it's not kind of, you know, that you need to invest for like, let's say, weeks or months.

01:04:09 It gives you a good overview.

01:04:10 And you say, well, this is something for me.

01:04:11 So I go about it and look up the details.

01:04:14 And of course, we provide everything else that is needed, like online trainings, starting at very low prices.

01:04:21 Some stuff is even free.

01:04:23 We have a free email course about Python for Finance and many, many others.

01:04:27 So just visit our website.

01:04:28 And from there, you find other resources to get started.

01:04:31 It's actually our business to get people started and to make people better in Python for Finance and algorithmic trading, which is the main focus these days.

01:04:41 Yeah, awesome.

01:04:41 And if you're in London, check out the meetup, right?

01:04:43 Sure, sure.

01:04:44 Come along, come along.

01:04:45 We're planning the next one towards the end of June, actually.

01:04:48 Yeah, we are already in June.

01:04:50 So be sure to have signed up to our meetup group and you will receive information in due time.

01:04:55 All right, Eve, I'll be sure to put all those things in the show notes so people can find them.

01:04:59 Thanks so much for sharing all your experience in finance with Python.

01:05:03 Thanks for having me.

01:05:04 Great time.

01:05:05 Thank you.

01:05:06 Yep, you bet.

01:05:06 Bye.

01:05:06 This has been another episode of Talk Python to Me.

01:05:10 This week's guest has been Eve Hilpish, and the episode's been sponsored by Linode and Rollbar.

01:05:16 Thanks to them both for supporting the show.

01:05:18 Linode is bulletproof hosting for whatever you're building with Python.

01:05:22 Get your four months free at talkpython.fm/Linode.

01:05:27 Just use the code Python17.

01:05:29 Rollbar takes the pain out of errors.

01:05:32 They give you the context and insight you need to quickly locate and fix errors that might have gone unnoticed until your users complain, of course.

01:05:40 As Talk Python to Me listeners, track a ridiculous number of errors for free at rollbar.com slash Talk Python To Me.

01:05:47 Are you or a colleague trying to learn Python?

01:05:49 Have you tried books and videos that just left you bored by covering topics point by point?

01:05:54 Well, check out my online course, Python Jumpstart, by building 10 apps at talkpython.fm/course to experience a more engaging way to learn Python.

01:06:03 And if you're looking for something a little more advanced, try my WritePythonic code course at talkpython.fm/pythonic.

01:06:11 Be sure to subscribe to the show.

01:06:12 Open your favorite podcatcher and search for Python.

01:06:14 We should be right at the top.

01:06:16 You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.

01:06:25 Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.

01:06:30 Corey just recently started selling his tracks on iTunes, so I recommend you check it out at talkpython.fm/music.

01:06:37 You can browse his tracks he has for sale on iTunes and listen to the full-length version of the theme song.

01:06:42 This is your host, Michael Kennedy.

01:06:44 Thanks so much for listening.

01:06:45 I really appreciate it.

01:06:47 Smix, let's get out of here.

01:06:50 Stating with my voice, there's no norm that I can feel within.

01:06:53 Haven't been sleeping, I've been using lots of rest.

01:06:56 I'll pass the mic back to who rocked it best.

01:06:59 I'm first developers.

01:07:00 I'm first developers.

01:07:07 Developers, developers, developers, developers.

01:07:11 you you

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon