Latest / Talk Python To Me / #120: Python in Finance
Transcript
- 0:00This week, we'll enter the world of stock markets, trades, hedge funds, and more.
- 0:04You'll meet Eve Hilpich, who runs the Python Quants, where Python, open source, education,
- 0:09and finance all intersect.
- 0:11This is Python in Finance on Talk Python To Me, episode 120, recorded June 1st, 2017.
- 0:18Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the
- 0:48ecosystem, and the personalities.
- 0:49This is your host, Michael Kennedy.
- 0:52Follow me on Twitter, where I'm @mkennedy.
- 0:54Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter
- 0:59via at Talk Python.
- 1:00Talk Python To Me is partially supported by our training courses.
- 1:04How does your team keep their Python skills sharp?
- 1:07How do you make sure new hires get started fast and learn the Pythonic way?
- 1:11If the answer is a series of boring videos that don't inspire, or a subscription service you
- 1:18way too much for and use way too little, listen up.
- 1:20At Talk Python Training, we have enterprise tiers for all of our courses.
- 1:24Get just the one course you need for your team with full reporting and monitoring.
- 1:29Or ditch that unused subscription for our course bundles, which include all the courses, and
- 1:34you pay about the same price as a subscription once.
- 1:37For details, visit training. talkpython.fm/business, or just email sales at talkpython.fm.
- 1:45Yves, welcome to Talk Python.
- 1:47Thank you.
- 1:48Thank you for having me, Michael.
- 1:49It's great to have you on the show.
- 1:50And I'm really looking forward to learn about Python and finance.
- 1:55And in fact, it's been really fascinating just to do the research to find the questions and
- 2:00interesting things to talk to you about.
- 2:01So I'm really looking forward to talking to you about Python, finance, quants, all this
- 2:07kind of stuff.
- 2:08But before we get into that, let's start with your story.
- 2:10How did you get into programming in Python?
- 2:12Yeah, well, it's kind of, at least for people at my age, kind of a typical story.
- 2:16So I started, my first computer was a C64 Commodore.
- 2:20And back then, I was fascinated by programming already.
- 2:23So it's a long time ago where I started doing basics, basic, back then also assembler.
- 2:28I know if you talk to younger people these days and you say that you've been doing assembler
- 2:33on a machine level, moving around bits and bytes, nobody, almost nobody can imagine it
- 2:39anymore.
- 2:40But this is not actually hard.
- 2:41They might ask you, is that the, they might say, hey, is that the new JavaScript framework?
- 2:45I heard of that.
- 2:46Yeah, something like that, maybe.
- 2:48So, but I think the world has become well too complex to get through the programming.
- 2:53For sure.
- 2:53Yeah.
- 2:53You couldn't build very much in assembler anymore.
- 2:56No, but sometimes I'm fascinated when I'm walking through kind of the, across the shelves
- 3:02and bookstores and I still have assembler books, like, you know, 1,200 pages and just to do
- 3:07a simple arithmetic operation or what.
- 3:10So it's still fascinating.
- 3:12And some people might still do it.
- 3:14I just met one guy, it was a Russian guy at the London meetup that I did.
- 3:18They said, well, I'm doing assembler.
- 3:19But that's the one guy over the last maybe 10 years who told me that he
- 3:22he would be doing assembler.
- 3:23So, but yeah, Python, frankly, after my early programming experience, it more or less stopped
- 3:32because I decided to study business administration.
- 3:34I somehow thought that kind of this would be the path to make money, decent money.
- 3:39And yeah, I mean, the fascination for technology never disappeared.
- 3:46But after my business administration degree in German, we called this Diplom Kaufmann, which
- 3:52is kind of the equivalent of an MBA.
- 3:54I followed up with a PhD in math finance.
- 3:57And this was actually the point where I got into finance.
- 4:00So back then, nobody can imagine in our field today that I've written kind of a PhD thesis
- 4:07without any numerical analysis or programming even.
- 4:10So it was a...
- 4:11Oh, wow.
- 4:12So it was really theoretical.
- 4:13It was just the theory of finance, not here.
- 4:16We're going to simulate something.
- 4:17Yeah, it's kind of...
- 4:19Indeed, today you would probably call these people kind of model quants.
- 4:22They really work on new models.
- 4:24But if you have maybe a thousand quants that you ever look at, maybe only 10 are still working
- 4:29at models, really.
- 4:31But back then, there was much more to discover still.
- 4:35So today, more or less all people working in banks, hedge funds, whatsoever, they are more
- 4:40or less concerned with the numerical side, with the implementation, with the usage of the
- 4:43models that are around, with a couple of improvements left and right.
- 4:46But I did really a theoretical PhD in mathematical finance and a little bit of numerical analysis,
- 4:55but more or less by hand.
- 4:57Just examples, no coding at all.
- 4:59Right.
- 5:01But still, I haven't answered the question how I got into Python, because this was more
- 5:05or less my incident.
- 5:05Yeah, so this theory has not yet gotten you anywhere near Python.
- 5:09Yeah.
- 5:10So, but the two things come together.
- 5:12It was a couple of years later when I was working as a management consultant for an IT company.
- 5:17And I didn't do anything IT there.
- 5:20It was just on a strategic level.
- 5:21But people simply didn't stop talking about Python and how nice Python is and how efficient
- 5:26they are with Python.
- 5:28And it seemed to be like, you know, kind of the best thing after sliced bread.
- 5:33And I had to look at it simply out of curiosity.
- 5:36So there was no real kind of need for me or whatsoever.
- 5:40But I said, well, this sounds so interesting.
- 5:42Maybe there's something in it for finance.
- 5:44And 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.
- 5:52I said, well, this is something I would have loved to have when I did my PhD.
- 5:55This is kind of so close to finance, to math, to all the formula.
- 5:59You can simply write stuff down.
- 6:01And it looks not kind of a cane code.
- 6:03It looks still like math and mathematical finance.
- 6:06And that's when I discovered Python and decided to start using it more as a hobby in the beginning.
- 6:12And it took us a couple of years.
- 6:14And now I don't do anything else.
- 6:15But that sounds really great.
- 6:17Those were pretty early days.
- 6:19Yes, and so the tooling for computation in Python wasn't as good as it is today, right?
- 6:25Sure, sure, sure.
- 6:26I mean, this is what most people said back then and still some do today.
- 6:30Kind of, this is slow.
- 6:31This is an interpreted language.
- 6:32There'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.
- 6:41And it was true.
- 6:43So back then, we didn't even have NumPy.
- 6:45It was numeric.
- 6:46We started using it, which later became NumPy.
- 6:49And, yeah, but we still started doing it because of syntax and everything.
- 6:53And from a research perspective, we had more or less back then.
- 6:58It 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.
- 7:05You know, maybe for people working in production in a financial institution, this is, of course, a decisive question.
- 7:11But for what I had in mind in the first place, it wasn't kind of really a thing.
- 7:15I just saw the efficiency gains that you could get by using a high-level language like Python.
- 7:20I see.
- 7:21So in the beginning, it was like, I need to explore this data.
- 7:23And if it takes a minute, that's totally fine.
- 7:25You weren't trying to do, like, high-frequency trading with it.
- 7:28Yeah, sure.
- 7:28Exactly.
- 7:29Exactly.
- 7:29Yeah, I see.
- 7:31Okay.
- 7:31So 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.
- 7:39What does that end up meaning for you today?
- 7:43Like, what do you do day to day?
- 7:44Yeah, today, I said it before, everything is centered around Python for finance.
- 7:48We don't do anything else.
- 7:49Of course, sometimes I say, well, we talk about Python, but it's more or less open source in finance.
- 7:55So for what we do, we also use other open source technologies.
- 7:58But at the core of the core of what we do is Python.
- 8:01So all our offerings, like the trainings, for example, they're centered around Python and finance.
- 8:08So we don't do, for example, any JavaScript training, nor do we do any kind of Python training for another industry.
- 8:16So it's really at the intersection of Python and finance what we do.
- 8:20And in these areas, we do events, like our conference or a boot camp series, which is called for Python Quants.
- 8:26I'm running a big meetup with 2,000 members in London called Python for Quants Finance.
- 8:31And yeah, we make currently mostly our living off training, online training.
- 8:38And there, the focus is on Python for algorithmic trading, which has become kind of a rather popular topic.
- 8:44Yeah, definitely the algorithmic trading has been.
- 8:47Absolutely, absolutely.
- 8:48Also for retail investors, for single people, but for the big ones as well.
- 8:53So we have usually people attending our classes from the biggest institutions down to students who are just interested in this topic.
- 9:01And 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.
- 9:18So this is how far we have gone.
- 9:20That's very far from the Ivy League university degrees and master's degrees and whatnot, right?
- 9:27Yeah, sure, sure.
- 9:28So you can, everybody can start.
- 9:30Yeah, yeah, that's, that's really great.
- 9:31So you don't need too much mathematical background and statistics and training and sort of theoretical stuff to get started?
- 9:38Ah, well, it doesn't hurt.
- 9:40Let's put me, let's put it that way.
- 9:42But many people even argue that a former background in finance might be hurting in the sense that you believe in the wrong paradigms.
- 9:49Right.
- 9:50You studied a world that no longer exists, maybe?
- 9:52Or it has changed a lot, yeah.
- 9:55When I studied finance and still people who study finance at university, the basic theory still is based off end of day data.
- 10:02Back 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:13But 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:20And now we have arrived at the high frequency trading space.
- 10:24And of course, things have changed.
- 10:26But from my point of view, theory hasn't kept up really well.
- 10:29Yeah, sure.
- 10:30Almost the computational side probably has kept up closer than theory, right?
- 10:34Yeah, sure.
- 10:35Because you need to have the capabilities to process the huge amounts of data.
- 10:39I 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:49Times 10 is 2,500 times 3 is 7,500 end of day points for a single stock.
- 10:58If 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:08So 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:16So, yeah.
- 11:18It has changed quite a bit.
- 11:20So the area that you focus on is the whole quants.
- 11:24Could you maybe tell us what quants are?
- 11:27Give us kind of a spectrum of different things.
- 11:30You said model quants, computational quants, other types of things.
- 11:33What's this landscape look like?
- 11:35Yeah, I mean, the expression quant comes from a quantitative finance or quantitative analysts.
- 11:43So 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:54But usually I think people understand that people are working with models in the sense of, yeah, they are implementing them.
- 12:03They analyze them.
- 12:05They tweak them.
- 12:06They optimize them.
- 12:07They write code based on them and so forth.
- 12:11But this is maybe my point of view.
- 12:13If you ask 10 people in the industry, everybody might come up with a different definition in this regard.
- 12:18But mostly people who have a formal education, formal background, like in engineering, in math, in physics.
- 12:26So, you know, they have the math tools available these days.
- 12:29Also, of course, the programming tools and they now do quantitative stuff and modeling in the financial industry.
- 12:35And this can be from A to Z.
- 12:37This can be credit modeling.
- 12:39This can be in trading.
- 12:41This can be in option pricing.
- 12:42Many people in this area work or with the title work in risk management, which are huge departments in the banks.
- 12:50So it's a diverse set, actually.
- 12:53Sure.
- 12:53Yeah.
- 12:54It sounds like quite a large group, actually.
- 12:56The people that do high frequency trading and like create the algorithms and code that does that, would those be quant?
- 13:03I think you don't hear quant kind of in this context quite often.
- 13:08So they are more technologists from my point of view.
- 13:11So 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:21So I would say, well, I would exclude it, but it's not the first area that comes to my mind.
- 13:27I see.
- 13:27Right.
- 13:28Of course.
- 13:28Okay.
- 13:29So let's see.
- 13:30Let's maybe start with the state of Python in the financial industry.
- 13:35So 10 years ago, it sounded to me like using Python was kind of like, hey, what are you doing?
- 13:41Why are you using that language?
- 13:43Like you should be using Fortran or C or something, or maybe Java, something compiled and faster and more trusted.
- 13:51Right.
- 13:51This actually was the case.
- 13:52So speed, especially in an area where you haven't had kind of the nice hardware way as of today.
- 14:00So 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:10So 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:19And C++ has established itself back then as a standard.
- 14:23And most of the pricing and analytics libraries these days still in use are based on C++.
- 14:29So 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:38So this is where we came from.
- 14:39And 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:51And you come along and say, Python, they just, the only thing that did is laugh at you, you know?
- 14:57Yeah.
- 14:58But, 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:09This was kind of the first area where Python was used back then.
- 15:13But...
- 15:14To kind of glue things together.
- 15:15To glue your C++.
- 15:16Glue things together, yeah, to automate things.
- 15:19And maybe even to orchestrate stuff that was written in C++ and other languages.
- 15:24Sure.
- 15:24And 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:45And they have both implemented core systems based on Python.
- 15:49And...
- 15:51Yeah.
- 15:51Yeah.
- 15:52It was pretty incredible at PyCon.
- 15:54Were you at PyCon this year in the US?
- 15:55Just a few weeks ago?
- 15:56No.
- 15:56Yeah.
- 15:57Saving it for EuroPython?
- 15:58I used to.
- 15:59I 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:07So, the year is only that many months, weeks, and days.
- 16:10Yeah.
- 16:11And I focus more or less on the finance side of things these days, our own conferences.
- 16:16So, I'm traveling anyways, all year round.
- 16:18If you're already running your own conferences.
- 16:20So, what was interesting about PyCon, which is really a technical developer type conference, right?
- 16:26And 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:37And so, for example, JP Morgan Chase, Last Capital One, or also Chase.
- 16:43There's a number of companies, right?
- 16:46Why do they have a booth here?
- 16:48What are they doing here, you know?
- 16:50And basically, they're like, we need as many Python developers as we can get.
- 16:55Sure, sure.
- 16:56That's what I was saying.
- 16:57It's not kind of one piece of technology that is kind of used in certain areas.
- 17:03No, it's Python is at the core, the core system.
- 17:07So, the core risk management trading system at Bank of America is called Quartz, and it's Athena at JP Morgan.
- 17:16And there are now hundreds, if not even thousands of people writing Python code on a daily basis for these systems.
- 17:23So, they need talent, of course, of course.
- 17:25They need talent in order to support, maintain, and further develop their platforms.
- 17:30Yeah, that's really interesting.
- 17:31Yeah, that's really interesting.
- 17:31And 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:40You know?
- 17:41Not many.
- 17:41Yeah.
- 17:42Not many.
- 17:42Not many, actually.
- 17:43But the banks have become technology companies anyway.
- 17:47So, they have thousands of developers.
- 17:49I heard once somebody saying that Bank of America has more developers than Microsoft.
- 17:53I never followed up on that.
- 17:55But, you know, with a bank that has 300,000 people, you can imagine how many of them are doing technology these days.
- 18:03And they have budgets, they have IT budgets in the billions.
- 18:07So, the bigger ones beyond 5 billion per year for IT only.
- 18:10So, they're huge technology companies.
- 18:14Yeah.
- 18:15Another financial area that was using or still does use Python a lot is PayPal.
- 18:19They use Python for many, many things.
- 18:23And they have one of their services that does real-time pricing for transactions and exchanges.
- 18:28That's running on Python and doing several billion requests a day.
- 18:32It was really interesting to see this move from, oh, that's not going to be fast enough.
- 18:37Oh, you can't build real stuff with that.
- 18:39And so on.
- 18:39To now, it's like at the center of some of these things.
- 18:41Yeah, sure.
- 18:42I mean, sometimes when you reach a bottleneck in a certain area, of course, you still have the option to use another technology.
- 18:48And that's the beauty of it.
- 18:49If you go the Python route, it's not that you have only Python available.
- 18:53It's so easy to interface with C++, C code, other technologies in general that might be better suited for this particular task.
- 19:02So, that Python is not a choice where you lose out on other things.
- 19:07Yeah, that's right.
- 19:08The decision there is always a good one because it's very flexible.
- 19:12And you could just even call web services, right?
- 19:15All those types of things.
- 19:16Everything.
- 19:16Everything.
- 19:17It's a general purpose, really flexible language.
- 19:20And talking about performance, we now have also many, many interesting native performance technologies available.
- 19:27So, especially interesting for the finance part there.
- 19:32So, it's not that you need to resort to other technologies in order to get the performance.
- 19:36We have now lots to offer in this regard as well.
- 19:41This portion of talkpython.fm is brought to you by Linode.
- 19:44Are you looking for bulletproof hosting that is fast, simple, and incredibly affordable?
- 19:48Look past that bookstore and check out Linode at talkpython.fm/Linode.
- 19:53That's L-I-N-O-D-E.
- 19:55Plans start at just $5 a month for a dedicated server with a gig of RAM.
- 19:59They have 10 data centers across the globe.
- 20:02So, no matter where you are, there's a data center near you.
- 20:05Whether 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:19Want a dedicated server for free for the next four months?
- 20:22Use the coupon code python17 at talkpython.fm/Linode.
- 20:28Do you know some interesting stuff going on?
- 20:30Are people using GPU clusters to try to make things faster?
- 20:35Anything you can talk about there?
- 20:37Yeah, sure.
- 20:37I mean, this is around since they started using GPUs as GPUs, so general purpose GPUs, ever since.
- 20:47But in the beginning, there was kind of the major problem that the working memory was typically too small to do something significant.
- 20:55So, 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:07Now we're getting a little bit technical.
- 21:09By Monte Carlo simulation, there's a regression involved and stuff like that.
- 21:14You might, for a single option, you might need, I don't know, from a gigabyte onwards, upwards of working memory.
- 21:22And when you think that kind of banks like Morgan Stanley, they typically have 3 million open positions overnight.
- 21:29So, you need to value and revalue a thousand of times 3 million options.
- 21:34So, this somehow illustrates what kind of the requirements are in terms of the hardware that you need.
- 21:41Then GPUs are kind of nice for certain tasks due to the massively parallel code that you can write.
- 21:49But other constraints like 32 bits and the working memory have been issued.
- 21:54Now, we see, of course, that the GPUs are getting bigger.
- 21:59Kind of, you get 12 gigs of RAM and so forth.
- 22:02So, I would see that this will further improve the stuff that you can implement.
- 22:08But 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:17But 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:24and 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:34Yeah, that's pretty interesting.
- 22:36Maybe the people who figured it out just don't talk about it.
- 22:39Which is possible, right?
- 22:40Yeah, usually.
- 22:41I mean, the finance industry overall is kind of secretive in a certain sense.
- 22:47Yeah, 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:55Oh, yeah.
- 22:56Tell us about that.
- 22:57Yeah, for sure, for sure.
- 22:58That's always what I say.
- 22:59If somebody finds it, they probably won't tell you.
- 23:02Yeah, exactly.
- 23:03For sure.
- 23:03I suspect that at some point people will probably pull these in.
- 23:07Or, you know, maybe they just leapfrog over them, right?
- 23:11Like, the big news out of Google I.O.
- 23:14And theoretically coming out of WWDC at vastly different scales are, you know, Google has come up with dedicated AI chips.
- 23:25Like, instead of using GPUs for this kind of stuff, they have now chips just for this kind of stuff.
- 23:30Yeah, the GPUs.
- 23:32The Tensor processing units.
- 23:33Exactly.
- 23:34And, like, Apple is supposed to be shipping an AI chip in the new phones, for example.
- 23:39So, 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:47Yeah, that's kind of it.
- 23:48I mean, it's the same thing in the blockchain space, you know.
- 23:50GPUs were kind of a vogue for a certain period of time because much faster than the CPUs.
- 23:56But now they have the ASICs, their application-specific integrated circuit chips, and GPUs are gone, you know.
- 24:03Yeah, absolutely.
- 24:04You don't need them anymore there.
- 24:06A transition technology.
- 24:07Yeah.
- 24:07So, since you bring up the blockchain stuff, there's plenty more areas to cover, but what do you think about these cryptocurrencies?
- 24:14I consider them really interesting in terms of technology and what is going on there.
- 24:20But maybe you're referring to the recent developments and kind of the explosion in the Bitcoin price, for example.
- 24:25So, I see the market from an economic and financial point of view a little bit overhyped.
- 24:31Yeah.
- 24:31But from a technological perspective, it's really interesting because it combines many, many technologies that have been around for quite a while.
- 24:37They add kind of new stuff to it and solve a couple of issues in very, very elegant ways.
- 24:43So, I really enjoy it.
- 24:45I've given out some webinars about it and I'm into it a little bit, but just a little bit.
- 24:51It'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:03Yeah, for sure.
- 25:04There'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:12Yeah, sure.
- 25:12This is what I refer to when I said, well, the blockchain space solves kind of certain problems in a very elegant fashion.
- 25:20So, 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:31I mean, in the end, the blockchain is nothing else than an immutable database.
- 25:34You know, it's very hard to mutate it.
- 25:37So, we talk about the immutable database and to document property rights.
- 25:41Also, for example, when you think of emerging markets and the world and so forth, and there is potential in there.
- 25:47If this is enough potential to have Bitcoin now at 2,500 or something, US dollar, I don't know.
- 25:54I tweeted about it and said the bubble is about to burst soon.
- 25:57But 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:12And Fidelity is one of the biggest asset managers in the world.
- 26:15Then 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:21Yeah, there's definitely going to be a push.
- 26:24So, you're telling me it was a mistake for me to put my entire life savings into Bitcoin?
- 26:28I mean, if you put it in there at 100 and now you might think of an exit, this might be an excellent strategy.
- 26:37Yeah, I only wish I had been so smart.
- 26:40All right.
- 26:41So, another thing I wanted to ask you about, you talked about these big users and these big projects.
- 26:45And I know it's a little bit difficult for people to talk about what they're doing.
- 26:49In Python in general, open source and shared libraries and sharing is a big thing.
- 26:56How does that look in finance?
- 26:58Yeah, it's still an issue.
- 26:59So, when I give a talk and sometimes even keynotes and then I talk about the state of Python in finance,
- 27:05it's always kind of, yeah, this little spot where we say, well, we have many big users.
- 27:11We 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:20So, when I talk about the big banks, for example, just to make it concrete based on anecdote,
- 27:27when I run my events and I approach people working in banks, what they typically say, well, when is it?
- 27:33And I say, well, 12 weeks from now.
- 27:35And 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:42Yeah.
- 27:43And we are not talking about code.
- 27:44We are talking about somebody talking about what they're doing and talking about the code.
- 27:50And not about the code itself.
- 27:52You know, this is kind of this 100% policy in a sense that they don't get anything out of their doors.
- 28:00In a sense, what is developed here belongs to the banks.
- 28:03People are not allowed to speak about it.
- 28:05People are for sure not allowed to open source something.
- 28:09And it is a big deal.
- 28:11I 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:20people in our ecosystem, they really enjoy being there at their events, giving talks, sharing stuff, discussing things and so forth.
- 28:29But at the bank, you hardly ever get the opportunity.
- 28:33Beyond something really abstract and really general, you know, it's kind of.
- 28:37And this is then typically the managing directors or whoever who deserve for themselves that they go about it.
- 28:43On 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:53So probably the most prominent and best example of this regard is AQR, capital management.
- 28:59Pandas started out at AQR.
- 29:02And Wes McKinney worked there as a quant analyst.
- 29:05I didn't realize that origin.
- 29:07That's cool.
- 29:07Yeah.
- 29:08And when he worked there, they tried simply to solve their internal issues.
- 29:12They started early on using Python, but there was nothing comparable to the data frame in R.
- 29:18And Wes McKinney said, well, let's implement something like the data frame from R to have easier times with time series management.
- 29:27And Pandas now is the big project, but only because AQR back then said, well, this is not at the core.
- 29:34We benefit from it, obviously.
- 29:36So it's something we use on a daily basis, but we make money by generating alpha, which means by outperforming the market.
- 29:43So and by earning returns.
- 29:44So this is the core typically of a hedge fund.
- 29:47And they said, well, please open source it.
- 29:49So 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:06They contribute back to the project and we will have the benefit as well.
- 30:09Because again, Pandas is not at the core of AQR capital management.
- 30:12So they have the direct and indirect benefits of open sourcing it.
- 30:16Inconceivable for the bank world.
- 30:19So due to compliance, legal reasons, and so forth.
- 30:22Another good example is, for example, in London, man, AHL, one of the bigger hedge funds.
- 30:27They, from my point of view, completely opened up for their people, for their culture.
- 30:32They're hosting since, I don't know how many months, maybe it's already close to two years.
- 30:37They're hosting the Pi Data Meetup with monthly events of about 150 people.
- 30:43Wow, that's a big event.
- 30:45Yeah, that's cool.
- 30:46It's a big event.
- 30:47And they are really proactive in this area.
- 30:50They have open source Arctic, which is a tick data store.
- 30:53They also said, well, we solved our issue.
- 30:56We needed a high-performance tick data store.
- 30:58But again, it's not at the core of AHL.
- 31:01They're also a money manager.
- 31:02And money managing and creating, generating alpha is at the core of what they do.
- 31:06And they open sourced it.
- 31:08And I've had many speakers from AHL, sometimes even two, and the CTO at my meetup and so forth.
- 31:14They come and talk about it.
- 31:16They talk about the change from other languages, other platform technologies to Python.
- 31:21And 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:32It's really interesting to see how the hedge funds would operate differently.
- 31:36It 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:46Yes, they are.
- 31:47But this is driven by legal and compliance.
- 31:49You 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:59It's much easier to say, well, 0% or 100%.
- 32:03So these policies are much easier to implement.
- 32:06And 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:14And 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:21And this is much easier.
- 32:22But if you have hundreds of thousands of people, it's so hard, you know.
- 32:26And all the government regulation.
- 32:27Yeah, absolutely.
- 32:29It sounds really hard, actually.
- 32:30Then you said also there are individuals that come to your classes that use Python and finance things.
- 32:37What kind of things would an individual be doing?
- 32:39Would this be like day traders or just one-off traders?
- 32:42Or what is this?
- 32:44This is my typical example.
- 32:45I'd say, well, it all started out with a day trader.
- 32:49So 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:59I 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:06So 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:22You could do it on your own.
- 33:23This was kind of the first wave.
- 33:25And 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:39I would fire up the trading thing, and within minutes, I would start trading.
- 33:43And minutes later, I would stop trading.
- 33:46So it has come to the desktop, to the notebooks.
- 33:49Just need, frankly, just need kind of a current machine and kind of a decent internet connection.
- 33:56That's all you need to get started in this space as of today.
- 34:00It's really fascinating to think of someone firing up a Jupyter notebook and trading from it, but it makes perfect sense.
- 34:08Hey, everyone.
- 34:10Michael here.
- 34:11Let me take just a moment and thank one of our sponsors who makes this show possible.
- 34:14This portion of Talk Python To Me has been brought to you by Rollbar.
- 34:17One of the frustrating things about being a developer is dealing with errors.
- 34:21Relying 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:28With Rollbar's full-stack error monitoring, you get the context, insight, and control you need to find and fix bugs faster.
- 34:36Adding the Rollbar Python SDK is just as easy as pip install Rollbar.
- 34:40You can start tracking production errors and deployments in eight minutes or less.
- 34:44Rollbar 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:54You 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:02They have a special offer for Talk Python To Me listeners.
- 35:05Visit talkpython.fm/rollbar, sign up, and get the bootstrap plan free for 90 days.
- 35:10That's 100,000 errors tracked for free.
- 35:13But, you know, just between you and me, I hope you don't encounter that many errors.
- 35:16Give Rollbar a try today.
- 35:18Just go to talkpython.fm/rollbar.
- 35:21So, I know for the high-frequency traders, like, latency, network latency matters.
- 35:29Like, they'll use microwave connections instead of fiber because they can save two milliseconds.
- 35:34They can get, like, a four-millisecond ping time versus a six-millisecond ping time.
- 35:38And they'll buy servers in, like, data centers next to the exchanges and all sorts of crazy stuff.
- 35:45The individuals you're talking about is probably, like, much higher, much more coarse-grained trading than that, right?
- 35:51Not ultra, ultra high-frequency trading, but just watching the market, right?
- 35:55Once again, what you're referring to, this is a game of a few.
- 35:59So, like, the high rollers in our space, so to say.
- 36:02You need millions and millions of hardware investment to get started in this space.
- 36:07And it's not what I would call really trading.
- 36:09It'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:19So, it's not that some of these guys says, well, Apple is a nice stock.
- 36:23They don't care about Apple or whether they will bring out iPhone 9 soon or 10 or 12.
- 36:30You know, this is not their reasoning at all.
- 36:32What a typical trader is all about, oh, well, I'm fascinated by Apple.
- 36:35I think that here and there, you know, all these things going on.
- 36:38Or even by quant analysis, let's have a look at the history and can we identify certain patterns?
- 36:43Can I trade this pattern with the Apple stock or whatsoever?
- 36:45High-frequency trading, they just provide markets.
- 36:48They're market makers.
- 36:49So, they trade, but for completely different reasons.
- 36:51They want to make money no matter what happens with the iPhone, no matter what kind of historical patterns there have been or whatsoever.
- 36:59They're trying to capture a one-cent change, not long-term.
- 37:02I think the price is going to double over the next five years or whatever, sure.
- 37:06They don't care about anything that typical traders would care about.
- 37:09Sure.
- 37:10So, what are some of the other areas that Python shows up in finance?
- 37:13Well, you name it these days.
- 37:15So, you have it in many.
- 37:18Yeah, pretty much.
- 37:18I mean, if you have a look at my books, for example, it's in derivatives analytics.
- 37:24So, pricing and risk management and simulation.
- 37:27You can use it thanks to advances on the software side as well as on the hardware side.
- 37:32So, well to slow on a pure Python level can be implemented in a numerically efficient way and fast enough way today.
- 37:41So, our library, for example, DX Analytics is a completely Monte Carlo simulation-based pricing library.
- 37:49So, 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:56So, it's the most general one, but this comes at the price.
- 37:58It's computationally really demanding.
- 38:00But nevertheless, with pure Python on a regular machine, once again, you can implement that.
- 38:04It's not that you need a cluster to do proper pricing there, not even for somehow bigger portfolios.
- 38:09The software and everything around that.
- 38:11And then, when I speak of typical regular hardware as of today, we have come a long way.
- 38:16So, this is fast enough to do some decent stuff.
- 38:19Not 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:27So, this is a different use case.
- 38:29But, again, you see it in principle in all areas.
- 38:33Be it on the retail side, where we are not involved typically, but on the quant side, in almost every area.
- 38:40So, it's rather the other way around.
- 38:43I'm just thinking of spaces where not.
- 38:45So, you have brought up high-frequency trading.
- 38:48I think this is one of the areas where you won't see that much Python.
- 38:51Because for the mini nanosecond, microsecond timescales, it's then still too slow, no matter what performance technology you use.
- 39:03Right.
- 39:04When 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:12Yeah, sure.
- 39:13I mean, this is where they use it.
- 39:15When I get to the hardware level, you know.
- 39:18For my thinking, this is a hardware game, this high-frequency space.
- 39:22Yeah.
- 39:22More than a software or financial theory game or so.
- 39:28So, I want to dig into your quant platform and your DX analytics library.
- 39:32But maybe give us like a broad view of the popular libraries, you know.
- 39:38In computation, we have NumPy and Pandas.
- 39:41What does that look like in finance?
- 39:44The quant platform is the first thing you mentioned.
- 39:46Back in the days where we started, it's kind of three years ago.
- 39:50Thinking of the quant platform, what we wanted to provide was kind of an interactive financial analytics environment in the browser.
- 39:56Because back then, our major work consisted of working with bigger companies, financial institutions.
- 40:02And it was always kind of the issue of deployment.
- 40:05Deployment 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:12You need the toolchain.
- 40:13You need certain packages.
- 40:14You need to keep them updated and consistent and all these things.
- 40:19And we thought, well, we have the web technologies available.
- 40:22And frankly, we were not the only ones.
- 40:24But 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:32And 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:42Some of them is like usual with regard to the distribution heavy users, users on a daily basis.
- 40:47Others just registered and not using it at all.
- 40:51But 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:59So 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:12You can think of training stuff in a regular way.
- 41:15But also the videos are provided there and the ability to execute it at the same time.
- 41:21So if we provide there a Jupyter notebook, people just need to click and can watch the video.
- 41:27And alongside the video on the same platform, they execute the Python code that is shown in the video.
- 41:32So it's a fully integrated environment with all tools that you need for Python development and other languages as well.
- 41:39We have R and Julia kernels running on the platform.
- 41:42But Python is our focus.
- 41:44And I think this is why people come to the platform.
- 41:47Yeah.
- 41:47But it's the one thing on the one end, so to say.
- 41:49Yeah.
- 41:50Yeah, it's great.
- 41:51So basically, if you have a browser, you can do a lot of this computational stuff with no setup at all, right?
- 41:55And you can pick Python 2.7, Python 3, R, like you said.
- 41:59Really nice.
- 42:00Sure, sure.
- 42:00Yeah, I mean, this is.
- 42:01So we, people ask, is it, I get this asked kind of regularly.
- 42:06What is kind of special proprietary?
- 42:09When I start using your platform, is there a lock-in?
- 42:11Can I only use your training material, for example, on the Chrome platform?
- 42:14No, we just rely on open standards.
- 42:17So we are open.
- 42:18We try to live the open source culture.
- 42:20The Jupyter Notebook team is fantastic.
- 42:22So why reinvent the wheel?
- 42:24I never understood.
- 42:25There are a couple of companies out there, venture capital finance, sometimes, yes, sometimes not.
- 42:29They have developed their own platform, Jupyter Notebook equivalent.
- 42:33You know?
- 42:34I don't see a point in that.
- 42:35It's a fantastic tool.
- 42:36It's a fantastic team.
- 42:38It was behind that.
- 42:39And we make use of that.
- 42:41So we adjusted a little bit for our purposes and try to tightly integrate it to the platform, what others do as well.
- 42:47So it's also nothing unique about what we do.
- 42:50In this regard, we rely on the fantastic tools out there.
- 42:54But we curate it.
- 42:55We integrate it.
- 42:56We provide our proprietary content, at least there.
- 42:59But if people decide, well, now I've followed along this course for, let's say, 12 weeks.
- 43:04I want to do it on my own machine or in any other platform.
- 43:07It's the same thing.
- 43:07So there's nothing proprietary.
- 43:09We even have kind of this.
- 43:10This is what I always refer people to.
- 43:12We have this zip all thing where I get a huge, sometimes huge zip file of your account data and everything.
- 43:18And you can download it and go away.
- 43:20And we close it down.
- 43:21So it's open.
- 43:22And we don't charge.
- 43:23For individual accounts, there is no charge on the platform.
- 43:27That's kind of more or less a service that we provide to the community.
- 43:30Nice.
- 43:30Do you use, like, Docker internally to isolate things?
- 43:34Or can you talk about that?
- 43:35Actually, not.
- 43:36From the beginning, we played around with it.
- 43:38And we make, yeah, kind of intensive use of Docker.
- 43:42But not in this particular instance.
- 43:44We decided against it.
- 43:45And with kind of the JupyterHub functionality.
- 43:48And back when we started out, this is more or less the major reason.
- 43:51We decided to build the platform from scratch, which meant for us, from the Linux level, user-based level.
- 43:59So all rights and roles and everything is kind of dealt with on a Linux level.
- 44:03But we don't use it to separate things because we share stuff.
- 44:08We have people working together on same content things and elements and so forth.
- 44:11So sharing and working together.
- 44:13We decided.
- 44:14But maybe today, with all the advances in this area as well, we would decide differently.
- 44:18But when we started out, this was the choice we made.
- 44:21But still, I mean, this training that I'm giving today is about deployment.
- 44:26And Docker will be kind of a major part there.
- 44:30I'm fascinated, you know.
- 44:31Yeah, Docker seems to show up in so many places.
- 44:34Or containers, anyway.
- 44:35And for good reason, you know.
- 44:37Just think of the new world.
- 44:39You can run a Linux operating system on a Windows machine.
- 44:43This is kind of...
- 44:44Yeah, cats and dogs living together, right?
- 44:46It's the bad thing about Docker.
- 44:47Yeah, nice.
- 44:49So you talked a little bit about your DX analytics library.
- 44:52Do you want to talk a little bit more about it?
- 44:54Maybe dig into it a bit?
- 44:55Yeah, I mean, this whole thing is really financially and technically involved.
- 45:00So if you have nothing to do with derivatives pricing, it's probably nothing for you.
- 45:06So this is the first thing, the cautionary note, so to say.
- 45:09But what we try with this library is to provide a nevertheless professional analytics library based on pure Python.
- 45:16So we don't make use of any fancy stuff.
- 45:19In principle, it's more or less all about NumPy, Pandas, and the multiprocessing library for parallel processing and stuff like that.
- 45:27And nevertheless, we are able to do valuation and risk management for complex portfolios of derivatives instruments.
- 45:35And it's all based on numerical method.
- 45:38We can calculate, estimate all the creaks on a portfolio level on a single instrument level.
- 45:43Again, this is really involved, but people from our finance space, they might know and grasp what I'm talking about.
- 45:50And in the end, yeah, it's used.
- 45:52I have many, many users from around the world, but many, not many in the sense of millions.
- 45:58It's more maybe in the hundreds.
- 46:00Many as a percentage.
- 46:03Yeah, many as a percentage.
- 46:04And 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:13The American regular regulation authority there and other places.
- 46:19So it's in use.
- 46:20But again, this is, this targets really, really a niche.
- 46:23So when we talk about Python for finance, which is a niche, this is the niche of the niche.
- 46:28Sure.
- 46:29Yeah, of course.
- 46:30But it still is like 215 GitHub stars.
- 46:32That's pretty awesome.
- 46:33And what's, what's interesting is you've got the DX.
- 46:36Is that a package in there?
- 46:37Let me look.
- 46:38Yeah, it looks like a DX package.
- 46:39But then also coming along with that, you've got a bunch of IPython notebooks, which is really interesting.
- 46:45A way to like share, like, here's the package and some ways to explore it, right?
- 46:51Yeah, sure.
- 46:52I 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:02So we have written, I think, kind of a decent documentation.
- 47:05And the documentation is based on Jupyter notebooks.
- 47:08I don't know.
- 47:08It must be something like 13 or 14 Jupyter notebooks, lengthy ones, because the library is kind of powerful.
- 47:16And using Sphinx with the respective conversion operations, we've made up the documentation for that.
- 47:24That is cool.
- 47:25It's not that you get the static documentation or PDF.
- 47:27You have the executable codes with all the text also as Jupyter notebooks.
- 47:31And it's kind of the nicest way from my point of view to share that stuff these days, you know?
- 47:35Okay, so you're telling me at dx-analytics.com, that set of documentation came from, was generated from the IPv3 notebooks?
- 47:42Yeah, sure, sure.
- 47:43This whole thing.
- 47:44Oh, okay.
- 47:45Yeah, that's really awesome.
- 47:46How cool.
- 47:47Okay.
- 47:48Yeah, that's great.
- 47:49I really do find that I have that same problem.
- 47:51I'll go to GitHub and I'm like, oh, this is such a great library.
- 47:53Like, I was doing some OAuth 2-based stuff.
- 47:57I'm like, this is really great, but wow, how do I use it?
- 48:01This 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:08So, it's cool that you have it.
- 48:09This is fantastic.
- 48:11I'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:23For example, my last book, List of Volatility and Barriering Serialities, was written from the first sentence to the last one in Jupyter Notebooks.
- 48:29So, it was converted to LaTeX, and I handed in LaTeX to Wiley Finance, and they took the LaTeX and published it.
- 48:38And they might not have even known that it came from Jupyter.
- 48:41I told them, but most probably they didn't realize what it meant.
- 48:44They're probably like, this guy's crazy.
- 48:46It doesn't come from space.
- 48:47I don't know what he's talking about.
- 48:47Here, take the LaTeX.
- 48:49Something like that.
- 48:50Nice.
- 48:52So, some of the other stuff you've got going on, you've got a boot camp.
- 48:55Is that right?
- 48:55Is this like a one day, one week, one month?
- 48:58Like, what does boot camp mean?
- 49:00Yeah, it was just, it ended two weeks ago, the last one.
- 49:03We do it twice a year.
- 49:04Once, it's an autumn in London, and once in May in New York.
- 49:10And we do four days.
- 49:12So, this time it was from the 8th of May to the 11th of May in New York.
- 49:19And, yeah, it's four days of intensive Python.
- 49:23We start with a very introductory day.
- 49:25So, we have usually a couple of people that are starting out with Python.
- 49:29And for them, it's the first day.
- 49:31Then we have on the second day, we cover kind of, let's say, financial data science.
- 49:36We typically call it.
- 49:37So, to work with NumPy, to work with pandas, time series management, plotting.
- 49:41All their basic stuff, not too fancy in terms of data science.
- 49:44And day three and four are centered around the algorithmic trading side of things.
- 49:50So, people coming to the boot camp from day one, 9 a.m. in the morning until Thursday afternoon,
- 49:57they are able then to algorithmically trade on a platform that we use to this end.
- 50:02Wow.
- 50:02That's a pretty high-speed acceleration from zero to user.
- 50:09But that's great, right?
- 50:10That also speaks to Python.
- 50:11Like, if you did this in C++, it probably wouldn't be possible to do it that short.
- 50:14It would be a four-month to four-year exercise, yeah.
- 50:18Exactly.
- 50:19And then you also run the Python for Quant Finance Meetup, and that's in London?
- 50:23That's in London, exactly.
- 50:24We've grown the group to 2,000 people.
- 50:27It started out some three years ago.
- 50:28And we're really active.
- 50:30So, really active.
- 50:31We have close to 100 people per event.
- 50:33And I'm really grateful that Thomson Reuters is a strategic partner of this regard.
- 50:37They provide the venue and usually also lots of drinks afterwards.
- 50:40And it's really nice to see this group.
- 50:45And it's also related to the cultural aspect that we discussed briefly that I find it fascinating
- 50:51that back in the days what you had is kind of a network more or less composed of people
- 50:57that work or worked in the same company or sometimes even only on the same floor.
- 51:05You know, you know your colleagues, the floor down, the floor up.
- 51:08You share lunch together and so forth.
- 51:11But today you have this meetup movement or these open social networks.
- 51:16You have the opportunity to talk to people from other areas, from other banks, even other industries.
- 51:21You can exchange ideas.
- 51:22You see stuff that's going on in other industries, in other companies when they're open and not allowed to talk about it.
- 51:29And it's kind of fascinating.
- 51:30People always thank me.
- 51:32A couple of people have said, well, I'm more or less the only one in my department, my bank, who uses Python.
- 51:37I'm really enjoying to have here the opportunity to exchange ideas and to talk to others who do the same stuff I do.
- 51:43But in my bank, there are not that many people, you know.
- 51:47And all these stories, you know, open social networks is kind of a nice movement that I really enjoy being part of.
- 51:54I really enjoy it.
- 51:55Well, I think it serves a super important role.
- 51:58I think you're right.
- 51:58There 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:12And 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:20Yeah, exactly, exactly.
- 52:21Yeah.
- 52:22And you learn quite a bunch.
- 52:24So, 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:31It's high level talks presented by experts in their fields.
- 52:35And, 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:44So, 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:50People talking about what they're working on and what might come out in the near future.
- 52:55And they say, well, I was thinking of that.
- 52:57And then we'll tell my boss about this and that, you know, all these kind of things that are going on there.
- 53:02Exchange of information, getting new ideas, seeing what's going on.
- 53:05So, keep learning curve.
- 53:07Yeah, it's really exciting.
- 53:08And 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:19So, let me ask you, you know, we're kind of getting near the end of the show.
- 53:22Let me ask you one more question.
- 53:23Then there's two questions I always ask at the end.
- 53:26And the last one specifically for you I wanted to ask was about AI.
- 53:32You know, AI and machine learning, this is something that it's felt like, you know, kind of like fusion.
- 53:38It's always 30 years in the future, right?
- 53:41No matter when you ask, it's way out in the future, even though it's definitely coming.
- 53:46But 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:52We were getting self-driving cars.
- 53:54We're getting artificial intelligence that are better than radiologists at discovering cancer.
- 54:01What's it going to look like when that finally clicks into place for the financial industry?
- 54:06And has it yet?
- 54:08Yeah, it's a good question.
- 54:09And indeed, the question I'm currently really, really interested in.
- 54:13So I just yesterday finished another book on the singularity.
- 54:17And 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:31So the one thing is that machine learning and algorithmic trading are not too different.
- 54:35Actually, they are more or less process wise and from the approach, the same thing.
- 54:38So you start out with data, algorithms and hardware in both cases.
- 54:43You 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:52You have learning, you have deep learning.
- 54:54You do your testing, you do your validation.
- 54:57So this is the middle step.
- 54:58And 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:14And you say, well, now it's time to turn left.
- 55:16Now it's time to turn right.
- 55:18And it's all about automation in the end.
- 55:20You know, you train these models not to have them sit around and to just give answers when you ask them.
- 55:27It's about automating things.
- 55:28A self-driving car is supposed to drive.
- 55:31So to do it on its own.
- 55:33And the same is true for algorithmic trading.
- 55:35The third step there is to trade.
- 55:37And to algorithmically trade in general means to automatically trade.
- 55:41So the two things are, from a conceptual point of view, more or less the same.
- 55:46So it's the same approach, same things, same algorithms these days that are used there.
- 55:52Maybe in finance we have a few others, like rules of thumb, whatever.
- 55:55But from this conceptual point of view, it's the same thing.
- 55:59So this is the one area.
- 56:00Not too different.
- 56:01And 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:10in the sense that we will have beyond human level intelligence and maybe even consciousness built into a machine,
- 56:17we will see, let's say, niche or specific singularities.
- 56:22And even if you Google this up, there is kind of the expression of a financial singularity,
- 56:26which then means that the machines are making markets, are trading and doing all the things and are much better.
- 56:34I sometimes use the example when you read even papers from the 70s or whatever, research papers about models and so forth.
- 56:42They typically start with certain assumptions when they say, well, let's assume everybody acting in the market has complete information.
- 56:50So this is a typical financial assumption, complete information.
- 56:53In 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:01This is what is meant.
- 57:02But complete information in our age has changed kind of dramatically.
- 57:07And 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:20And 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:29And 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:40And even with the demo accounts, you can get their data, the historical data I have.
- 57:45And I finished this process on kind of a cloud instance.
- 57:48I've collected all the data that they provide back to, I don't know, 2001.
- 57:51Five second data for all the instruments traded there.
- 57:54So this first step, you see, it's simple.
- 57:57And with a few bucks only, you are able to collect all the financial data that is out there.
- 58:03If 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:08But at least it's all the data.
- 58:10It's tons of gigabytes of data that you can collect there.
- 58:13And you have now the machines that are able to process this more or less in real time.
- 58:19So first, I would say AI and machine deep learning and all these nice technologies have changed the place anyways.
- 58:26So it's not kind of coming.
- 58:28It's there.
- 58:29This is the one thing.
- 58:31And 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:42We have so many science fiction movies which have the machine, the superhuman intelligence, AI doing things.
- 58:50We will see kind of industry niche specific singularities and the financial place will be one of the first.
- 58:57The incentives are definitely there to get it right.
- 59:00It's going to be a wild world if that does come out, right?
- 59:05I mean, now it's maybe hard to understand why an algorithm does what it does.
- 59:09But when it's a super complicated AI, you won't know why it's trading.
- 59:14You'll just have to, you know, kind of hope it's doing the right thing or continue to teach it.
- 59:20And then, you know, you gave it this historical data.
- 59:22But 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:37Like, 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:49I mean, there's just amazing stuff there, yeah.
- 59:51Sure, 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:57And when they talk about there is this new machine coming up beyond the machine, it's called Samaritan.
- 1:00:02And 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.
- 1:00:16And we have kind of reached a state where we can simply give access.
- 1:00:19So a real world example, one of my partners, I mentioned them before in the context of the meetup is Thomson Reuters.
- 1:00:27And they just released the beta version of a Python wrapper for the new API.
- 1:00:32And 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.
- 1:00:45Wow.
- 1:00:46In 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.
- 1:00:56And to the real-time feed.
- 1:00:59So real-time news, real-time streaming data, and then, and then, and so.
- 1:01:05To be able to provide programmatic access, this is one thing that we have reached already, you know.
- 1:01:11And if you have the machine and you plug them together, strange things, amazing things, good things, bad things might happen.
- 1:01:18Many, many, many things.
- 1:01:21It's going to be an interesting time that we're going to live through, I'm sure.
- 1:01:25Yeah, 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.
- 1:01:34It's not like kind of a physicist having pen and paper and thinking of the universe.
- 1:01:37You have the universe, and you can play in the universe.
- 1:01:40You can fly your spaceship through it just with your MacBook on your desktop and the internet connection.
- 1:01:47You'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.
- 1:01:54Fascinating.
- 1:01:55All right.
- 1:01:56That's very fascinating.
- 1:01:57All right, let's leave it there for the show.
- 1:01:59But I have two more questions for you.
- 1:02:00You can get out of here.
- 1:02:01One, 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?
- 1:02:08I'm using two.
- 1:02:09What I'm using most is Wim, because I have it on every platform, and it's really efficient.
- 1:02:14I even write my current training material in Wim, so it's not only for coding.
- 1:02:18I 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.
- 1:02:24I don't know why, but for an HTML line.
- 1:02:25I don't know.
- 1:02:25I'm exclusively using Supply.
- 1:02:27So I used to Supply for many, many things, but it's now down to a couple of certain things.
- 1:02:34But Wim is my favorite these days.
- 1:02:36All right, cool.
- 1:02:37And we now have over 100,000 packages on PyPI.
- 1:02:41What's one that maybe people haven't heard of, maybe something from the financial space that they should check out?
- 1:02:46My favorite, when I refer other people to our industry, is Pandas.
- 1:02:50So I think Pandas has been a major, major breakthrough for our industry.
- 1:02:54This is the most fantastic package we have around to do finance stuff.
- 1:02:59So I would pick this as my favorite one.
- 1:03:02All right.
- 1:03:03Awesome.
- 1:03:03Definitely a good one.
- 1:03:04I didn't realize the finance origin, so that's cool to learn.
- 1:03:08All right.
- 1:03:09So final call to action.
- 1:03:10People want to get involved in Python or finance for Python and apply their Python skills to it.
- 1:03:16How do they get started?
- 1:03:17It's a little bit self-centered, but since we've been working since 10 years, and even if you Google Python for finance,
- 1:03:21you probably end up with 40 hits at the Google page out of 50 on the first page pointing to our material.
- 1:03:29So pick up a book.
- 1:03:30When I started out, there was no book around.
- 1:03:33There are good ones available, not only mine.
- 1:03:37Go to my private webpage, hillpish.com.
- 1:03:40You find 100 talks plus with Jupyter Notebooks, with videos, with whatsoever.
- 1:03:45This is kind of a study program in and of itself, I would assume.
- 1:03:49All for free.
- 1:03:51All the resources are for free.
- 1:03:52Yeah, actually, that's a good point.
- 1:03:54There are a lot of videos on YouTube that you've done, a lot of conference talks, a lot of tutorials.
- 1:04:00So that's a good place to get started for sure.
- 1:04:02Yeah, sure.
- 1:04:03And usually during a talk, it's not kind of, you know, that you need to invest for like, let's say, weeks or months.
- 1:04:09It gives you a good overview.
- 1:04:10And you say, well, this is something for me.
- 1:04:11So I go about it and look up the details.
- 1:04:14And of course, we provide everything else that is needed, like online trainings, starting at very low prices.
- 1:04:21Some stuff is even free.
- 1:04:23We have a free email course about Python for Finance and many, many others.
- 1:04:27So just visit our website.
- 1:04:28And from there, you find other resources to get started.
- 1:04:31It'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.
- 1:04:41Yeah, awesome.
- 1:04:41And if you're in London, check out the meetup, right?
- 1:04:43Sure, sure.
- 1:04:44Come along, come along.
- 1:04:45We're planning the next one towards the end of June, actually.
- 1:04:48Yeah, we are already in June.
- 1:04:50So be sure to have signed up to our meetup group and you will receive information in due time.
- 1:04:55All right, Eve, I'll be sure to put all those things in the show notes so people can find them.
- 1:04:59Thanks so much for sharing all your experience in finance with Python.
- 1:05:03Thanks for having me.
- 1:05:04Great time.
- 1:05:05Thank you.
- 1:05:06Yep, you bet.
- 1:05:06Bye.
- 1:05:06This has been another episode of Talk Python To Me.
- 1:05:10This week's guest has been Eve Hilpish, and the episode's been sponsored by Linode and Rollbar.
- 1:05:16Thanks to them both for supporting the show.
- 1:05:18Linode is bulletproof hosting for whatever you're building with Python.
- 1:05:22Get your four months free at talkpython.fm/Linode.
- 1:05:27Just use the code Python17.
- 1:05:29Rollbar takes the pain out of errors.
- 1:05:32They 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.
- 1:05:40As Talk Python To Me listeners, track a ridiculous number of errors for free at rollbar.com slash Talk Python To Me.
- 1:05:47Are you or a colleague trying to learn Python?
- 1:05:49Have you tried books and videos that just left you bored by covering topics point by point?
- 1:05:54Well, check out my online course, Python Jumpstart, by building 10 apps at talkpython.fm/course to experience a more engaging way to learn Python.
- 1:06:03And if you're looking for something a little more advanced, try my WritePythonic code course at talkpython.fm/pythonic.
- 1:06:11Be sure to subscribe to the show.
- 1:06:12Open your favorite podcatcher and search for Python.
- 1:06:14We should be right at the top.
- 1:06:16You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.
- 1:06:25Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
- 1:06:30Corey just recently started selling his tracks on iTunes, so I recommend you check it out at talkpython.fm/music.
- 1:06:37You can browse his tracks he has for sale on iTunes and listen to the full-length version of the theme song.
- 1:06:42This is your host, Michael Kennedy.
- 1:06:44Thanks so much for listening.
- 1:06:45I really appreciate it.
- 1:06:47Smix, let's get out of here.
- 1:06:50Stating with my voice, there's no norm that I can feel within.
- 1:06:53Haven't been sleeping, I've been using lots of rest.
- 1:06:56I'll pass the mic back to who rocked it best.
- 1:06:59I'm first developers.
- 1:07:00I'm first developers.
- 1:07:07Developers, developers, developers, developers.
- 1:07:11you
- 1:07:11you