You may have heard of the Bloomberg Terminal. It's expensive software that can monitor and
analyze real-time financial market data. But have you heard of OpenBB? It's similar software for
real-time and long-term 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 Maslach, here to give us a look inside this cool piece of Python-based
software. This is Talk Python to Me, episode 370, recorded June 9th, 2022.
Welcome to Talk Python to Me, a weekly podcast on Python. This is your host, Michael Kennedy.
Follow me on Twitter, where I'm @mkennedy, and keep up with the show and listen to past
episodes at talkpython.fm. And follow the show on Twitter via at Talk Python. We've started streaming
most of our episodes live on YouTube. Subscribe to our YouTube channel over at talkpython.fm slash
YouTube 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.
Transcripts for this and all of our episodes are brought to you by Assembly AI. Do you need a great
automatic speech-to-text API? Get human-level accuracy in just a few lines of code. Visit
talkpython.fm/assemblyai. James, welcome to Talk Python to Me.
Yeah, no, thank you so much for having us. I'm looking forward to the next hour or so.
Yeah, so am I. I ran across OpenBB not too long ago. I talked about it on my other podcast,
Python Bytes, I do with Brian Hawken. We cover interesting projects and news and whatnot.
Dang, this thing is loaded with the Python data science stack. And on top of that, it's a newly,
really 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. Yeah, thank you so much. Yeah. You bet. Before we get to the story of OpenBB,
let's get to the story of James. How'd you get into programming in Python?
I've only been in Python for a couple of years. My background, I'm, along with OpenBB,
I'm a PhD student at University of Maryland Physics. Got into Python when I was getting
bored of MATLAB. Awesome.
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, you know, NumPy,
Pyplot. So it was straightforward. Never looked back.
That's awesome. Yeah, the Jupyter side, data science side of Python is quite similar to MATLAB.
Although it's a slightly cleaner language, starts with zero, not one on the indexes.
It does. And MATLAB, their attempt at Jupyter is not exactly where Jupyter is yet.
Which is interesting because they had a head start, right?
They did.
MATLAB predates Jupyter by a long ways.
Yeah. Well, their live editor is only a couple of years old or at least a couple of years old to me.
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.
Correct. Correct. It was, you know, NumPy, 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.
So that was where I first fell in love with the language, if you will.
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.
Every year, it seems like they, actually, they 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, you know,
think of you're watching Sunday football, AWS, which actually, if you got my, got my bills flag in the
background.
Yeah.
Right.
This particular one that I started on, you know, 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 the runner would go. And so that was a great introduction, Voronoi regions and decision
trees, all that fun stuff.
I think those kinds of challenges are really interesting because they don't require you to be
developer or code enthusiast. You can just be excited about football.
And it could drag you into programming instead of the other way around.
Yeah. Actually the way that I did it and I don't think I did, I didn't do too great on the challenge,
you know, no metals or anything, but I actually treated it as a physics problem as a, all the
players as a gas particles and this fun, fun stuff. So there really wasn't any machine learning there.
Interesting. And just sidebar, I got to say the Chiefs bills, I'm a Chiefs fan, I grew up in Kansas City.
Got to say that was one, that's probably the best game of all last year out of all the games.
That's the best game of all time. I mean,
I mean, maybe not a little painful if you're on the bill 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.
Hey, well, low light on my side.
The low light. Yeah. Cause for those who don't know, basically the,
the Chiefs came back and beat the bills in the last like 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?
So I do a atomic molecular and optical, particularly cold atoms and optical lattices.
Okay. Periodically driving this kind of stuff.
Cool. That sounds awesome. All right. Well, let's talk about this,
the space of these things that you, this thing you've created here. So
what you've created is something called open BB, 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, is required. Basically, if you're a stock trader, an investor that's doing,
you know, sort of real time interaction with the market.
I do have to take a step back as well. I'd say that I'm the founder of this program or this project,
Didier, you know, 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 you know, from there,
but to, but to talk a little bit about it. Yeah. So the, I don't like to call us a Bloomberg
competitor, you know, Bloomberg has been in the game for quite a long time. They're very advanced.
They have all the markets and whatnot. Sure. People will say, well, you do have this one
feature. Well, then we can't, you know, like it's, 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, right, right. 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,
you know, the people who can't drop 25 grand a year for the terminal.
Yeah. You know, what's interesting to me, what, what struck me about this is it's not just, oh,
here's a, 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?
That's exactly it, right? So Bloomberg is the big name in this space. You know, you got your icons,
your infinitives. There's a lot of great other, other tools, you know, you got quite thin money.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, right? And the reason we chose Python is that's up and coming,
right? Everyone in data science seems to be learning it. Finance is, you know, finance is very embedded in
Excel and there's, 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 know, you can add on very easily,
fork it, add on a feature, add on your own datasets and pretty user-friendly.
Yeah, absolutely. You know, just to sort of back up what you're saying, pre-COVID,
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 5.00 PM and then go for a little afterwards. It was an interesting setup,
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 were like, we have to learn Python. We have
to get better tools. 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.
Yeah. I think that they complement each other very well. You know, Pandas, I don't think anyone can say
enough about how great Pandas is. You know, you can enter in all of your, whatever your trades are,
whatever your research is, and it's right in a Jupyter notebook in one line.
Yeah. Yeah, absolutely. Not to say stop using it, but there's, 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, 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 openb.co, fan of the .co. You don't need, 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, your license is MIT, which is like go crazy sort of thing, right?
Yeah. We're permissive. Feel free to do whatever you want with it.
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 and 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.
I mean, we're on par with some of the big web frameworks not long ago and stuff like that.
You all must be really happy with the uptake that it's getting.
Yeah. The community response has been overwhelming. When I joined on, it was a couple thousand stars.
Didier and I, you know, we've fired up discord and we were hitting Reddit, which posts weekly,
monthly and, you know, took very well. People were very excited. We're super thankful for the
community that's gotten us to where we are.
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 like, Oh, it's, it's weird, but it's just, it's not a webpage.
It's not a Jupyter notebook. It's imagine pretty much exactly opening up iterm or terminal.
Yeah. It's a terminal. It's a command line interface.
In like in very much the sense that it's as a terminal, it means it runs as two EA text
based user interface type thing. But then as you do reports and interact with it through a CLI style
or almost of a Python style experience, it pops up windows of really beautiful interactive graphs,
the various things you're asking for. Can you give people a sense of what it's like to use?
What's the user experience there?
Yeah. 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, right? So we
call these contexts. That's either going to be your stocks or your crypto ETFs. We provide,
you know, we, we provide a lot of data and in order to access these, you, you type in,
it's one of these old video games where you got 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, you hit
it exactly how it is that it's completely textual. You know, all of our commands have additional
options flags as well. Our documentation for some of these functions is listed on our GitHub page.
And 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 is going to be,
not everyone using this product is going to be familiar with the command line interface. And,
you know, our team, we actually like to call it Ackerman because, you know, you feel like you're in,
doing your financial research. You feel kind of Ackery.
Absolutely. You're just, you're, 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. Cause that's how
it's always represented for hackers. I remember somebody asked me at a coffee shop. I was,
had like five terminal windows, all running scripts with stuff scrolling. I'm like,
are you trying to hack the coffee shop? Like, no, I'm just working. Don't interrupt me, please.
I'm not hacking anyone. Leave me alone. Yeah. It's, it kind of has that feel. Right. But it also
something that I think that speaks to is like the seriousness and the real, like this is for people
who are trying to do real work. It doesn't come up and just go like, here's some buttons you can click
and it's flashy. It's like, you got to get in there, focus on the, you know, on the various aspects,
whether you're doing stocks or, or whatever it is and, and learn the commands, but then you should be
able to fly through it. Right.
Yeah. And we actually, one of the things that we spent a little bit of time on earlier this year
was making it so that you can actually chain commands, right? You can, if you know your,
if you know what your workflow is, you can either run it through a script. So you can basically go
into, into the terminal set up what we call an open BB file. You know, if you, 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, you know,
really simplifying the workflow. And then when you're done with that, if you forgot something
in one line, you know what it is, you can type in, you know, you do a backslash stocks,
load in your ticker and whatever you want. So as you said, once you know the terminal,
it's really easy to hop around.
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.
Very much so. Right. So the number one library we pretty much use is going to be a request.
You know, we're hitting APIs, turning those into data frames, reading HTMLs, displaying.
Yeah.
All right. Before we move on from requests, because a request is a very cool library,
but it also opens up the question of where does requests go? Like, 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 ahold of, or it may be not tricky, but requires money.
This is a very good...
That's some variant of tricky, isn't it?
That is. 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 from 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, go get your API keys.
And we try to keep it free, but we are starting to incorporate some more kind of paid, you know,
endpoints that can be paid.
Right, right. So if somebody already has a subscription to some data source, why not let
them integrate that, right?
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.
Got it. Yeah, that sounds really neat. Is there some web scraping, some beautiful soup, or is it all APIs?
There is. So we try to keep it to APIs.
Because they're more stable.
Yeah, you never know what tag's going to change. But yeah, beautiful soup is in there, right? Beautiful
soup's a great library. There is web scraping, you know?
Yeah, I figured, you know, like, sometimes that's just how it works, right? Sometimes people don't
have APIs, but they've got websites.
They do.
It's kind of a cumbersome API if you go to it.
I've also become a fan of pandas. Pandas will do all that for you with the read HTML if you just type in a link.
I was blown away. Chris Moffitt 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 could 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 could say, go to the third table and get me that as a data frame, and bam.
They're like, evil and beautiful soup. There's a lot of steps to get to a parsed data frame with
header values and columns.
Yeah, pandas is fantastic, and, you know, that's a lot of requests, a lot of pandas, a lot of...
This portion of Talk Python on me 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? How much
better would it be to 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. Hey, we already saw your error and have already rolled out the fix.
Imagine their surprise. Surprise and delight your users. Create your Sentry account at
talkpython.fm/sentry and if you sign up with the 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 talkpython.fm/sentry and use the coupon code talkpython.
So I sort of derailed your conversation, but one of the things that first came to mind is like,
okay, if 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?
All of our plotting right now is through PyPlot.
When people see those, when you're in the terminal and you ask for some kind of visualization,
it pops up with that interactive window. Those are PyPlots?
Yes. Yes, this is all PyPlots. All the styling is done in-house. We have a fantastic designer,
fantastic engineer, did a great job of doing some style sheets.
Yeah, it really does look quite strikingly nice. So yeah.
Awesome. 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.
Yeah. You've got machine learning, PyTorch, TensorFlow, SK Learn.
PyTorch is a tricky subject for us because it's tough to bundle into an installer. Currently,
we have some Keras 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.
Mm-hmm.
So we're talking about machine learning. We do also have NLP models used to vader sentiment.
Oh, interesting. Because if you could say, what is the sentiment on Twitter? Or what is it on,
you know, the news sites? Maybe that's going to affect...
Yeah. So that's actually 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 price or as the stock price. Yeah. Okay. Super cool. All right. Now,
before I was going to ask you about how to like sort of do your extra, your add your own extras to it,
but let's actually go and just talk about some more of the like the visualizations and some of the
the pictures, the graphs that you guys, types of questions you can answer basically.
Yeah, of course.
Yeah. So you can get it through a Windows or a macOS installer.
Correct.
Are you doing something like using Pi to app or Pi to exe or Pi installer or something like that to
try to bundle all up? Or is it just sort of a scripted, make sure you got Python?
We bundle with Pi installer.
Pi installer?
Yes. So we use Pi installer. By we, I mean our engineering team. That's a little above my,
my ability there. 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.
You don't get the yellow. Do you want to let this happen? You get the, just the regular,
do you want to let this happen?
Yes.
UAC, dialog and windows, and you'll get something similar in Mac.
Yes. And the reason we have this installer is we understand, you know, the end user is not
necessarily going to be someone that wants to go through and change all the Python.
Sure. Well, it's awesome that it is Python and the people could do it, but it's,
it's certainly not intended just for Python people, right? It's intended for investors who may or may
not be. And we have Pythoners.
I don't want to give a little, but we've got what, almost 200 dependencies.
So, and everyone's machine acts differently. You know, you do a get pull and then you run
poetry install, you know, 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.
Well, I think it's great. And then, you know, that is ideally how software should be delivered,
right? You shouldn't have to like build it and download all the pieces. You just go, here's the
thing I click, I put it there and now, now it runs, but it's often not how it is distributed. I guess just
calling out other 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.
For developers, if you want to, you know, you can do a get pull with your content environment,
fork it, feel free to change it. We're always open to any pull requests.
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.
Yeah, of course.
You mentioned that there's this whole stock section and I just totally encourage people
to come over to open bb.co/product/terminal. And then you sort of just scroll through here and
you get a bunch of cool visualizations. You'll see why I was impressed, I think.
So here's like, you come up and say, I want the Q sum, I guess the cumulative sum as a sequential
analysis technique that shows any func, you know, sort of cumulative function applied to something like
a stock price over time.
So this is just an example. So if you go into stocks and you know, just for everyone listening,
we're going through the website right now. And the first thing you'll see on our stocks,
pay or on our product on our terminal product page under stocks is this Q sum. And for example,
you would load in whatever your ticker is, and this would be found under quantitative analysis. So,
you know, stocks load in Apple, and then you type in QA, and then you'd have all these options.
Q sum is one of them. And this is a time series. Like you said there, it's a time series
technique of detecting anomalies, if you will.
Yeah. And you get little call outs of those events and so on. You've got 3D graphs of volatility
surfaces for, in this case for Apple.
Yep. Volatility surface, you know, they're big. Everyone loves their volatility smiles.
And so, you know, you can show the, you can show the implied volatility as a function of time to
expiration and strike price right there.
And I guess because these are, do you say plotly? I'm sorry, I forgot the,
pie plots, what you said.
We use pie plot.
Plotly, I think. So I've kind of, early on, I did some plots in plotly and there may be some way
around that, you know, the interactive, interactivity of plotly is very nice.
Right. So what I was going to say is when these pop up with the pie plot stuff,
you can basically explore the graphs just because it's like the nature of those tools, right?
Yeah. Pie plot has in, what is it? PLT dot 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.
Okay. Let's, you mentioned the sentiment. So there's sentiment news.
Yeah.
Instantly correlating article headline sentiment through NLP models.
Yes.
Historical price.
Yeah.
Yeah. So for this example, yeah, this example, this applies a Vader sentiment,
right? 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 our given source.
Super cool. All right. Yeah. So all these nice different visualizations and so on here,
maybe talk us through what, so to get these cool things 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, or the QSUM or so on?
As I mentioned, once you launch the terminal, you know, you either use the installer, you know,
two clicks and it's up, or you have your own Python terminal.py and you're provided with some options.
The first thing you want to do, let's say, you know, for example, we're doing this QSUM that's up
right here. You would type in, into the command line interface, you would type in stocks.
Okay. Yeah. And it kind of puts it into the stocks mode where different sub commands apply or
something, right?
Yep. And then once you have there, you'll have a bunch of different menus. You know,
you can look at fundamental analysis, you can look at technical analysis, you can do due diligence.
You know, we've got a bunch of menus on there. So you would load in your relevant ticker. So you do,
uh, you'd either do load Apple, or we do have some, if you have the feature flag enabled,
if you just type in Apple or, you know, AAPL, it'll load in. So once you have that ticker loaded in,
it does a pandas data frame in memory. So, you know, from there we can pass it to the different
functions. And for this, for this particular one to do the quantitative analysis, I would then type in QA.
So when you're on the stocks menu, you know, you can type H for help, or you can do a question mark
and it'll 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, you know, maybe there's windows or exporting data,
you would just type in dash help and you'll get a, or dash H, sorry. And you'll get a pop-up of
the usage and the optional arguments. And you would, you know, type in QSUM with whatever your arguments
are and you would get this plot. All right. That's very cool to hear how that,
and 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, but it's fun. That's interesting.
Yeah. Just a bunch of, you know, open interest by exchange, you know,
exchanges, how much traffic there is things like that's 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 report.
You got an Excel report and you've got, yeah. So actually it looks like a train station looking like
here's the incoming information or whatever, right? Yeah. And actually, cause 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 was working on their MBA at the time said, Hey, you guys provide the data. I need to do
a DCF analysis. And so we coded 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.
That's cool. And the fact that it goes out to Excel, that means you get handed off to somebody who
just lives in Excel and they can still use that. Right.
Yeah, exactly. So, you know, we don't want to completely replace
Excel because we know it's very widely used.
Yeah. But hooking to all these different data sources, real time data sources and pulling it
together. Like that's not Excel's forte.
Yeah. Yeah. And that's why, why should we be doing it for everything? Yeah. Okay. So you've got sort of,
uh, technical analysis stuff. You can compare, different stocks and even, check out the news
over for the ETF. 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.
Yeah. That was my feeling as well. When I first saw this is like, wow, there's,
this is 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 just,
you know, 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 same. You probably focused on one of these areas, right? And
if you narrow it down, it probably gets more doable. Right. Right. As you go.
And I mean, you know, maybe you're trying, one of the things, for example, we have this econometrics
menu, which, you know, one of our target audiences is kind of the academics and in your econometrics
course, right. That's basically what linear regression of certain things. So maybe you want to look at the
effect of a company's balance sheet on and relate that to inflation. Inflation is a hard topic.
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. Oh, that's cool. You know, thinking about education,
that's a big opportunity for you all, right? It is.
People, students are going to be buying Bloomberg terminals and other commercial things, most likely,
right. Not the high end ones anyway. Yeah. And 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, 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 data that you can find through these
other areas. And exactly.
Exactly. That's one thing we, 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 Bloomberg 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, you know, we, that's one of the things we pain points 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.
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. Come here speakers like
Matt Rocklin from coiled, 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 talkpython.fm/python-at-scale.
When you visit the link, be sure to use the code TALKPYTHON, all caps, to get 15% off your tickets.
That's code TALKPYTHON at talkpython.fm/python-at-scale. The links in your podcast
player's show notes. Thanks to the summit for supporting the podcast.
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, this is showing,
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,
if they're a website for sure, but even if they're just compiled, closed source, you won't be able to do that.
We had a contributor reach out to us, part of the, from Greece, part of their software business course
was to submit a pull 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, you know, using the theory in class
there. Another professor reached out to us, he had his students write a kind of an intro guide for us
that we're going to, that we're kind of working with and we're going to make available.
Okay. Awesome. Yeah. The intro guide for OpenBB for his students or something like that.
Yeah. Yeah. Nice. All right. Let me just sort of skim through here. There's a,
Yeah. There's a lot.
There's a feature. 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, you know, it's beautiful. It looks really good.
And the pie plot is really good. The rainbow chart is always a fun one. It's, you know, it's really pretty.
I like it a lot. These are, these are great. So I just, 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 and this analysis
rather than, oh boy, you know, 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, you know? Yeah.
Battleship gray or I don't know.
And also, I'm like, I mentioned too, we let, 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.
Cool. So there's a, a Jupyter section as well.
There is.
Yeah. Tell us about the Jupyter section. I think that's a super big tie in for Python people.
There's two ways you could 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, our functions. So one thing we haven't gone into is
a little bit, the architecture, you know, 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,
you know, if you're, if your workflow is, you know, X, Y, and Z in the terminal, you can, you know,
from open BB terminal, import the API is whatever as open BB, open BB view, view stock, Apple,
whatever, however that works. And you can create your workflows there.
I see. You get a plot back and you just plot.show or just like empty one line,
it goes on there. Yeah.
Yeah. I mean, you do an inline, you can also do, you can adjust it, right? So we'll wrap the API
wraps our load function. So you can load in your stock and you know, 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 for the example in the terminal, there's a default example called equity.
dot, well, it's equity dot I buy 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'll run through paper mill, which automatically fills in, you know, your ticker,
when not generates a predefined PDF, basically with it's fully customizable. We have some fun widgets
that you can play around with. And you know, you can add KPIs. Hey, if I don't know if you,
if the RSI is higher, if insider trading is low, I think those are some of the examples. So you can
create your own custom notebooks, kind of automate your research workflow.
That's super interesting. I haven't spoken about paper mill for a while in here, but it's a really
interesting project. I think from the Netflix team, right?
I have no idea.
I think so. Maybe tell people just a bit about what the whole purpose of paper mill is, what it is.
What we use paper mill 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. You know,
for example, the ticker, right? Basically all the same commands will be run,
just replacing the ticker with whatever's executed. So paper mill is just a really nice,
very great tool at wrapping Jupyter.
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.
Yep. You get the whole notebook and you know, you can customize it, PDF, HTML,
you can send it to your buddies.
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 kind of into that actually specifically said, our code is we use an MVC structure. So model
view controller. So how this goes and, you know, for example, every sub menu will have
a controller and we do, we have abstracted that so that, you know, there's a base controller and a
base docs controller that inherit all the same methods, save ourselves a little bit of redundancy.
So this controller is like parsing and processing the commands you send in the terminal CLI.
Something I failed to fail to mention was that we use arg parse.
Yeah.
So the controller wraps in, it basically takes in, it adds, it creates an arg parse object,
adds the arguments, and then does the parsing, makes sure that, you know, if I type in, you know,
if I try to load a stock ticker, that's four, not an actual ticker. If I try to enter a number,
it'll say, Hey, you need to be a ticker. You know, it does some of the logic.
Our model functions get the data, transfer the data, or edit the data, modify it, manipulate it
in certain ways. And then the views do either tables, graphs. So, you know, for example,
but if you look at how we do our fundamental analysis, the workflow is the controller has
income and we, 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 call income is a method of the controller.
So that'll, 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 parser,
the arg parse 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 we'll call the view, which will then pass in,
you know, the view will say, Hey, alpha vantage model, get me my five quarters of Apple income
statements. And that'll return it as a data frame. And, you know, either, I guess that that function
doesn't have a graph, but if it's a graphing function, it would do the graph.
A graph pops up the window and the pipe plot window and then off it goes. That's really
interesting. I have never really thought about how you might do the processing of CLI commands,
but within an application, when I think arg parse, 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 a line, it makes sense to sort of treat it the same, right?
Yeah. And well, we actually do on startup actually do have arg parse. So you can, you know, for
example, the, my favorite, 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, right? Cause if, if we're not catching all
the errors in the terminal, it would crash every time you added an exception or whatnot. But with this debug
flag, it'll actually show you the full stack trace and just, instead of just the exception.
So we actually do wrap around the startup and whatnot. And we also do like, and we have a reset command
that if you're in the terminal, you type in reset and you know, maybe you changed an API key or you're
developing, you change your function, it reload it. You hit reset. It'll relaunch the terminal.
It'll exit then relaunch. So that's the general, general workflow.
Yeah. Does the terminal run in whatever terminal of your OS? Like if I have iterm set up on my Mac,
it'll run there. If I have, you know, windows terminal and PowerShell, it'll run over there.
Yeah. Just to make sure you're in the right directory.
Okay. Fantastic. Super, super interesting. And also, I can even add a 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. Yeah. I did notice over here that you have
a products, you got a terminal and then documentation, and then you have bots.
Yeah. Coming soon. Bots. I do remember now what I'm going to ask you, but let's talk
bots for a second. Yeah.
And then we'll come back to it.
So bots, I don't want to, 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 this, 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.
Got it. So under the listing here, you have bots coming for discord, telegram,
Slack, and more. And yeah, I guess news is coming, huh?
Yeah. And all of this, one of the kind of using MVC, we're able to extract abstract all of our
methods. And, you know, then we can just, you know, 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.
I'm sharing or comment as much as you can. But, you know, like 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, open, 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, right? Let me know. Yeah.
Something like that. Is that kind of the flow?
Pretty much does some async stuff. It's running on a server somewhere and it waits to read in the
command. Cool. One other question I wanted to ask you is, is what I've seen so far looks like
really cool ways to, I mean, all of it's 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 like a dashboard where I can put different
things up and they're just constantly turning with real data?
That is possible. Yes.
Not the main use case, but possible.
I mean, it is possible and I'll leave it at that, that it is possible.
Okay. All right. Sounds good. That was the one I was asking about.
Yeah.
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 side. Now, that's pretty
interesting. I can't remember, you know, some news article that talked about OpenBB that I
thought was pretty interesting. I came over here. Okay. Wow. This is really pretty,
pretty cool. It's open source and so on. The other one is like right across the top. It says
announcing our $8.5 million seed fund funding and public launch. That sounds like a non-trivial
deal. That's awesome. Congratulations.
Yeah. Thank you so much. I mean, yeah, that's a pretty big deal for us.
I would think.
Yeah. I mean, actually fun fact about this was that so Didier and I were just doing this for fun
on the side, you know, and then my wife and I, we got married in 20 or about a year ago, actually a
year ago in 11 days. So we're on our honeymoon in Napa Valley on good old land of the VC. And on our last
night there, fun day of the, 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,
into meeting up with, meeting up with them on quick 20 minute chat, the day of driving through
San Francisco before actually trying to get out to Alcatraz, because we had that scheduled.
Wow. How, what funny timing on one hand, it's like terrible timing on other it's perfect. You're
right there. Yeah. I mean, I was like, Hey, I'm, I'm in Napa. And, so 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.
So, it was a, it was a great opportunity to reach out with him. They led the round. We have,
uh, we have a great group of angels on board as well. I guess there's a couple of other
call outs I want to make real quick. One, Travis Oliphant is an advisor to you all, which is pretty
awesome. People surely know him as one of the founders of Anaconda. Yep. Travis is on board as
an advisor for us. Been fantastic working with him, getting to know him a little bit. That's super cool.
Then also Naval Rivacant is one of the investors. And I know him from this quarter storm thing,
turned into a discussion called how to get rich. Have you listened to this? Yeah,
it's pretty interesting, pretty fascinating. So he's involved as well, which is pretty cool.
Awesome. I think that's really neat. You know, like I said, congratulations to you guys. You keep
good. You're going 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? You know, 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? Primarily, we want to focus on growth and really hammering on
the user experience. You know, one of the things you talked about is, you know, 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 guides.
Yeah. It seems like something that would lend itself really well to a bunch of small video
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. I can just like pop that up or something.
Yeah. Yeah. No, that's it. And you know, some, a series of those. Yeah. Cause for example,
you know, fundamental analysis or technical analysis are buried three or four menus down. And if you're
downloading the tool to, to do that, you know, maybe you're going to be intimidated at first,
cause you don't know where it is. Right. So we really want to try to find it or whatever. Yeah.
Yeah. So right now we want to focus on the community and we want to focus on the user experience.
Cool. All right. Well, you've definitely got a little runway there. So that's great.
A little bit. How many people are working on it now?
So our team is, it's our team. First off, shout out to everyone bothering me on Slack during this.
I'm ignoring you because I'm talking about you. Okay.
Pretty much. So a shout out. We're about, we're at 15 right now.
Awesome. I'll take this opportunity.
Uh, to mention that we do have some open job postings on our website as well at the moment.
Oh, really? Okay. Just throwing that out there, on our website,
open bb.co/company/careers. Yeah. So I'm guessing some of these are, are Python related ones.
Or currently we're looking for, for DevOps and we're also looking for some social media managers
at the time. Cool. Remote an option?
100%. Yeah. Yeah. 100% remote, flexible hours.
Very cool. Yeah. I know a lot of people are interested in finding new jobs on the one hand,
you know, 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 this city that you don't already live in or you don't want to move to, or you want to change
countries or whatever. Right? So I think, I think remote's pretty awesome.
We're spread out all over the globe. So it's good time. Yeah, absolutely. That's the way it should be.
Yeah. Okay. Well, I think that's, it'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 PRs. People want to contribute. Yeah, absolutely. One of those projects that is very
easy, not easy, but very 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, this part of it,
right? You don't have to understand the whole system massively in order to do that. Right?
Yeah. 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,
are 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.
Awesome. All right, James, before you get out of here though, I've got to ask you the final two
questions. All right. So if you're going to work on this, write some Python code, what editor do you
open up these days? Oh man. So I'm going to get a lot of, 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. Well, you won't get any, feedback, negative feedback from me. I think
PyCharm is awesome. I use it as well. And like all the PR features and get features built into it are
pretty excellent. Yeah. VS Code is also great. it's love to those guys as well. Yeah. I think,
you know, when I started asking this question six, seven years ago, whatever it was, it was like,
I don't know what this person, like, I really don't know what this person is going to say.
It could be anything. It could be some like random thing. I haven't even heard of it. Like that's an
editor. Okay. Let me research that these days. It's really down. It's down to two contenders,
pretty much, unless you get the, the Vim Emacs angle, which is not as popular, but yeah,
it's down to those two pretty much. Yeah. Notepad. Yeah. You just got, got to read something. All right.
And then a notable PI PI package, something you want to give a shout out to?
Oh, man, we have so many, as I said, you know, 200 ish. One of the ones that's been a 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, that's what
does our auto completes and whatnot to try to make a little bit easier on the user experience.
That's fantastic. Okay. And there's two, I like prompt toolkit as well. And of course, rich,
and you know, speaking of textual IO, right. Speaking of open source projects, that is not the right one.
It's really cool that Will McGoogan has got textual eyes that I was looking 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, you know, vibrant open source and Python.
The rich package is fantastic. yeah, it's all we do. Oh, we use now.
That's awesome. It's like got some crazy new feature every week. It's always pretty much.
It's never, 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.
Thank you so much for having me. It was really great.
You bet. See you later.
All right. Thank you. Go bills. Go chiefs.
This has been another episode of talk Python to me.
Thank you to our sponsors. Be sure to check out what they're offering. It really helps support the show.
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 talkpython.fm/sentry 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-at-scale. That's talkpython.fm/python-at-scale.
And use code talkpython to get 15% off your ticket.
Want to 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 sight. Check it out for yourself at training.talkpython.fm.
Be sure to subscribe to the show. Open your favorite podcast app and search for Python. We should be right at the top.
And the direct RSS feed at /rss on talkpython.fm.
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 talkpython.fm/youtube.
This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it.
Now get out there and write some Python code.
I'll see you next time.
Thank you.