Monitor performance issues & errors in your code

#370: OpenBB: Python's Open-source Investment Platform Transcript

Recorded on Thursday, Jun 9, 2022.

00:00 You may have heard of the Bloomberg Terminal. It's expensive software that can monitor and analyze realtime financial market data. But have you heard of OpenBB? It's similar software for realtime and longterm analysis for finance and investing. The difference is it's open source and built entirely with Python. It gives you access to analyze a massive amount of real time data and historical data using the full Python Data Science stack. On this episode, we have one of the co founders, James Maslek, here to give us a look inside this cool piece of Python based software. This is Talked Python to me. Episode 370 recorded June 9, 2022.

00:50 Welcome.

00:50 To Talk Python to Me, a weekly podcast on Python. This is your host, Michael Kennedy. Follow me on Twitter, where I'm @mkkennedy, and keep up with the show and listen to past episodes at Talkpython FM and follow the show on Twitter via @talkpython. We've started streaming most of our episodes live on YouTube, subscribe to our YouTube channel over at to get notified about upcoming shows and be part of that episode. This episode is brought to you by Sentry and their awesome error monitoring product, as well as the Python At Scale Summit conference being held in October. Reconnect with your Data Science colleagues this year.

01:28 Transcripts for this and all of our.

01:30 Episodes are brought to you by Assembly AI.

01:32 Do you need a great automatic speech to text API? Get human level accuracy and just a few lines of code?

01:37 Visit

01:41 James, welcome to Talk Python to me.

01:43 thank you so much for having us. I'm looking forward to the next hour or so.

01:47 Yeah, so am I. I ran across OpenBB not too long ago, talked about on my other podcast, Python Bytes, I do with Brian Hawken. We cover interesting projects and news and whatnot.

01:58 Dang. This thing is loaded with the Python Data Science stack. And on top of that, it's a newly successful open source project in the sort of business VC space as well. So congratulations on building a project and on that, and I think people are going to be pretty fascinated to hear the story behind it.

02:20 Thank you so much.

02:21 Yes, you bet. Before we get to the story of OpenBB, let's get to the story of James. How did you get a program in Python?

02:27 I've only been in Python for a couple of years. My background I'm along with Open BB, I'm a PhD student at University of Maryland Physics. Got into Python when I was getting bored of MATLAB.

02:39 Awesome.

02:39 Started taking an interest in some machine learning data science. Python seemed to be the way to go. It was super straightforward. A lot of similarities with MATLAB, especially NumPy, pipeline. So it was straightforward, never looked back.

02:53 That's awesome.

02:54 Yeah.

02:54 The Jupyter side of Python is quite similar to MATLAB, but it's a slightly cleaner language. Starts with zero, not one on the indexes.

03:03 It does. And Matlab, their attempt at Jupyter is not exactly where Jupiter is yet.

03:09 So having that notebook because they had a head start, right. Matlab predates Jupyter by a long way.

03:15 Yeah.

03:15 Well, their live editor is only a couple of years old, or at least a couple of years old to me.

03:20 Yeah, sure. It probably is. My last experience with MATLAB was when I was in grad school as well, which has been a while, so it's a little bit back there. Awesome. Well, that sounds like really fun. I guess you started playing with Jupyter and the various data science tools for physics, right. Not for finance.

03:39 Correct.

03:41 It was NumPy and all that fun stuff for doing some physics scipy calculations. I did go right into the machine learning kaggle. Fantastic exercise, really. Actually my first dive into Python. I love doing these NFL challenges that they have every year. That was where I first fell in love with the language, if you will.

04:01 NFL's challenge sounds really interesting. I've seen some Kaggle challenges and done other similar type of challenges, but I'm not familiar with this one. Tell us about it.

04:08 Every year it seems like they actually have a couple. As far as I know, they usually do, like an analytics one where you got to present some kind of notebook and then a numeric one. Think of you're watching Sunday football AWS. Which actually if you got my Bills flagged in the background yeah, right. This particular one that I started on, you were looking at, you were given the information at a given point in time, and you were to estimate using whatever machine learning, not machine learning, how far that a runner would go. And so that was a great introduction for annoying regions and decision trees, all that fun stuff.

04:41 I think those kinds of challenges are really interesting because they don't require you to be developer or code enthusiasts. You can just be excited about football, and it could drag you into programming instead of the other way around.

04:55 Yeah, actually the way that I did it, and I don't think I didn't do too great on the challenge, no medals or anything, but I actually treated it as a physics problem, as all the players, as a gas particles and this fun stuff. So there really wasn't any machine learning there.

05:11 Interesting. Just sidebar, I got to say, the Chiefs Bills, I'm a Chiefs fan of Groom, Kansas City. Got to say, that's probably the best game of all last year. Out of all the games, that's the.

05:20 Best game of all time.

05:22 Maybe not a little painful if you're on the village side, but wow, what an insane game. All right, I don't want to make it a football show, but that was the highlight of the entire year, I think, actually.

05:32 Well lowlight on my side because for.

05:36 Those who don't know, basically the Chiefs came back and beat the Bills in the last minute and a half in some insane way, which is unfortunate, but it was really exciting. All right, final background question. What kind of physics did you study?

05:47 So I do atomic, molecular and optical, particularly cold atoms and optical latissons. Okay. Periodically driving this kind of stuff.

05:56 Cool.

05:56 That sounds awesome. All right, well, let's talk about the space of these things, this thing you've created here. So what you have created is something called OpenBB, which described as the most affordable, advanced, open customizable investment research platform. And to me, from the outside, not having a ton of experience, this looks like maybe a competitor to a Bloomberg terminal, which I hear is required. Basically, if you're a stock trader and investor that's doing sort of real time interaction with the market.

06:34 I do have to take a step back as well and say that I'm the founder of this program or this project didier. He's the one with the real insight. I was just lucky enough to join on early to build a lot of this with him. He spent his Christmas coding this and from there but to talk a little bit about it yes. I don't like to call us a Bloomberg competitor. Bloomberg has been in the game for quite a long time. They're very advanced. They have all the markets and whatnot sure.

07:01 People will say, well, do you have this one feature? Well, then we can't it's not like a competitor because it has that other yeah, sure. But from a really high level perspective, it kind of is in that realm. Right, right.

07:12 At a high level, yes. We're trying to achieve a lot of the same goals. Right. Investment research that's free, open source, and available to anyone we want to target. The people who can't drop 25 grand a year for the terminal.

07:25 Yeah.

07:25 You know what's interesting to me? What struck me about this is it's not just, here's an open source version, or here's a free version or a cheaper version that would be something of a stand in for that type of thing. But here is something that is from the ground up, embracing all of these data science tools and libraries from the Python space. So to me, this looks like a completely customizable, programmable extendable thing for people who have Python skills. And in that way, it's massively better than a lot of these commercial projects. Right?

08:00 Exactly.

08:01 It right. So Bloomberg is the big name in the space. You've got your icons or affinitys. There's a lot of great other tools. You got quite finney net terminals out there, but none of them provide the level of customization and open source that we do. As you said, it's super Python based. And the reason we chose Python is that up and coming, everyone in Data Science seems to be learning it.

08:24 Finance is very embedded in Excel, and there's some shift towards more Python learning in the space. So doing this in Python as you said, is super customizable. You can do it the way you can add on very easily, fork it, add on a feature, add on your own data sets, and pretty user friendly.

08:43 Yeah, absolutely.

08:44 Just to sort of back up what you're saying. Precovid. I was hired by an investment firm to actually spend time with their day traders. And it was weird because they're like, well, they can't be away from their desk when the market is open. So this class has to start at 4:30 or 05:00 P.m. And then go for a little afterwards. It was an interesting set up, but it was just that it was a bunch of traders who were using Excel to try to figure out how well they were doing. And then a couple of people on the team are like, we have to learn Python. We have to get better tools.

09:15 So I went and helped them learn Python so that they could stop using Excel and start using Python. It's absolutely where a lot of this momentum is going.

09:23 Yeah.

09:23 I think that they complement each other very well. Pandas. I don't think anyone can say enough about how great Pandas is. You can enter in all of your whatever your trades are, whatever your research is, and it's right into Jupyter notebook in one line.

09:36 Yeah, absolutely. Not to say stop using it, but there's a ton of stuff happening in the financial space around Python. And I do believe that Pandas actually came out of investment out of Wall Street. I'm not 100% sure, but I think that's the history. So let's start with open source. So we could go to the website. Your website is OpenBB. Co band of the Co. Who needs that? M. But we can go over to get up here and there it is. We can fork it, do whatever we want. Let's see what is your license is MIT, which is like go crazy sort of thing, right?

10:12 Yeah, we're permissive feel free to do whatever you want with it.

10:15 Yeah, it's really nice. Even commercial uses the MIT license has. But what stood out most to me when I thought, oh, this is really interesting, and then I looked at this, I'm like, Oh, this actually has a lot of momentum. Here is you've got 12,000 stars and 1.3 thousand forks. That's a lot for any project. We're on par with some of the big web frameworks not long ago and stuff like that. You almost be really happy with the uptake that it's getting.

10:40 Yeah, the community response has been overwhelming. When I joined on it was a couple thousand stars, DD and I know we fired up Discord. We were hitting reddit with post weekly monthly and, you know, took very well. People were very excited. We're super cool for the community that's gotten us to where we are.

10:59 I guess. One thing I maybe would like to see, possibly, I think what would be really fun is maybe you could just talk us through what the experience of using this is, because it's an unusual UI, and I don't mean that it's weird, but it's not a web page, it's not a jupyter notebook.

11:18 Imagine pretty much exactly opening up iterm or terminal.

11:22 Yeah, it's a terminal. It's a command line interface in very.

11:26 Much the sense that it's as a terminal. It means it runs as to a text based user interface type thing. But then as you do reports and interact with it through a CLI style or almost of IPython style experience, it pops up windows of really beautiful interactive graphs, the various things you're asking for. Could you give people a sense of what it's like to use? What's the user experience there?

11:52 Yeah.

11:52 So the Terminal is a command line interface tool, right? So you open it, you launch it Python Terminal PY, and you're presented with a list of choices. So we call these contexts that's either going to be your stocks or your crypto ETFs.

12:11 We provide a lot of data and in order to access these, you type in it's one of these old video games where you have to type in what you want, right? So if you want to go into stocks, you type in stocks and then you're presented with a new menu. So you hit it exactly how it is that it's completely textual.

12:28 All of our commands have additional options, flags as well. Our documentation for some of these functions is listed on our GitHub page. We're trying to really enhance the user experience in terms of guides and documentation, since we do know that this is a very unusual user experience. As you said, it's not a website, there's nothing to click. It's all textual based, which we understand.

12:52 Not everyone using this product is going to be familiar with the commandline interface. And we actually like to call it hackerman because you feel like you're doing your financial research. You feel kind of accurate.

13:04 Absolutely. You're typing away. Stuff is streaming by. It's so funny to have normal people who are not coders watch people doing stuff with terminals, especially if there's colors. They think something nefarious is going on or something crazy is going on, because that's how it's always represented for hackers. I remember somebody asked me at a coffee shop, I was like, five terminal windows, all running scripts with stop scrolling. Are you trying to hack the coffee shop? Like, no, I'm just working. Don't interrupt me, please.

13:32 I'm not hacking anyone. Leave me alone. Yeah, it kind of has that feel, right? But it also something that I think that speaks to is like the seriousness. And this is for people who are trying to do real work. It doesn't come up and just go, here's some buttons you can click and it's flashy. It's like, you got to get in there, focus on the various aspects, whether you're doing stocks or whatever it is, and learn the commands, but then you should be able to fly through it, right?

13:55 Yes.

13:56 And one of the things that we spend a little bit of time on earlier this year was making it so that you can actually change commands if you know what your workflow is. You can either run it through a script so you can basically go into the terminal, set up what we call an open BB file every morning. What you do, you go, you do stocks, you look at, I don't know, the top gainers, and then you look at what Apple's volume was yesterday. You can put this all in a script, run it, go fire up your coffee, come back and you've got all your graphs, you've got all of your tables and really simplifying the workflow. And then when you're done with that, if you've forgotten something in one line, you know what it is. You can type in, you do a backslash, stock loading your ticker and whatever you want. So as you said, once you know the terminal, it's really easy to hop around.

14:45 Yeah, that's awesome. Now, before we talk about some of the features and some of the things you can do, because I think I'll point people to the right part on your website, but once you see what you've got here, it's like this has a bunch of great visualizations and so on. But let's just talk about some of the Python libraries that are available. It sounds like a lot of the big hitters from the data science and machine learning space are there.

15:09 Very much so. Right.

15:11 The number one library we pretty much use is going to be a request.

15:15 We're hitting APIs, turning those into data frames, reading Htmls.

15:22 All right, before we move on from request, because a request is a very cool library, but it also opens up the question of where does request go? It looks like there's tons of real time data here. And I know that financial data, especially in the real time variation, can be tricky to get a hold of, or maybe not tricky, but requires money.

15:43 This is a very good that's some variant of tricky, isn't it?

15:47 And actually you do raise a very good point. Right. So in the terminal we do provide different endpoints for different sources. So for example, if you want to load in stocks, you can either go from Yahoo finance, you can go from an Alpha Vantage, or you can go for Polygon or IEX cloud. All of these require your own API key. So in order to part of kind of the onboarding into the terminal is to explore all the data sources we have available. They'll get your API keys and we try to keep it free. But we are starting to incorporate some more kind of paid endpoints that can be paid.

16:24 Right. So if somebody already has a subscription to some data source, why not let them integrate that right?

16:30 Exactly. That's exactly it. Okay, so we're not distributing any of the data, we're just basically providing the tools for you to access it.

16:37 Got it.

16:38 Yeah.

16:38 That sounds really neat. Is there some web scraping, some Beautiful Soup, or is it all APIs?

16:45 There is. So we try to keep it to.

16:48 APIs because they're more stable.

16:50 Yeah, you never know what tags are going to change. But yeah, Beautiful Soup is in there, right? Beautiful Soup is a great library. There is web scraping.

16:59 Yes. I figured sometimes that's just how it works, right? Sometimes people don't have APIs, but they've got websites.

17:05 They do.

17:05 It's kind of a cumbersome API if you go to it.

17:08 I've also become a fan of Pandas. Just Pandas will do all that for dude scraping for you with the read HTML if you just type in a link.

17:16 I was blown away. Chris Moffatt did a course for Talk Python on replacing Excel with Pandas and stuff and some of the things you can do to get data off the internet with Pandas, I'm like, Why don't I just do this? This is so much better. You can point it at a web page that might have a whole bunch of text and images. And somewhere in there is a table. It could be multiple tables. You say, Go to the third table and get me that as a data frame and bam.

17:41 Evil and Beautiful Soup. There's a lot of steps to get to a parsed data frame with header values column.

17:49 Yes, Pandas is fantastic. And that's a lot of requests, a lot of Pandas. A lot of.

17:56 This portion of Talk Python, I mean, is brought to you by Sentry. How would you like to remove a little stress from your life? Do you worry that users may be encountering errors, slowdowns or crashes with your app right now? Would you even know it until they sent you that support email?

18:12 How much better would it be to.

18:13 Have the error or performance details immediately sent to you, including the call stack and values of local variables and the active user recorded in the report? With Sentry, this is not only possible, it's simple. In fact, we use Sentry on all the Talk Python web properties. We've actually fixed a bug triggered by a user and had the upgrade ready to roll out as we got the support email. That was a great email to write back.

18:37 Hey, we already saw your error and.

18:39 Have already rolled out the fix. Imagine their surprise, surprise and delight your users. Create your Sentry account at Talk Python.FM/Sentry.

18:49 And if you sign up with the.

18:50 Code Talkpython all one word, it's good for two free months of Sentry's business plan, which will give you up to 20 times as many monthly events as well as other features, create better software, delight your users, and support the podcast. Visit Talk Python FM Sentry and use the coupon code Talkpython.

19:12 So I sort of Derailed Your conversation, but one of the things that first came to mind is like, Okay, this is open source. Where Is It getting all This interesting data from? So thanks for Some Of The story there. What else? What other Major libraries Are At Play?

19:25 All Of Our plotting Right now is Through Pie plot.

19:27 When people See those, when you're In the terminal and you ask for some kind of visualization that pops up with that Interactive Window, those Are Pipelines.

19:34 Yes, this Is All Pie plots. All the styling Is done In House. We Have A Fantastic Designer. Fantastic. And Did A Great Job of Doing Some Style sheets.

19:42 Yes, it Really Does Look Quite Strikingly.

19:44 Nice.

19:44 Awesome.

19:45 And All Of These Are, as we like to say It's customizable. All These style sheets are Available to The End User. They're Packaged Right Into The Terminal. You Can Go through. If you don't like our Blue, you can change that To Green.

19:56 Yes, you've got Machine Learning PyTorch, TensorFlow Sci-Kit learn.

20:00 PyTorch is a tricky subject for us because it's tough to bundle Into an installer. Currently, we Have some Kera's models built In. You do Have To Install That right, because TensorFlow Is A Pretty Big library. We are Working On Incorporating the open Source Darts Library, which Is PyTorch based, and that Will also Allow for Flares, like an example of An NLP model that's Deep Learning Based. Talking about machine Learning, we do Also Have NLP Models use Vader Sentiment.

20:29 Oh, Interesting. Because if you could Say, what is The Sentiment On Twitter, or what is It on The New sites, maybe that's going to affect yes, so that's actually.

20:39 Something We Had Done. You can actually try to do some correlation with Vader Sentiment on news Headlines from One Of Our Data providers. And We'll Actually Throw that on The Same Chart as The Stock Price.

20:50 Yeah. Okay.

20:51 Super Cool. All right, now, Before I Was going To Ask You about how to sort of Add Your Own Extras To It, but Let's actually Go and Just Talk About some More Of The visualizations and some Of The Pictures and Graphs that you guys types Of Questions you Can Answer, basically.

21:04 Yeah, of course.

21:05 Yeah.

21:05 So you Can Get It through Windows or macOS Installer. Correct. Are You Doing something like Using Py2app or Py2exe or Py Installer or Something Like That to Try To Bundle All up? Or is It Just sort of a Scripted make Sure you Have Python.

21:21 We Bundle With Py Installer.

21:23 Py Installer.

21:23 Yes.

21:24 So we Use Py Installer. By We, I mean Our Engineering Team. That's A Little Above My ability There.

21:31 We are In The Process of Getting This Signed through Apple, and I Believe Windows Came Through Today. So at The End Of The week.

21:38 You Don't Get The Yellow. Do You Want To Let This Happen? You Get just The Regular do You Want to let this happen.

21:43 Yes.

21:44 UAC dialog in Windows and you'll get something similar.

21:46 Yes.

21:47 And the reason we have this installer is we understand the end user is not necessarily going to be someone that wants to go through and change all the Python.

21:55 Sure. Well, it's awesome that it is Python and the people could do it, but it's certainly not intended just for Python people.

22:00 Right.

22:01 It's intended for investors who may or may not be.

22:03 And we have Python investors, I don't want to give them accurate, but we've got almost 200 dependencies. So on everyone's machine acts differently. You do a good pull and then you run poetry install. Maybe it acts differently on everyone's machine. So we wanted to provide this option for folks to be able to just click a button and have it right there.

22:23 Well, I think it's great.

22:25 That is ideally how software should be delivered, right. You shouldn't have to build it and download all the pieces. Just go, here's the thing, I click, I put it there and now it runs. But it's often not how it is distributed. I guess just calling out two other ways people get it, they can go to Anaconda and get it there. And you can also do a docker type of thing, right, if you want. But yeah, cool.

22:46 For developers, if you want to do a git pull with your kind of environment, fork it, feel free to change it. We're always open to any pull request.

22:55 Awesome. All right, so let's maybe talk through some of the things that I can do and then we'll talk about some of the internals. Of course, you mentioned that there's this whole stock section, and I just totally encourage people to come over to openbb.Co/Products/Terminal. And then you sort of scroll through here and you get a bunch of cool visualizations. You'll see why I was impressed, I think. So here you come up and say, I want the CUSUM, I guess, the cumulative sum as a sequential analysis technique that shows any sort of cumulative function applied to something like a stock price over time or whatever.

23:28 So this is just an example. So if you go into stocks and just for everyone listening, we're going through the website right now, and the first thing you'll see on our stocks, on our product, on our Terminal Products page under stocks is to sum and, for example, you would load in whatever your ticker is, and this would be found under Quantitative Analysis. So stocks loading Apple, and then you type in QA, and then you'd have all these options. cusum is one of them. And this is a time series, like I said, there's a time series technique of detecting anomalies, if you will.

24:01 Yeah, you got little call outs of those events and so on. You've got 3D graphs of Volatility Surfaces for in this case, for Apple.

24:09 Yes, Volatility Surface.

24:13 Everyone loves their volatility smiles and so you can show the implied volatility as a function of time to expiration and strike price right there.

24:24 And I guess because these are you say plotly. I'm sorry, I forgot to Py plot is what you said we use.

24:30 Okay.

24:31 Plotly. I think. So I've kind of early on I did some plots in Plotly and there may be some way around that. The interactivity of plotle is very nice.

24:41 Right. So what I was going to say is when these pop up with the Py plot stuff, you can basically explore the graphs just because it's like the nature of those tools.

24:50 Right? Yeah.

24:50 Pipeline has been what is it? PLT ion that will allow you to use the interactive. So you'll pop up, you'll be able to zoom or pan with the usual buttons in the window.

25:02 Okay.

25:03 You mentioned the sentiment. So there's Sentiment News instantly correlating article headline sentiment through NLP models.

25:11 Yes.

25:11 Historical price.

25:15 Yeah. This example supplies a Vader sentiment which is basically just a rules mapping to the certain words to give you a sentiment score. And you can see the stock price on the same chart as from the headlines from a given source.

25:28 Super cool. All right. Yeah. So all these nice different visualizations and so on here maybe talk us through to get these quotes generated by the Python libraries. What is my experience as somebody sitting at the terminal CLI? Like how do I pull up, say, the sentiment news thing or the cusum so on?

25:48 As I mentioned, once you launch the terminal, you either use the installer two clicks and it's up, or you have your own Python and you're provided with some options. The first thing you want to do, let's say, for example, we're doing this cusum that's up right here. You would typically into the command line interface. You would type in Stocks.

26:08 Okay. Yeah.

26:08 And it kind of puts it into the stocks mode where different subcommands apply or something, right?

26:12 Yes.

26:12 And then once you have there, you'll have a bunch of different menus. You can look at fundamental analysis, you can look at technical metalysis, you can do due diligence. We've got a bunch of menus on there. So you would load in your relevant ticker. So you'd either do load Apple or we do have some if you have the feature flag enabled, if you just type in Apple APL, it'll load in. So once you have that ticker loaded in, it does a Pandas data frame in memory. So from there we can pass it to the different functions. And for this particular one to do the quantitative analysis, I would then type in QA. So when you're on the stocks menu, you can type H for help or you can do a question mark and it will parse that and you'd see QA quantitative analysis with a couple of examples of what you can do there. And then once you go into that menu, it would pop up with different functions, and you would type in the function you want. If there's arguments, maybe there's Windows or exporting data. You would just type in Help, and you'll get a H. Sorry. And you'll get a pop up of the usage and the optional arguments, and you would type in Q Some with whatever your arguments are, and you would get this plot.

27:21 All right, that's very cool to hear how that sort of flows through there. All right, what else? Got a bunch of stuff on crypto. Like you've got bitcoin rainbow charts, which I've never seen.

27:31 Yeah, it's fun.

27:32 Interesting.

27:34 Yeah.

27:34 Just a bunch of open interests by exchange exchanges, how much traffic there is, things like that is pretty awesome. The ETFs, let's see. Some of these are coming up as just almost like some of them even come up almost like a report. You got an Excel report, and you've got yes.

27:52 TrainStation looking like, here's the incoming information. Right?

27:56 Yeah.

27:56 And actually, for example, this ETF Excel report is a third party or third. So one of our contributors has their own database, the author of the finance database, and he has this workbook. It loads in an ETF, and it basically does what you see on the screen there, and it pops this up in an Excel workbook. We do have another feature that's DCF, someone who is working on their MBA at the time said, hey, you guys provide the data I need to do a DCF analysis. And so we quoted it up, and now we have a DCF analysis tool that uses some linear regression in the terminal, and it all saves to an Excel file.

28:35 That's cool. And the fact that it goes out to Excel, that means you can hand it off to somebody who just lives in Excel and they can still use that, right, exactly.

28:42 So we don't want to completely replace Excel because we know it's very widely used.

28:46 Yeah.

28:47 But hooking to all these different data sources, real time data sources, and pulling it together like, that's not Excel's forte. Yeah, that's why I should be doing it for everything.

28:57 Yeah.

28:57 Okay, so you've got sort of technical analysis stuff. You can compare different stocks and even check out the news. Over for the ETF.

29:07 Interesting, we do have over. Well, I don't want to say over. We're sitting around 700 different functionalities, so we do understand it can be slightly intimidating at first.

29:17 Yeah, that was my feeling as well. When I first saw this, I was like, wow, it's pretty intense. There's, like, a lot going on. You have to kind of be an expert, which is what I was talking about at the beginning. Like, you get into the terminal and you've got to really become an expert, but then you get this really great quick power to do it. But I would also imagine, like, you're probably not doing stocks, crypto, ETF, economic analysis, all the time, you're probably focused on one of these areas.

29:41 Right.

29:41 And if you narrow it down, it probably gets more doable right. As you go.

29:47 Maybe one of the things for example, we have this econometrics menu, which one of our target audiences is kind of the academics. And in your econometrics course right. It's basically a linear regression of certain things. So maybe you want to look at the effect of a company's balance sheet and relate that to inflation. Inflation, right. And you can actually go in into the econometrics menu, load in both of these, and do your preferred regression techniques and get some insights.

30:19 Oh, that's cool. Thinking about education, that's a big opportunity for you. All right.

30:24 It is.

30:25 Students are going to be buying Bloomberg terminals and other commercial things, most likely. Right. Not the high end ones, anyway.

30:32 Yeah.

30:32 So here's a really simple way that you could actually, if you're a teacher, teaching economics or finance or investing, here's something you could bring into your class as a resource and really analyze it right. When your projects could be, okay, pick a stock. These are the questions we have back it up with the other day that you can find to these other areas.

30:51 Exactly.

30:52 Right, exactly.

30:52 That's one thing we love. You know, some of the people we talk with, their experiences for their courses, they have assignments that they need to do. Use the one bluebird terminal that they have among 30 students. So they're queued up for an hour or two just to get basically the same data, if you will. And that's one of the things we'd like to address, is everyone can have this on their machine and get the data they need and do the analysis they want to do.

31:20 This portion of Talk Python to me is brought to you by the Python at Scale Summit. The Python at Scale Summit is a conference to highlight innovative big data solutions for Python developers and enterprises. You'll learn about trends in the Python big data ecosystem, share stories about implementing solutions, find out about new innovations, and connect with other data scientists using Python. The Python at Scale Summit will be a hybrid conference with talks, workshops, and training. Of course, there will be networking and social events to connect with other Python professionals, too.

31:53 Come here.

31:54 Speakers like Matt Rockland from Coil, Brian Granger from AWS, and many others from amazing organizations such as NASA, Capital One, and BCG. Get back together with your peers and learn how they're scaling their computation and data analysis using Python and the Data Science Stack. Register at Talk Python FM/PythonatScale when you visit the link, be sure to use the code TALKPYTHON All Caps to get 15% off your tickets. That's code Talk Python at Talk Python Fm/pythonatscale. The links in your podcast Players show notes. Thanks to the Summit for supporting the podcast.

32:34 I don't think it would be a very detailed thing. But it would be also interesting that the professor or the instructor could say, look here in the source code, these four lines of code.

32:45 This is where it's doing that theory we talked about last week. Like, here's how it's applying this model. And I don't expect you to totally understand the code, but like, you could see this is how software does it. You know, you could have a little bit more insight, whereas a lot of the commercial things through website for sure, but even if they're just compiled closed source, you won't be able to do that.

33:04 We had a contributor reach out to us, part of the from Greece, part of their software business course was to submit a full request somewhere. So he reached out to us, he did a nice little report. He did a pull request, added a feature to the terminal. So using the theory in class there another professor reached out to us. He had his students write kind of an intro guide for us that we're kind of working with and we're going to make available.

33:30 Okay, awesome. Yeah, the intro guide for openbb for his students or something like that.

33:35 Nice. All right, let me just sort of skim through here.

33:38 There's a lot of features, so I'm not so sure I want to touch on all of them, but every single one of them you come to almost like some of them are just sort of tables, but so many of them like this portfolio optimization.

33:51 It's beautiful.

33:52 It looks really good, and the pipe.

33:54 Plot is really good. The rainbow charts, always a fun one. It's really pretty.

33:58 I like it a lot. These are great.

34:00 To me, it feels like something if I were working, doing this kind of stuff, it would be pleasing to sit down and look at these graphs in this analysis rather than, oh, there's just some software you look at, like it does the job, but it doesn't make you feel good using it while it's doing the job. Battleship gray or I don't know.

34:18 And also, as I mentioned too, you can customize the colors even if you want to change the terminal colors. When you launch our terminal, you'll see some blues and reds. If you want it to be orange and green, you can go in and change it. It's fully customizable.

34:33 Cool.

34:34 So there's a Jupyter section as well.

34:36 There is, yeah.

34:37 Tell us about the Jupyter section. I think that's a super big tie in for Python people.

34:41 There are two ways you can really make the most out of Jupyter. The first way is we've started kind of building an API wrapper for a lot of our functions. So one thing we haven't gone into is a little bit the architecture. We use like an MVC model view controller where all these plots are generated in the view, and we can wrap that into an API and you can import that. So in jupyter if your workflow is X, Y and Z in the terminal, you can from openbb terminal import the API as whatever, as Openbb, open BB, view, stock, Apple, whatever, however that works. And you can create your workflows there.

35:19 I see. You get a plot back and you just plot show or just like get empty one line and it goes on there.

35:25 Yeah, I mean, you do an inline you can also adjust it.

35:28 Right?

35:29 So we'll wrap API, wraps our load function. So you can load in your stock and maybe you want to resample it or maybe you want to make your own machine learning model or whatever you want to do. You can do that with the API. Another interesting thing is that we use paper mill to automatically run some reports. So the example in the terminal, there's a default example called notebook and if you go into the terminal so once it launches, you go to the reports menu just by typing reports. You type in Equity, Apple or whatever your ticker is, it will run through paper mill, which automatically fills in your ticker what not generates a predefined PDF. Basically with its fully customizable, we have some fun widgets that you can play around with and you can add KPIs. Hey, I don't know if the RSI is high or if insider trading is low. I think those are some examples. So you can create your own custom notebooks, kind of automate your research workflow.

36:31 That's super interesting. I haven't spoken about papermail for a while in here, but it's a really interesting project, I think from the Netflix team, right?

36:39 I have no idea.

36:40 I think so maybe tell people just a bit about what the whole purpose of Paper Mill is. What it is.

36:45 What we use papermill for is to basically just automatically execute a notebook template. You kind of have to go a little bit into the metadata of the jupyter notebook and there's a cell that has like parameters and by the terminal we can parse what the argument is.

37:02 For example, the ticker, right. Basically all the same commands will be run just replacing the ticker with whatever is executed. So average is just a really nice, very great tool wrapping.

37:13 Jupiter yeah, it turns notebooks almost into functions that you can call, but the output is the notebook in the form that has the results, the intermediate results and the pictures and everything. Not just the answer like a function would have.

37:26 Yeah, you get the whole notebook and you can customize the PDF HTML, you can send it to your buddies.

37:31 You touched on the architecture a bit. Maybe we could dive into that just a little bit more. What are some of the notable things about how this is built, as I.

37:38 Kind of into that actually specifically said our code is we use an MVC structure, so modelview controller. So how this goes, for example, every sub menu will have a controller and we have abstracted that so that there's a base controller and a base docs controller that inherit all the same methods, save ourselves a little bit of redundancy.

38:01 So this controller is like parsing and processing the commands you send in the terminal CLI.

38:06 Something I failed to fail to mention was that we use Arc Parse. Yeah, so the controller wraps in, it basically takes it creates an Arc parse object, adds the arguments and then does the parsing make sure that if I try to load a stock ticker, that's or not an actual ticker, if I try to enter a number, it'll say, hey, you need to be a ticker, or does some of the logic our model functions get the data transfer, edit the data, modify and manipulate it in certain ways and then the views do either tables, graphs so for example, if you look at how we do our fundamental analysis, the workflow is the controller has income and the way we do it, the function is called call income. We just kind of add this call underscore to whatever you type into the terminal and that all. Income is a method of the controller so that you can add the arguments. And for example, the income statement has an argument that's Dash-L that tells you how many quarters you want to get. So the namespace so the namespace then has the information stored so we know, hey, we're trying to get income and we're trying to get five quarters. So that will call the view, which will then pass in the view will say, hey, Alpha vantage model, get me my five quarters of Apple income statements and that will return it as a data frame. And either I guess that function doesn't have a graph, but if it's a graphic function, it would be a graph.

39:40 Or graph pops up the window and the py plot window and then off it goes. That's really interesting. I've never really thought about how you might do the processing of CLI commands, but within an application, when I think Arg Pars, I think startup, like what commands are passed to my application during startup to figure it out. But of course, as you continue to issue commands, if that's text on the line, it makes sense to sort of treat it the same, right?

40:05 Yes.

40:05 And what we actually do on startup actually do have archbars. So you can for example, my favorite flag that we have for the terminal is debug. That way you can actually get a full instead of catching all the errors because if we're not catching all the errors in the terminal, it would crash every time you add an exception or whatnot. But with this debug flag, it will actually show you the full stack tracing instead of just the exception. So we actually do wrap around the startup and whatnot. And we also do like we have a reset command that if you're in the terminal, you type in reset. Maybe you changed an API key or you developing. You change your function, reload it. You hit reset, it will relaunch the terminal. It will exit, then relaunch. So that's the general workflow.

40:50 Yes.

40:51 Does the terminal run in whatever terminal of your OS? Like, if I have iterm set up on my Mac to run there, if I have Windows Terminal and PowerShell, it will run over there.

41:00 Yeah.

41:00 Just to make sure you're in the right directory.

41:02 Okay, fantastic. Super interesting.

41:05 And also, I can even add statement that doing this MVC allows us to have different views. I know one thing you'll probably ask me about is that we have these bots on our website.

41:16 Yes.

41:16 I did notice over here that you have a product, you got a terminal and then documentation, and then you have bots.

41:22 Yeah.

41:22 Coming soon.

41:22 Bots.

41:23 I do remember now what I would ask you, but let's talk bots for a second, and then we'll come back to it.

41:27 So, bots I don't want to give away. We do have some exciting announcement coming soon, and I would like to take this opportunity to apologize to anyone that's trying to get the Discord bot in our server, as we're currently limited to the maximum 100 servers we can be in without the verification that we're working on.

41:44 Got it. So under the listing here, you have bots coming for Discord, Telegram, Slack and more. And I guess news is coming, huh?

41:52 Yeah. And all of this one of the kind of using MVC. We're able to abstract all of our methods, and then we do all the processing on the same model function, and then we can pass it to different views for Discord or Telegram or Slack.

42:08 I'm sure comment as much as you can, but you can build a Slack bot in Flask, for example, or something like that, right. Where it kind of uses a web communication to talk to your bot. And so I guess you could do things like go into Slack and say, hey, open BB bot. Tell me about important events in stock. Or, I've been watching this thing. If it crosses the threshold, just yell at me about it.

42:30 Right.

42:30 Let me know. Something like that. Is that kind of the flow?

42:33 Pretty much does some Async stuff. It's running on a server somewhere, and it waits to read in the command.

42:39 Cool.

42:41 The question I wanted to ask you is what I've seen so far looks like really cool ways to all of its static. So you can only read so much into it, but it looks like let me answer a question about this information, either historical or sort of up to now about some stock or the economy or whatever. Is there a way to have a dashboard where I can put different things up and they're just constantly turning with real data?

43:04 That is possible, yes.

43:06 Not the main use case, but possible.

43:07 I mean, it is possible, and I'll leave it at that, that it is possible.

43:11 Okay. All right. Sounds good. That was the one I was asking about.

43:15 Yeah.

43:15 All right. Now, one thing I want to touch on here before we get too far away with time is two things stood out to me when I went and sort of clicked around your site. This is pretty interesting. I can't remember some news article that talked about openbb that I thought was pretty interesting. I come over. Okay, well, this is really pretty cool. It's open source and so on. The other one is right across the top. It says, announcing our $8.5 million seed funding and public launch. That sounds like a nontrivial deal. That's awesome. Congratulations.

43:48 Yeah, thank you so much.

43:50 That's a pretty big deal for us.

43:53 Yeah. Actually, fun fact about this was that so Jenny and I were just doing this for fun on the side, and then my wife and I, we got married in 20 about a year ago, actually. A year ago in eleven days.

44:08 Cool.

44:08 So we're on our honeymoon in Napa Valley on the land of the VC, and on our last night there fun day of wine touring and whatnot, I get a LinkedIn message from someone saying, hey, we're interested in investing in you. And needless to say, that turned into meeting up with them on Quick 20 Minutes Chat, the day of driving through San Francisco before actually trying to get out to Alcatraz because we have that scheduled.

44:37 Wow, what funny timing. On one hand, it's like terrible timing. On other, it's perfect.

44:41 You're right there.

44:42 Yeah.

44:42 I mean, I was like, Hey, I'm in Napa, and I'll give a shout out to JJ over at OSS Capital. He's been fantastic working with us. JJ was like, I will meet you wherever you are right now. And I'm like, Man, I am not in any state to be talking to anyone right now.

45:00 It was a great opportunity to reach out with him. They led around.

45:04 We have a great group of angels on board as well, I guess.

45:07 There's a couple of other calls I want to make real quick. One, Travis Olivant is an advisor to you all, which is pretty awesome. People surely know him as one of the founders of Anaconda.

45:18 Yeah, Travis is on board as an adviser for us. It's been fantastic working with him, getting to know him a little bit.

45:22 That's super cool. Then also, Naval Rivakant, one of the investors, and I know him from this water storm thing turning a discussion called how to Get Rich. Have you listened to this arch? Yeah, it's pretty interesting. Pretty fascinating. So he's involved as well, which is pretty cool.

45:39 Awesome.

45:39 I think that's really neat. Like I said, congratulations to you guys. You got to keep working on this. But open source projects often struggle to get support, even when it blows my mind that they do see projects like requests or flask or something like that. And so much of the world, and the tech world in particular, where there's tons of extra money and there's not very much support. Right.

46:04 As far as I know, David Lord isn't just mostly on his yacht and periodically accepting PRS, but if you think of how foundational some of these projects are for so many companies, it seems almost like David should be on a yacht, you know what I mean? Like it should be easier for them to get really strong support. And here's an example of a company getting really good support giving away to some degree. Can you talk about what the business model is? Or is it just growth and attention and features? For now?

46:34 Primarily, we want to focus on growth and really hammering on the user experience.

46:38 One of the things you talked about is maybe when someone fires this up, they're not used to seeing a textual type thing where I need to type in all the commands there. Everyone's just used to buttons, fancy web apps. So right now, we really want to hammer home the user experience, make it as fluid as possible. We're working on documentation. We're working on guidance.

46:59 Yeah. It seems like something that would lend itself really well to a bunch of small videos on, like, you could just say, Help. This goes. Would you like to watch a video on how to do this? Two minutes? Yes. All right. I'll watch the video. Just, like, pop that up or something.

47:12 Yeah, that's it. And a series of those. Yes, because, for example, fundamental analysis or technical analysis are buried three or four menus down. And if you're downloading the tool to do that, maybe you're going to be intimidated at first because you don't know where it is.

47:25 Right.

47:25 So we really want to try I.

47:26 Couldn't find it or whatever.

47:28 Yeah. So right now we want to focus on the community, and we want to focus on the user experience.

47:32 Cool. All right. Well, you've definitely got a little runway there, so it's great how many people.

47:37 Are working on it now, our team, first off, shout out to everyone bothering me on Slack during this.

47:46 I'm ignoring you because I'm talking about you.

47:48 Okay. Pretty much. So shout out.

47:51 We're at 15 right now.

47:52 Awesome.

47:53 I'll take this opportunity to mention that we do have some open job postings on our website as well, at the moment.

47:59 Oh, really?

48:00 Okay.

48:00 Just throwing that out there on our website.

48:05 Yeah.

48:06 So I'm guessing some of these are Python related ones.

48:11 Currently, we're looking for DevOps, and we're also looking for some social media managers at the time.

48:18 Cool.

48:18 Remote option 100%. Yeah, 100% remote, flexible hours.

48:23 Very cool.

48:24 Yes.

48:24 I know a lot of people are interested in finding new jobs. On one hand, if you're a software developer, you can kind of find jobs pretty easily. These days because there's such a demand. But on the other, it's like, well, you can have this job, but all right, you got to move to the city that you don't already live in or you don't want to move to or you want to change countries or whatever. So I think Remote is pretty awesome.

48:45 We're spread out all over the globe, so it's a good time.

48:48 Yeah, absolutely. That's the way it should be.

48:51 Okay, well, I think that's about all I had to ask about all the things I wanted to make sure we covered. But it's something really cool. You all built with Python and the data science stack and open source growth is cool and the funding is looks so positive, so awesome. I guess it sounds like you accept PR. People want to contribute.

49:10 Yeah, absolutely.

49:11 One of those projects that is very easy. Not easy, but be open to contributions because it has so many sort of standalone little features. Like, I want to add this new algorithm or this new picture to this part of it. Right. You don't have to understand the whole system massively in order to do that.

49:26 Right. Yeah.

49:26 This was actually the first open source project that I myself worked on. I picked a good one to start on. No, PR is too small. No issue. We are on Discord. I know a lot of people aren't huge fans of putting the support there saying, hey, come on, Discord. But we're there. If anyone has questions on how to install, how to submit a PR, any ideas? We're around to talk.

49:49 Awesome. All right, James, before you get out of here though, I've got to ask you the final two questions.

49:53 Sure.

49:53 All right. So if you're going to work on this, write some Python code. What editor do you open up these days?

50:01 I'm going to get a lot of bad feedback from my team on this one, but I am a PyCharm person. It scares me. And the fact that I can open up a Gui window makes my life a lot easier. Everyone else uses Vs code, so there's always a constant debate.

50:17 Well, you won't get any negative feedback from me. I think PyCharm is awesome. I use it as well. And all the PR features and get features built into it are pretty excellent.

50:27 Yeah.

50:27 Vs code is also great. It's love to those guys as well.

50:30 Yeah.

50:31 I think when I started asking this question, like seven years ago, whatever it was, it was like, I don't know what this person I really don't know what this person is going to say. It could be anything. It could be some random thing I haven't even heard of. Like, that's an editor. Okay, let me research that. These days, it's really down to two contenders, pretty much. Unless you get the Vim emacs angle, which is not as popular, but it's down to those two. Pretty much.

50:55 No pen.

50:56 Yeah. You got to read something. All right. And then a notable PyPI package something I want to give a shout out to.

51:01 Oh, man, we have so many. As I said, 200 ish one of the ones that's been really great. Another open source project, the Rich package. That's what we use to add all the colorful text interfaces as well as the Prompt toolkit. Another great open source package. That's what does our auto completes and whatnot to try to make a little bit easier on the user experience.

51:23 That's fantastic.

51:24 Okay, there's two.

51:25 I like prompt toolkit as well. And of course, Rich.

51:28 Speaking of right. Speaking of open source projects, that is not the right one. It's really cool that Will McGugan has got textualize that iOS for has really found a place building great two ease text user interfaces with Rich, and there's just so many things based on it. And he also has some funding as well to keep going there, which is, I think, another one of the bright, awesome pieces of news around sort of vibrant open source and Python.

52:02 The Rich Package is fantastic.

52:04 Yeah, it's all we use now.

52:07 That's awesome. It's like, got some crazy new feature every week, pretty much. It's never sitting still. All right, well, James, it's been great to have you on the show. Thank you so much for coming on and sharing a look with your project.

52:20 Thank you so much for having me. It's really great.

52:23 You bet. See you later.

52:24 Go, Bye. This has been another.

52:29 Episode of Talk Python to me. Thank you to our sponsors. Be sure to check out what they're offering.

52:34 It really helps support the show.

52:36 Take some stress out of your life. Get notified immediately about errors and performance issues in your web or mobile applications with Sentry. Just visit and get started for free. And be sure to use the promo code Talkpython all one word. Sign up for the Python at Scale conference to connect with your data science colleagues and learn about trends in the Python big data ecosystem. Share stories about implementing solutions, and find out about innovations in our space. Visit Talkpython.FM/Python AtScale at talk python python at Scale and use code Talk Python to get 15% off your ticket. Want you level up your python. We have one of the largest catalogs of Python video courses over at Talk Python. Our content ranges from true beginners to deeply advanced topics like memory and Async. And best of all, there's not a subscription in site. Check it out for yourself at Be sure to subscribe to the show, open your favorite podcast app and search for Python. We should be right at the top. You can also find the itunesfeed at /itunes, the Google play feed at /Play, and the Direct rss feed at rss on

53:49 We're live streaming most of our recordings these days. If you want to be part of the show and have your comments featured on the air, be sure to subscribe to our YouTube channel at This is your host, Michael Kennedy.

54:02 Thanks so much for listening. I really appreciate it.

54:04 Now get out there and write some Python code.

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