Q6: Delaney Mackenzie – Your Quantitative Trading Questions Answered - podcast episode cover

Q6: Delaney Mackenzie – Your Quantitative Trading Questions Answered

Jan 23, 20171 hr 16 min
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Summary

In this Q&A episode, Delaney Mackenzie addresses a wide range of quantitative trading topics from listener submissions. Key discussions include recommended learning paths and resources for aspiring quants, evaluating and optimizing trading strategies, and practical considerations for live trading such as managing alpha decay and slippage. The conversation also delves into the role of machine learning and deep learning in finance, alongside specific features and future plans for the Quantopian platform.

Episode description

Throughout this series, which has been a window into the workflow of professional quant trading firms, we’ve encouraged you to submit questions and requests for further clarification. So, in this episode, being the final installment, Delaney answers as many of these questions as possible (within 80-mins).

--

Sponsored by DataCamp.com – Once you commit to learning how to program—specifically for data science and quant research, your next best step: Visit DataCamp to start any course, free!

Learn more about your ad choices. Visit megaphone.fm/adchoices

Transcript

Introduction and Q&A Overview

Chat with Traders Collaboration with Quantopian Episode six. Hey crew, here we are for the sixth episode in the Quantopian and Chat with Traders mini-series. I am Aaron Firefield and big thanks for tuning in. As I've promised all along, this episode being the final instalment in the series, we would dedicate to QA, answering your questions which you have submitted. Perhaps not you specifically, but questions submitted by listeners.

As a way to have some order to this episode, we've loosely categorized the questions. So these categories include. Resource recommendations, trading with factors, machine learning, live trading, strategy evaluation, and we close with answers to questions about Quantopian itself. And just like we've done for all past episodes, you can find links to all resources mentioned during this episode at Quantopian.com slash chatwithraders. And the same on the ChatwithTraders website too.

Now before we get into it, I do want to say thank you to datacamp.com for sponsoring this mini series. So if you're new to programming or just Maybe want to develop your skills further? I honestly feel your best bet is to sign up with Data Camp and work your way through their courses. Their courses are developed purely to teach data science and languages Python and R, and you can start any course for free. So to get started, simply visit datacamp.com and create a free account.

Alright, well that concludes the intro. Thanks so much for listening to this mini-series, guys. I hope you've enjoyed it. I've really enjoyed putting it together, and I hope it's been helpful to you in one way or another. Please welcome Delaney.

Recommended Books for Quants

Sounds good. Alright man, well let's just hit the record button um and we'll just get stuck into it. So an easy question right off the bat, what are your book recommendations? It's a it's an easy question. Also a little tricky for me'cause I actually I'm not a huge book guy. Which I don't know, that might come as a shock to people, but I've always like preferred the style of learning which is, you know, you just try something and then you get stuck and then you Google the answer. Much more of a

um kind of like piecemeal consuming the information as you need it versus going through and using a book and then kind of reading the book. But that said, um I can make a few recommendations just based on my experience. Uh there's two people who are, you know, uh authors of of financial textbooks. I I know both of them and I think that they're really good both as as people and as uh you know, teachers in their books. And that is Frank Fabazi who's uh

From uh kind of he he works at uh he's worked at BlackRock for a long time. He's a super senior guy. He's written a ton of textbooks and Also uh Desislava Pakomanova, and uh that is spelt P-A-C-H-A-M-A-N-O-V-A, if I'm getting that right. She is a professor at um Babson and uh

kind of a she's been a little bit of a friend of the firm of Quantopian for a while. We really like her and and she actually co publishes with Frank. Um they recently released a a textbook um that I'm actually completely blanking on the title to but

uh we'll I'll try to provide a link in the in the forum thread that we have for uh the Chat with Traders podcast. But anything by those two. Uh and then another book that we kind of used Uh we looked over it on recommendation from another professor that we worked with who uses it to teach his class, Mark Fetrano at Suffolk. But he recommended this book uh

Actually, I have my my notes wrong. It's actually quantitative investment analysis. So if you just like Google quantitative investment analysis, you'll find this book. It's a pretty good intro, especially for people who haven't dived into it before. And the thing that does a good job of is um laying the topics out kind of in a you know very clear step by step basis uh and not kind of skipping ahead or assuming that you've had a background in statistics or anything like that.

Excellent. Right. So I probably should have mentioned this before I even asked you that first question, but I just want to let the listeners know that we have actually loosely categorised these questions. So this first kind of category, if you will, that we're working through at the moment is is more of a general category on sort of book recommendations, math and, you know, some easy programming languages. But

Transition to Quant Finance Careers

or some easy questions about programming languages. But anyway, so the next question that we got comes through here, what's your recommendation for someone that has a business degree on how to jump into the world of quant finance? So uh this one's actually like I say the same thing to pretty much everybody here, which is the first thing you need to do is learn to code. At the at like the a very minimum just code a little bit.

uh you know you don't have to become an expert, but learn to code, get get your hands dirty with that. Um and and especially in a lot of MBA programs. Some are good about this, some aren't as good. Um but a lot of MBA programs don't really kind of teach you to really get down and dirty with technical stuff. Um sometimes they kind of say, well, oh, we're gonna be uh, you know, kind of focusing on the management side and we'll let someone who's technical worry about the technical side.

Um but if you really want to understand and be a good manager and communicate, like you need to have enough, you know, experience. And if you want to jump into the field, I think you should really just learn to code. There's plenty of resources available for doing that.

I think the sponsor of this series, Datacamp, has a lot of really good materials for learning to code within a statistics context and other things like there's just if you Google like learn to code, there's a lot of sites that will tell you how to do it. Uh and and and in general, depending on how you learn, if you like just like a lot of material presented to you, or you um kind of what I was talking about earlier where you go through

uh multiple, you know, different projects and kind of consume information as you need it. I'm the second, so I would kind of recommend uh picking something that really interests you uh and then trying to do it and when you get stuck googling how to get unstuck. That's how real engineers work. Um and and I think that's a pretty powerful way to to learn. And just before we move on to the next question, it almost sounds a little bit to me like

this question was asked by someone who is is is looking to pursue quant finance in the professional space, not sort of the DIY approach. When you say learn to code Do you think that they need some sort of certificate or to actually do a university program in learning to code or or coding on their own is sufficient?

Well it depends on exactly what role they want to occupy within the quant finance space. Certainly I would say it's gonna be very difficult to compete for a purely technical analyst role because If you're talking about a quantitative analyst, these are people oftentimes who've gone through PhD programs in mathematics. They have

years and years of programming experience. But there's a lot of space in between, right? And there's actually the like the famous uh m McKinsey report uh they published a b a couple of years back where they said there's gonna be a huge shortage of data scientists. And an even bigger shortage of data science managers. I think the same thing is true in the quant world that you don't necessarily have to be a pure quant.

You can also look at like, are there roles where I can talk between quants and other parts of the company? Like um, are there roles where maybe I could be evaluating quants? uh f you know and and and communicating that back to a more traditional analysis team or or you know being the the connection. So

I guess it depends on what you're trying to do. Uh I would say it might be tricky, yes, if you're trying to compete against the PhDs. Uh but I would focus on being a bit more creative and and looking for more opportunities.

Essential Math and Stats for Quants

Sure, okay. Now what areas of mathematics and statistics should aspiring quants be comfortable in? Are there any resources that you would recommend? I think that we've tried to craft the lecture series to reflect this pretty well. Like basically what's covered in the lecture series is is a good chunk of what we think is important and it's not all of it, we're adding to it. But

In general, it's just knowing how to validate whether a model makes any sense. And it's the field known as model validation. And a lot of the techniques used for that come from econometrics. Econometrics is the branch of math developed. by economists for dealing with time series data, which of course is very prevalent in economics. Uh and and similarly, time series analysis is, you know, sometimes

people conflate time series analysis and econometrics. Um, you know, I I'm not saying that's wrong. I think they both are kind of the same thing in a lot of ways. But you know, just learning how to deal with time series rather than stationary analysis because it's very different and you have to deal with effects like autocorrelation. And and in general, uh again, like

What I say is to all these things is like the in my experience the best way to learn this type of math is not to necessarily just say like I'm gonna learn these three subjects and then just read about them. Like Pick things that are interesting to you.

Um and and you know, muck around with them a bit and Google around for info and let yourself get lost reading like a Wikipedia page on stochastic optimization for a long time. Like it it's you know kind of Pick something that's interesting to you first and and and go from there.

Yeah, and just to um add on to something you mentioned there, the lectures that you referenced, uh, they're available at quantopian dot com slash lectures. And that's a really valuable resource. I've actually been working through a couple of those, you know, since we started doing this series and it's a really good way to learn. Especially because they're all done in the Jupyter notebook. So, you know, you can directly

copy the notebook and play around with it yourself and get your hands dirty. It's very easy to do that. Well thank you for plugging them by the way. I I'd I I I figured I had already like said that link like three million times, so I didn't want to tire you users out on that front. But yeah, thank you and I I I'm I'm happy that you're finding them useful. Yeah, yeah, no, they're excellent.

Choosing Programming Languages

So this question sounds like it came from someone who's just starting to learn how to program or is maybe considering learning how to program. What they're asking are what are some of the pros and cons of the more popular programming languages? So I think what they're trying to get at here is saying You know, you've got your programs like uh all your brokers, Trade Station and Multi Charts which support easy language.

And then you've got, you know, Quantopian and just any programming script that you write, uh, which can be done in an open source language like Python or C and that sort of thing. So I think this question's really like what are the pros and cons between your open source languages and your sort of proprietary languages, if that's the right word.

Sure. Well in general as a rule of thumb, open source languages are gonna be higher quality. I mean there are th that's not, you know, an absolute rule, but if you look at a lot of the languages that are just like massively used for development everywhere.

They're the open source ones. I mean that's because the standards are open. They're they're kind of universal and something written in C can talk to a lot of other stuff because many people use the same standards versus everybody using their own proprietary languages. So Uh this is too complicated a question to really answer or do justice to in in a short time frame. I mean every language has

many pros and cons and you know the pros and cons are in many different directions. It's not just speed, it's how easy it is to express different things in that language. Uh it's how big the code is for that language. It's how the language handles multiple types of things. Uh Quantopian picked Python as the language that we're using because we think it's the best all rounder and has really good statistical library support that's kind of rivaled right now only by R and MATLAB.

Uh but obviously like some other languages are gonna beat Python on pure speed. So again Um I don't wanna say like any language is best. They all have pros and cons. And it's really just about knowing those pros and cons. um and knowing what you need to get done for your project. And and and beyond that I think that I'd be kind of doing myself and others a disservice by claiming, you know, anything more about a language's goodness without knowing what you're trying to use it for.

So for someone who is totally new to programming though and wants to know which language they should start out with, you think Python is a pretty safe bet? Yeah, Python so for as far as being the first language you learn, uh Python I think is is the best one for that. Uh it it really does a good job of

being accessible and expressing concepts well and it reads well. Like even someone who hasn't done programming before, if you lock them in a room for two hours, you know, they might be able to tell you something about a Python program because it some of it almost reads like English.

Quant Skills for Students and Firms

I really recommend that for people who are just starting out. Okay. Excellent. Now this one is from a college student who is currently studying traditional accounting and finance. They ask What courses should I take to get an introduction to quantitative analysis? Really I think Uh what you wanna take is you wanna take applied math and statistics courses. Um and if your school has Specifically quant courses, awesome.

Uh and if it doesn't, um you know, you can kind of take the same get the same stuff through applied math and and and physics courses. Uh and like I said, like I would go to the lecture series, look at what topics are in there.

and then kind of cross-reference them with the topics that are uh listed and in your school and and and go from there. Of course like every school is gonna have different course offerings. Uh And and I might be jumping ahead'cause I have the the question here, but um there's a second part of the question right, which is that they they said that they're involved in um in an investment fund at the school.

uh and they wanted to experiment with, you know, doing a a quant strategy at the investment fund. Um so I I actually have like a uh a a specific answer for that which I've talked to a few other, you know, school clubs about, which is that I It's really interesting from a quant perspective is to rather than start by trying to implement a quant strategy that makes money, start by using quant techniques to analyze existing strategies or existing um portfolios that the club

is running. And and and that leads into the to the next question um we have on our list here. So maybe you want to ask that question. We can kind of combine two answers into one. Yeah, yeah, absolutely. Um, I'm just gonna read this submission out in full because I think it adds a little bit of context, which is probably necessary for for anyone who's listening to this. So

Uh this is the question as it came through. Um we run a desk that has largely bionic traders. A number of our trading decisions are discretionary, but we use a number of programmable tools to find stocks we trade. Lately we have been putting together plans to introduce some automation, quant trading, etc, as part of the modulus operandi. If I pronounce that wrong. Modus operandi. There we go. M O. Of our desk. My question is.

And finding the right skill sets to work with or hire to make this happen such that we can start automating some of our already successful discretionary trading strategies. What would you advise us to pay strict attention to to attract the right talent pool? Especially if they are not necessarily traders or familiar with the trading space.

Quantifying Traditional Trading Strategies

I mean this is a really great question. And I think it gets at kind of the transformation that the field is generally undergoing right now, which is that there's a lot of traditional people um still using, you know, kind of tr techniques that have been around for a while and and there's a there's a lot of forces now in in the financial services industry pushing towards more involvement of technology and statistics and mathematics. So

It's the same as my answer to the guy who's talking about being in a traditional investment fund at his school and asking how you know, what's the first thing to do? Well, I think the first thing to do is understand what's going on first, right? Like don't necessarily like say we're gonna build an entirely t new machine. Um let's look at the machine you have working first. And so

Uh like the classic case would be just say, let's take your return streams that are coming out of your existing trading desk, your existing traders, um and and just do a quant analysis on those return streams. So the classic case would be looking at

Um and maybe you're already doing this, you know, in which case, great. I don't want to assume, but the classic case would be looking at like risk exposure. So, you know, starting from something super simple like uh uh uh like the Fama French model, um where you're looking at

Uh and we talked about some of the earlier episodes. So you're looking at how your uh returns correlate with the broad market returns and with like a few of the different sectors maybe and then a few of the you know fundamental factor returns. Um and then maybe you discover that your trading desk that you think is is you know doing something really original is actually just a leveraged bet.

or like a kind of a a well-explained combination of things that people already know about. Um so things like uh I think it's the Bara factor model or or or or other well-known factor models what might explain this for you. Um

Attracting and Retaining Quant Talent

And Quantopian actually offers a tool called Pyfolio. It's free and open source and allows you to put in any return stream and get out like a full quant analysis of that return stream and looking at, you know, what is exposed to and and kind of a lot of angles that a quant would take when checking whether or not a return stream is good. Uh now when you're talking about implementing quantitative strategies, I mean I think that really the first step is just to Make sure that you've hired

professionals who really, really know what they're doing and they're rigorous and they're n they know how to control risk. And they're not just flashy people who like want to sell you some crazy Model that's based on, you know, kind of snake oil. And unfortunately, you do have to take the time to kind of learn some of the stats in math yourself.

because or or have someone that you really trust who knows them because the issue is If you're trying to hire people who are good at this, uh unless you have a sense of the skills

and a sense of what is going to define someone who's good and rigorous versus someone who's selling, you know, like things that don't really work, you you're not gonna know who to hire unless you you learn a few of those skills yourself and and get a sense of it. So I think the first step is just Getting someone who you trust, consulting with someone who you trust who's, you know, really kind of a rigorous quant.

um who's you're not gonna BS you and and and going from there and letting them guide the process of setting up that machine. Beyond that, I think it's all kind of specifics and and and it's depends on what exactly you want to set up. Okay. And I'm just peeking at your notes here. Um, you have one here which I think is probably worth mentioning as well, and that's uh about the culture of your company. Do you want to mention that?

Yeah, that's a good point. I actually completely forgot that I put that in there. Um another really important point is that a lot of traditional finance firms have a culture which scares away good technical talent. Uh and and I again I have no idea what your culture is like, so I don't want to assume, but a lot of firms will have this kind of kind of jockey or frat culture, which a lot of technical folks don't like.

Um they'll have this culture where kind of the suits, the the the the traders who d who aren't technical will make a lot of money and then the technical people will kind of be treated more as a you know, kind of a a mill that will turn out uh strategies Um so just making sure that you kind of put your quant people and your traditional people on the same level and evaluate them objectively.

Uh and don't let someone who's better at networking uh you know get paid more because they can negotiate more, like pay uh quants fairly and then you know Other things like not requiring that people wear suits to work all the time. That's like a classic one, is that you know, a lot of these technical people don't want to have to dress up every day. They wanna go in in jeans and a t-shirt.

Um so like little things like that and looking at the culture of your firm versus the culture of maybe a Silicon Valley tech firm and I'm not saying that they're like the best culture, there's a lot of issues with that, but just comparing it and looking at what companies are attracting the best technical talent right now, you know, what you know, and then comparing that to your culture and seeing if maybe there are differences that might be scaring away technical people.

Understanding Factor Interaction Effects

Yeah. Um, so these next few questions are more quant oriented um and they revolve around factors. Um obviously that was a big topic uh throughout a couple of the episodes, especially. Uh so this question here. How would you go about dealing with interaction effects between factors where the signal between the two is not additive? How is this taken into consideration within the workflow uh that we've discussed over these past episodes and how common is it in practice?

So I actually got really excited when I saw this question because uh this is right up my alley. I worked at a computational genetics lab for a long time and the sole Well, it's so but a large part of what we did there was looking at looking for non additive effects between genes and and whether those nonadditive effects were useful in predicting um risk prevalences of you know for different diseases. And uh so

Th this is super interesting stuff. The short answer is that yes, this stuff is super important and actually it just came up because uh so someone who's currently working uh he's uh developing some quant some content for quantopin is this guy Rob Ryder. He's a really, really good quant, career quant. Um he actually teaches uh at uh NYU at uh in their quant program. He really knows what he's doing. I I I really like him. Um really nice guy. And uh

He uh has been developing some stuff on Quantopian. If you look on the forum for Rob Ryder. um R-E-I-D-E-R. You'll see some really good posts he's made. And uh he was actually bringing up this exact same point that he thinks it would be really good to do some posts on like looking at factor interactions. Uh and and generally the way that those that would happen is you just kind of rather than looking at the short answer is like rather than looking at a one D graph.

of you know, factor versus future returns, you'd look at a two D graph of you know, one axis is each factor and then maybe it's a heat map where the color of the graph at that point is is you know future returns on average and and and looking for structure in that heat map. Um That might not make sense to a lot of people, but I think the person asking this question probably kind of gets what I'm saying there.

Uh short answer is yes, it's something you want to consider and it's I think one of the kind of at the forefront of of some of what modern quants are doing. Uh it's not something that's well established in industry as far as I know.

Um so it definitely is a good place to to start looking into. Uh and and and I can't unfortunately go that much deeper into it without kind of getting into a lot of technical terms, but I just wanna say like, yeah, it's a really interesting point. I would look at things like

Uh you know, just uh like Come up for come at it with a hypothesis of like why might two factors have an interaction that's nonlinear and then and then test for that interaction, because it is easy to get into the data mining problem where you've just like There's a bajillion possible two-way interactions, and you're you're likely to find one because of multiple comparisons bias, like we talked about in the first episode.

Mm-hmm. What we'll do is I'll dig up a link to the that forum post or those posts by Rob Ryder, like you mentioned there. Um and we'll stick it in the show notes.

Additive Versus Nonlinear Models

Just still on that same question, the signal between the two factors is not additive. What does additive mean in that sense? So there's that there's this notion in in model development where you're saying, let's say that your model is um the returns on the market. equals current value of factor one plus current value of factor two. So that's a model, right? And and it may or may not fit the real world, but that's a model.

Uh and that's a an additive model because you're adding two things together. It's otherwise known as a linear model. Um and then a nonlinear model or non-additive model might be if the returns were equal to something more complicated, like factor one times factor two. Or factor one square. minus factor two. You know, some some some more sophisticated relationship. And basically there's argument that, you know, there may be

interesting structures hidden in, you know, large cap stocks behave differently from small cap stocks. So maybe large cap stocks are more prone to mean reversion and small cap stocks are more prone to momentum. I don't know. Like that's just I'm completely picking that out of thin air. It's something you could test.

So that would be an example of a of an interaction where maybe you could like split the universe by large cap stocks and just look at the large cap stocks and notice that mean reversion was more prevalent, um, and then just look at the small cap stocks and notice that momentum was more prevalent. Uh and then that would be an example of how two factors are interacting in a nonlinear way. You're not just adding them together.

Grouping Similar Factors Effectively

Okay. Well I thought we should just maybe clarify that a little bit. Yeah, that's a great great point. Now this next question here, it's a bit of a lengthy one, so I think it might be better if I just read it out.'Cause it sounds like this is It's probably um important to the context of the question. So all right, let's go.

When would it make sense to group similar factors together into one factor in your model? For example, you might have some factors that all measure some variation of sentiment. In this case, the idea is that different variations of how you measure sentiment might pick up slightly different signals, but are still likely to be pretty correlated, thus diminishing their value as individual factors.

Would it make sense to group these factors into one and combine this one master sentiment factor with other categories of factors? If so, what are the key things to consider in doing so? I think that's a good question. Yeah, it's a really good question. Um and I'm very happy again, like I'll I'll I'll say it again, but uh I don't think I've said it yet, but I'll I'll say it again.

Like I was very impressed the qual of some of the questions that we got. You know, I I'm unused to getting a lot of good questions when we put out, you know, like a a call for questions. So

Uh especially'cause I know that a lot of l your listeners may have been getting into Quant stuff for the first time. I was I was kind of impressed that we got a lot of these questions. So this is a really good question. I think this demonstrates that whoever asked this question kind of really got some of the stuff that we were talking about in the earlier podcasts.

The short answer is yes. That's something that might make a lot of sense to do. And a few points that I wanted to bring up are so there's this notion of hierarchical clustering, which is a common technique now in um, you know, statistics and data science and it's this notion of okay, well if you have a bunch of things, let's kind of group them by how similar they are and then look at that. Uh and uh people actually use it.

portfolio construction. I recently saw a paper by OneQubit, which is a company that does I think it does quantum computing and they had a white paper which was talking about hierarchical portfolio con hi hierarchical Hierarchical risk parity portfolio construction, I think. I need to go back and double check. But so that's an approach you might take where if you have a bunch of factors, you could actually look at the covariance matrices between the factors.

and then look at a hierarchical clustering of those factors based on the covariance matrix and then but from that decide whether a group of factors is better off just being lumped into one. That said, at the end of the day, all you're really doing by lumping them into one is reducing the weights that you're assigning to each individual one and controlling the

Exposure of the portfolio that you're holding at the end of the day. So at the end of the day, the main thing that matters is what is the exposures on your final portfolio. And really all you're doing by grouping them into one is kind of it's more for your sake and like thinking about your model correctly and intuitively and at the end of the day, like, I don't think it necessarily changes what exposure

or necessarily the behavior of your of your portfolio. Um and another thing just to remember is that it's factors all the way up and down, right? Like if you combine two factors, you're left with a factor. And if you combine a hundred factors, you're left with a factor. So

Um you can combine two factors into one and then combine that with another one and then combine that with another one and like at the end of the day you're gonna have some factor. And that factor is gonna have a set of exposures based on what it's made up of. So it's just

kind of you can also view this as basically a problem of assigning weights. Like I'm not I'm not unless your models are are nonlinear, you can combine factors in some nonlinear way. As long as you're combining factors linearly, it's I think it's equivalent to just assigning different weights to the factors.

Utility of Classic Financial Models

Okay. How useful are classic models such as Heston, G A R C H, ARCH from financial mathematics in creating trading strategies? It's a good question. Basically it's just asking like, you know, I think it's just asking like, hey, I learned these stuff in school or in a textbook, like how much do they get used in the real world? And then those models are pronounced Garch and Arch, which

kind of Garch doesn't really sound good, but you know, that's that's what it that's what it is. It stands for generalized Arch. And we actually have a lecture on it that we co-developed with uh Andre Keralenko when he was working at MIT Sloan.

in the lecture series. But I I mean the short answer is it it it varies. Like I've seen um I'm not as familiar with Heston, but I've seen I've seen Garch and Arch used in practice for, you know, volatility modeling. I've seen all sorts of different models used. Uh I I think that it's really good to have a uh uh kind of uh all of these things in your toolkit.

But at the same time, you can't be wedded to specific models. Like you don't want to come from this perspective of I have this really cool model and I wanna use it, right? Because that makes kind of no sense. What you wanna do is you wanna look at the data. And then say, hm. I interesting how this data is behaving. Let me go into my toolbox of models, my you know, curated pantry of models and pick the model that I think is gonna be a good fit for this data and then see if it fits.

So I would say rather than kind of focusing on the models themselves, just view them as, you know, one of many and and kind of knowing a broader set of models will help you understand more different types of behaviors you might see in data.

Machine Learning: Dimensionality Reduction

Um now these n this this next set of questions here are more around machine learning. Uh machine learning was something that we spoke about on episode five and I know there's uh I think there's some lectures and I know there's certainly forum posts on the Quantopian site. I'm discussing the topic as well. This question here sorta has uh two parts to it. Let's just tackle it, see how we go. So In machine learning for trading and okay, so I think they're referencing episode five, you spoke of

Dimensionality reduction and then those reduced factors being used in a new model. So two questions. The first one being, what kind of dimensionality reduction are we talking about? Those are kind of black box. Uh I don't know how to ask this one. Sure. I I think I know what they're getting at here. Um so I can actually so I I think what they're getting at is uh whether this is kind of

So there's there's a few different kinds of dimensionality reduction. And dimensionality reduction is really when you have a bunch of different like independent variables that all could explain your dependent variable and you don't know which ones or which combination of ones will explain your uh your independent variable, your outcome variable.

And he's asking whether or not where you want to use some technique like singular value decomposition or principal components, which are effectively matrix operations. They come out of linear algebra and they take your data set and they effectively like c contort it around such that what you're left with is a smaller set of uh of independent variables

uh new synthetic independent variables and then it tries to figure out how much they explain your your outcome variable. So the short answer is I wasn't talking about that method.

Of dimensionality reduction, which is also a completely reasonable way to do dimensionality reduction for some problems. I was talking about the uh second more of the second one, which is you uh use ML to look at your features and rather than constructing new synthetic features using, you know, principal components or whatever.

Um you actually just like kick out a bunch of potential uh independent variables, a bunch of potential features. Same thing. When I say features, I mean independent variables. It's just machine learning speak. And you just kick out a bunch of them.

Simple Versus Complex Trading Models

And you let the ML thing say, here's your candidate set of five variables that I think are going to do a great job of explaining the outcome. Uh and then from there you construct a model on those five that you think will explain the outcome. So that's the type of dimensionality reduction I'm talking about. You're reducing the potential dimensions by kicking out

uh features. And then the s the second part of the second question was, well, once you're there, why would you go back to using a simple model like linear regression? Why wouldn't you use something more sophisticated like a neural net or uh Or like a vector machine or something. And uh the short answer is like if you use a more complicated black box model like a neural net, you're back to this overfitting problem. And you're back to this problem of poor visibility into

whether the model works or it doesn't and like as time goes on whether the model has stopped working. So In general, like Yeah, ML works really great on filtering and constructing and kind of paring down data. Um but then at the end of the day, I prefer to have a simple model that I really understand well and I understand what it's doing and what's the basis for it. And it's from a s from a kind of a hypothesis, test my hypothesis, it works perspective.

Um rather than I've constructed a neural net and it spit out something that seems to work out of sample, but I can't put my finger on exactly why.

So I mean it's up to you. Uh my preference is still to use simple models at that point in time. Again, we've talked about this a lot in the ML episode, so I'm not gonna go into it too much, but I think that neural nets work uh more on like stationary environments where conditions don't change super fast and when conditions change fast like you see in financial markets it's better to have more transparency into that so you can pick up what's going wrong.

Like, you know, we're we're doing some really sophisticated stuff now with neural nets and other forms of machine learning and for instance self driving cars. Um they they work really well, I think better than humans at this point.

But again, they're dealing with large and largely stationary properties of the environment, you know, like trees don't change how they look all the time and trees, you know, you go to one town over, trees are gonna pretty much look the same. It's you know, you you're not gonna suddenly switch from from looking at tons of different diff kinds of trees all the time. So My preference is still for using a simple model at the end of the day.

Deep Learning Impact on Trading

Now, next question here, do you see deep learning as something that will disrupt trading either at hedge funds or automated investing services such as Betterment and Wealthfront? Um robo advisors, I think they're also called, um, or even impacting the market itself. Um I'll just throw in a question before we get to that though. Do you just want to clarify what is deep learning referring to and how's it different from machine learning?

Yes, we're on the exact same page. I was about to do the same thing myself. Deep learning is really just this notion that you're doing multiple layers of machine learning. Uh so you know you have your inputs and then your outputs and rather than there just be uh say you know one um machine learning process in in there, uh maybe you have like multiple layers of machine learning processes. So you'd have

One process which is trying to fit a model, and then you have another process which is trying to train many of those processes to fit many different models. So Um deep learning is just this kind of building complexity and building layers of complexity. on top of traditional machine learning models and and it seems to be working quite well for certain problems. Uh you know, I I think I suspect that some of the self driving cars use some notion of deep learning.

uh somewhere in there. Um Apple recently released some interesting white paper work on internal research on um adversarial neural net training, which is you know interesting in case people want to go check that out. Uh but I think that we talked about a lot of this stuff in the machine learning episode. But basically like I I think that where it's going to disrupt Is in replacing jobs that are kind of more easily automated, but not as easy to automate as just writing a short script.

Like um I think there is an example of an insurance company that recently started swapping out some of its claims adjusters or analysts with like a, you know, a deep learning system. Um a basically an AI that would kind of do similar stuff because they realize that a lot of what their claims adjusters do is kind of repetitive or it's the same thing a lot of the time.

Um so I think what will happen is you'll start seeing uh departments, you know, start saying, Well why do we have to hop you know hold 20 equities analysts, let's just replace them with, you know, an AI, but still have a few people that are in charge of vetting the output of the AI. You know, so the AI is looking at all these equities or uh your potential properties to buy or companies to acquire.

um and then suggesting things just like an equity analyst would. Uh and then um, you know, you still have people checking those decisions and making sure they make sense, but you know, you can kind of automate a lot of the

ML Best Practices on Quantopian

analytics work potentially. Now we have one more question on machine learning here. So How does Quantopian address machine learning efficiently? What are the best practices for using machine learning in the Quantopian research platform? To this, like I just want to point to I I think it's easiest just to point to some of the work that Thomas has done recently. Uh Thomas, our our uh director of data science here at Quantopian recently. Um

point like released a bunch of uh examples in the forums. And if you just look up Machine Learning on Quantopian in the Quantopian Forums, you'll find he did like a three part series where he He showed a ton of examples and and I think that rather than trying to like explain what he did, just I would recommend go and check it out yourself because I I think it's pretty cool and and you can try the code out yourself. You can modify the code. It's it's a great starting point.

Yeah, yeah, I agree. That's probably your best bet. Of course, I'll dig up all those links and I'll make sure we put those in the show notes. So they'll be at quantopian.com slash chatwithraders, uh, and they'll also be on the Chatwith Traders website as well. So just whatever's easiest.

Measuring Live Strategy Effectiveness

Now, Questions moving on from machine learning, we've kind of categorized these into, I guess, what could be called live trading. So How do you measure the effectiveness of a strategy after it's live, assuming all strategies will eventually lose their edge? Um and I just want to pick up on that. Do you think that's a fair assumption that all strategies will lose their edge over time?

I don't like general statements. So, you know, I would not be comfortable making the statements that all strategies lose their edge. I would be comfortable making the statement that for any given strategy that you show me, it is incredibly likely that it will lose its edge at some point in time. Um so for practical considerations like uh, you know, assume that a strategy is going to lose its edge over time.

And this is for multiple reasons. Usually it's because the anomaly that you've discovered gets discovered by more people who start trading it and then, you know, it they force the prices and the direction against the strategy and and there stops being anything left over to make money on. Or the market conditions change and and the anomaly you have discovered gradually just evaporates. You know, there's there's multiple reasons.

That strategies lose their edge, but but pretty much everything does. Um and and there's a large field of statistics known as process control, which already kind of deals with this and says for a given process that I'm looking at that's spitting out data at me, when should I worry about it? Like at what point is this process changing? You know, is it out of control? So I I I would look at that sub area of statistics. Uh

I would say, you know, some metrics to look at make sense for all strategies. Sharp ratio is a really general one usually that works for a lot of different types of strategies. So you can just look at the Sharp ratio every day. uh and see if it starts to decline. Um of course like it's really hard to know uh whether or not you're looking at like a minor deviation, something that's expected, or like something that you should actually be worried about that indicates that the strategy is is over.

It's done, it's not useful. So process control has really kind of solved this not solved completely, but done a lot of work towards solving this problem of how do you differentiate random noise from an actual issue. So I would say just base your analysis on what process control has already figured out.

Managing Alpha Decay and Strategy Viability

Um and then also I would say beyond just the general metrics that people use like Sharp ratio, Max Stratum, try to also look at other metrics that are based on the components of your strategy, kind of what is your economic hypothesis underlying your strategy. If you think that something to do with value is interesting and you're trading based on value.

Try to look at properties of value in the market and whether the properties of value in the market appear to have changed distinctly from when you started running your strategy. And sometimes what you can do, especially if you have a multi-factor strategy, is by analyzing the components of your strategy.

individually as well as the overall performance, you can catch individual components that have broken down before the entire strategy breaks down and then you can swap those components out for something new or better. Um so don't don't just look at the the you know the usual metrics. I think just also try to figure out what metrics make sense for your specific strategy and then also look at those with this notion of process control.

Yeah. And I think his next question might be somewhat similar, uh, but this person asks, How would you monitor for alpha decay? And when would you decide that a strategy is no longer viable? Yeah, so I mean that's pretty much the same thing. It's just like looking at looking at the alpha over time and and the sharp ratio over time.

and other metrics and just, you know, using kind of notions of process control and statistics to know whether, you know, this new behavior you're observing is really different or, you know, stuff that's within expected tolerances. And I think Another point that I forgot to make during the you know the first question, but it's equally applicable here is that what's really important is that you set tolerances before you start running the strategy and you stick to them.

And you don't like, you know, give yourself a chance to be like, okay, well, it's it's outside of the tolerance that I set. But it's made a lot of money and I really want to stick it, you know, keep going with it. Like that's the really dangerous point at which you're letting your emotions, you know, kind of get in the way of all this math that you've done. So

set tolerances, stick to them and if you if it breaks the tolerances, take it off the market and then figure out, you know, if you want to set new tolerances, if you want to design new strategy, et cetera. Uh there's another component of this second question here, which is just, you know

I if everybody's using factor models, are they gonna decay? And the short answer is that it depends. I mean, like yeah, certain factors are gonna decay. Common factors that everybody is going and investing in are gonna decay for sure. Like common factors Any of the price-based factors like technical factors, you know, common factors like value or quality by themselves are gonna start decaying a lot as everybody's using factor-based strategies.

Uh but you know, factors this notion of factor based modeling is very general and s th if you develop a new factor that other people aren't using, that's not gonna decay. There's no reason it would decay. Factors are just ways of ranking stocks, you know. It's The the fact that someone else is using a factor strategy that has different factors isn't going to affect your factor strategy that has, you know, new factors that you've developed. So it's important to kind of note that.

Uh and then there's another component which was just saying like how can anyone compete against machine learning models that are automatically picking the the best factors? Well uh the answer is just develop new and better factors, because you know, all factors are gonna decline and and It doesn't matter a machine learning algorithm if it's presented with twenty bad factors isn't going to be able to necessarily create something good.

uh, you know, a lot of it really comes down to your factors. I would say that a machine learning model can kind of slightly boost the performance of factors, but it's not gonna like turn a bad factor into a good factor. Excellent answer. I'm really pleased that you mentioned uh setting tolerance before you actually go live with a strategy. I was gonna add that one if you didn't mention that, because I think that's really important. Um, you know, once you're live trading.

uh a strategy, it it's very easy for your emotions to get in the way, just as it would be if you were to put on a trade by hand, you know, it's typically regarded as a good thing to know when you're gonna get out before you get into the trade. Exactly.

Modeling Slippage in Trading

Okay, so I think this next question is referring to the slippage model, which is built into Quantopian. How does this compare to actual slippage numbers in live trading compared to practice? Sure. So uh again, uh we just actually released a full research project. I think it's on the Quantopian blog, if you look at the recent posts. Uh Uh I'll also make sure it's it's it's linked to in the appropriate places, but it was by one of the members of our research team.

here, uh, Gus and and he actually did exactly this. He looked at our slippage assumptions and he compared them to the actual slippage we are seeing in real life on trade execution. Um and you can kind of use that same type of analysis that he did uh in general to kind of do comparisons. But i slippage completely depends on the brokerage. Completely depends on the brokerage. I don't want to make any claims because it's really brokerage dependent. It's market dependent.

Um and and it's you know, there's no I don't think there's any general model that's gonna say like slippage is gonna be this. Uh it's market dependent, it's season dependent, time of the day dependent. Um, you know

And really you just have to model it like you do anything else in finance. And so, you know, banks have teams whose job is to model slippage and uh You just kind of have to figure out a model that you think makes sense for slippage or use someone else's model that you think makes sense for slippage and and just make sure

kind of check in routinely, maybe, you know, once every couple of months and make sure that that model still makes sense. Or if you're, you know, trading more frequently, check in more frequently and and and process control it just like you would any other metric on your algorithm. Yeah. Cool. And that's how you understood that question as well. That's that's what they were trying to get at, that's what they were asking. That's how I read it anyway.

Yeah, yeah. I think it was just like, you know, it's we talk about slippage abstractly, but what are actual slippage numbers? Which is I think a perfectly reasonable question. Mm-hmm. Yeah, but as you said, it it really depends on broker and it's gonna vary from broker to broker.

Evaluating Strategy for Institutional Capital

So this next set of questions will probably lump into the category of strategy questions. When should you be satisfied with your trading strategy? Uh this person mentioned that they have a return profile of a one point six sharp ratio, seventeen percent annual returns, less than ten percent maximum drawdown. Is this good? Would this be considered high enough to attract institutional capital? Is there a certain threshold or benchmark to aim for?

Sure. And I mean it it it might be annoying to hear this, but I mean these metrics are all completely relative, right? And so, you know, s if I'm advertising to you a car that has thirty miles to the gallon, well What is the miles to the gallon of the game? the competitor's car and what's the price difference, you know?

Uh so it it's really hard to say. It's also important, capacity analysis is really important, right? Like you have a 1.6 sharp on what capital basis? You know, can you maintain a 1.6 sharp at uh ten million at a hundred million dollars,'cause that's the amount that, you know, an institution's gonna care about.

Um or do you maintain a one point six sharp consistently out of sample on ten K dollars, right? It it it really it there's a lot of factors that go into it and it and it's all relative. So I'd say as a rule of thumb, um Like start with, you know. Look for make sure that you can consistently get a sharp greater than one out of sample and and and go from there because the other important things to check are

you know, is this how what is what are the factor exposures of your strategy? Is this just some combination of known factors in the market? Because If so, an investor institutional investor isn't going to be that interested because they can just buy those exposures as is. Uh so the lower the sharp uh you know, the more generally the more uncorrelated with other known factors it has to be.

uh to be interesting. And and even if you have like a a not a great sharp ratio, if it's super uncorrelated with other stuff, it's just like some crazy new return stream, institutional investors may be interested purely for a diversification perspective. Even if you have multiple sharp ratios that are not so great.

uh as long as they're independent and you add them together, the overall portfolio sharp ratio will be pretty pretty good because you know you your returns are additive but your your variance increases um slower than your returns increase. Uh so and and and you know

We talk about this in a bit in the position concentration risk lecture. Uh but uh but yeah, like again, it's it's all relative and it really depends on what the options, you know, that the person who's buying the strategy from you has. But again, rule of thumb, you know, get sharp consistently above one out of sample, or if it's not above one, like make sure it's really uncorrelated with other known things.

Okay. Now this isn't a question that was submitted. I just want to bounce this question off your response there. Um the first thing you mentioned was the capacity of a strategy, like how scalable is it? Can it be traded? on, you know, a hundred million dollars of capital or you're just trading it on a ten thousand dollar account. Is there any way to actually uh measure the capacity and the scalability of a strategy somehow?

Estimating Strategy Capacity and Scalability

Sure. Uh so this is like something that's gonna be done a lot and and and I dn I we need to have a lecture on this added to the lecture series at some point. We we currently have not had the time to do so. But

Basically what you do is you try to estimate it. Uh and again, like this is an estimation, I think you can get a pretty good idea for capital capacity. It's not as you know hard to model as other things. Um but it's you what you do is you look at Uh basically uh there's things that restrict it in two directions, right?

Uh there's things that restrict it in the small direction, which are commissions. So you're paying a lot of commissions and you're not trading that much capital, then your commissions can eat up a lot of your profits. Um and make it difficult to trade on small amounts of capital. And in in in the big direction, you can have trouble when you're running into being a high volume

a high percentage of the market volume. So if you're trading ten securities with ten million dollars, it means you're pumping a million dollars through each security. If you're trading low market cap securities, small cap securities, you may be a significant percentage of the market on any given trading day.

And what that means is like you're trading against yourself. Nobody's gonna sell or buy to you. You're gonna get you're not gonna be able to fill your orders, your price is gonna be terrible, your slippage is gonna be terrible. So Uh generally capacity analysis is done by with a backtester that will model uh slippage and and transaction costs for you. Just run it at a variety of different capital assumptions.

Uh and then see what the returns curve looks like for each of them. Um and and and see if you can kind of notice a peak where you kind of your strategy does best and then it falls off in either direction. Okay. Very good.

Declining Price-Based Alpha Signals

Are signals from price getting harder and harder to find because everyone seems to be trading from it? How do you want to tackle that one? Uh the ans yes is the answer. It's uh it's basically yes. Like signals that are based on price, factors that are based on price are super

you know, commoditize now, like every single trading platform tries to sell you some technical analysis or some charts where they say like, here's, you know, let's look at the charts on these stocks and let's look at they go up and down and let's try to pick patterns out. Like It's just everybody has access to that now and it's just completely arbitraged out. I don't want to say completely. But you know, it it it's very arbitraged out. Um you're kind of trading against a mob.

And it and as such, because you're trading against so many people, you're vulnerable to mob psychology. So some of these things like momentum technical indicators may work just because so many people are using them, right? If everybody uses the same momentum technical indicator,

uh and it's going up, well everybody's gonna get in on it and that's gonna drive the price up and then everybody wins. But at the same time, people are vulnerable to you know, mobs are vulnerable to panics, things may change at any given time. So I think that Quants generally tend to to shy away from using technical indicators alone because they can be, especially the common ones, are just, you know, very, very prone to people being a little s scared on the market.

Single Instrument Strategies and Risk

I do like this next question. Um, someone here says I've got a profitable out of sample machine learning algorithm. I presume they're just referring to a trading strategy, but it only works on one financial instrument. Should I be concerned about this? Is this normal?

Sure. Well I mean it it it really it depends on how you came up with the strategy, I think, and and and what evidence you have and how consistently it works out of samples. So I mean It's entirely possible that if you're looking at like one instrument, maybe the instrument is a sector ETF or a future, like you may have discovered.

uh an interesting pattern that affects just that instrument and, you know, is is predictive of the movement of that instrument. But on the other hand, with just one instrument You're you're you're setting yourself up for a huge amount of position concentration risk, right? And so that's the lecture I'll I'll cite it again here, but

Um basically that if you only investing in one instrument, like if something weird happens to that instrument or if your accuracy is even slightly off, you you're subject to huge problems. So Uh the short answer is like, you know If you came at it from the perspective of like, I want to predict the price of this instrument and I have these variables that I think will work and your machine learning algorithm works, that to me sounds much more likely.

Uh and so it's all about weighing evidence against prior. So like my prior is Uh machine learning algorithms can be a little tricky. Um if it only works on one financial instrument, that's really suspicious to me because it it feels like it's just overfit. And you're just getting lucky on that instrument. But on the other hand, if you came to it from like, I think this will work because of A, B, and C, and then it works.

that to me feels much stronger. Um and then maybe you could you know try the same approach. I think that it will work on this other instrument because of B, C, and D. And and if that works, then maybe you've got a better workflow overall. But yeah, in general if it only works on one instrument, I I'm very dubious of that just because again, it's sample size of one. You know, that's not a lot of evidence showing that your workflow makes sense.

Uh and then also like you can't really trade it effectively because it it's just one instrument. Um and and you're setting yourself up for a lot of risk if you're just trading one instrument. What if this person was to create numerous strategies that still only happen to work on on one financial instrument, but there were different strategies on different instruments. Is that going to offset some of what you you refer to as the um what was it position risk?

Was that the right term? Yeah, position concentration risk. Yeah. Uh absolutely. No, that and and I I completely like that's a great way to go about it. Like if you can kind of spend a lot of time on one instrument, get something that works, spend a lot of time on another instrument, get something that works, well yeah, combine it.

put together ten instruments, ten strategies that all work on one instrument, have each of your strategies responsible for trading just that instrument, and then add in a bunch of, you know, longs and shorts that are just kind of neutral longs and shorts in the market just to increase your diversification.

Um and avoid the probability that you get stuck in, you know, like if if one of these stocks tanks or does something weird, that's ten percent of your of your investments all of a sudden is in in trouble. So Yeah. I mean that's not too different from like how analysts work, right? Analysts will specialize in in getting really good at modeling like, you know, a few companies and knowing a few companies and and understanding how those companies work. So if you're doing that kind of process, uh

Great. But yeah, I would say like try replicating that same process that you did to get something that works on one instrument and try to see if you can get on something that works on a few other instruments. Yeah. Yeah. Definitely.

Finding New Alpha Factors

This question here I think it came from someone who obviously is quite familiar with options And it's relating to the use of options for market direction. Do you look at the options delta to identify the probability of stocks increasing and decreasing? I mean I so I that's a s I would say that's an example of a specific factor.

Right. Like that would be one factor that you might use in a model to try to understand how the market's gonna move. Um and and options delta, you'd have to I don't know. You I'd have to study it and I'd have to evaluate it and I'd have to say like Is options delta still a good predictor of market direction? How does it done historically? You know, do I have any evidence that it's stopped working, that it's continued working?

So like I the short answer is I don't know about specifically about like, you know, using options delta to to look at stocks. Certainly it sounds like it might be a valuable piece of data, but i it it really just you have to evaluate it and then see how it fits into the rest of your model. Yeah, I mean it's something that could certainly be tested, isn't it?

Aaron Powell Exactly. Like this that's what I say about all these things. Like people like to have philosophical debates about like the underpinnings of like Uh does technical analysis work or does you know using this specific factor work? Well, uh just test it, you know? Just just go out and and test it and see if it works. Uh uh I uh that's the nice thing about all these things, is they're all

They're all just models. They're all just ways of understanding the world. And and and as long as you're constantly testing them and making sure that they still work, that's fine. Do you recommend any other ways to find alpha factors that define probability, mainly without having to rely heavily on Python? So that kind of sounds as though this person isn't a programmer but isn't interested in this taking a quantitative uh look at their trading.

Yeah, I mean I I I feel like so that's just kind of getting at this point of like how do you find new factors, right? And I I'll I'll go back to I think what I've said before, which is that, you know, I would look at new data sets. things that other people aren't looking at yet. Like do you have access to data that is, you know, kind of not commonly used at other financial firms? Can you collect a new data set in an interesting way? Um, you know, et cetera.

Uh and uh you know, can can you use weather data to kind of figure out if uh oil companies are gonna have shocks to their production and therefore you know, like there's there's lots of new data sets you can look at. And yeah, and then also just looking at interactions between known factors, like we were talking about early, those are those are two ways to kind of come up maybe with interesting

New factors. If you don't want to rely on Python too much, it can get a little tricky just because a lot of this factor-based stuff does require kind of, you know, a lot of data processing and a lot of um, you know, chunking parsing data, importing data, um, and then like evaluating the outcome. But but you can start thinking about kind of ways of of looking at new data sets that might be kind of interesting and novel.

At Quantopian, are you seeing a shift to other types of strategies than perhaps strategies that were more common in the past, as in like what time frame would be seen the most now and what kind of strategies seem to be disappearing. It's a little tricky for us to answer that because we don't look at people's strategies. Like uh we we can see what's going on in the forums for stuff that people have posted publicly.

And we can look at the industry of what people are developing. So like the true answer is like I don't really have an answer for you on that front. Um I think that in broad terms the industry is moving towards uh you know Constructing portfolios based on factors and analyzing portfolios based on their factor exposures. Um, and also kind of like aggregating many, many managers or many, many models together into like overall aggregate models that work much better when, you know, taken as a whole.

Uh than the individual parts. But like aside from those broad trends, like people are working on all s all kinds of crazy stuff. And I think just like The the main thing is just kind of like figuring out what your big piece of expertise is. Like what do you bring to the room that other people don't? And and really drilling down hard on that. It's no different from anything else. Like what is your competitive advantage? And drilling down hard on that competitive advantage.

Quantopian Platform Technicalities

In regard to portfolio optimization, is it possible to have too many constraints? I I quite like this question, and I think it's something that we actually didn't address um on episode four, which was dedicated to portfolio optimization. So what do you think about this? Is it possible to have too many constraints on your portfolio?

Yes, certainly. Absolutely. The generally the bad case of having too many constraints in your portfolio is that your optimizer will fail to converge and just be like, I can't solve this problem. If there are too many constraints, there's no feasible solution. Uh, which isn't a terrible case. You know, it's kind of a nice failure mode where it tells you that it failed rather than you losing money.

I mean other cases may also be that it just is unable to make any trades if you have too many constraints. Um and and there's various ways to interpret that, right? Like on the one hand you could say I'm over constrained. But on the other hand, you could say, given these sensible constraints that I set, there's just no good trades right now. And so it's it's important to kind of again kind of s pick reasonable constraints and stick with them and and not kind of let

you uh emotionally later then try to to change that. So um as long as you have a good process in place for creating these constraints, um I I think that's the main thing and then just kind of stick with them until you have a lot of evidence that, you know, maybe they're not very good constraints to be using anymore. But yeah, I I I mean like I think the failure mode of having too many constraints is generally just gonna be that the optimizer isn't going to converge. Sure. Sure.

Now this last category of questions here mainly revolve around uh the actual Quantopian platform and Quantopian as a fund. Um So this first question here in this category, uh this may be one that's better for the the forum, but Someone here says, not understanding how stop limit orders are handled on Quantopian, I don't see any references to it in the documentation.

Uh yep. So I would say honestly that yeah, just just post that in the forum. You're gonna get a much more detailed response, I think. Basically the uh if you go to Quantopian.com slash help, it it describes the order method and it shows you how you can implement uh a stop limit order.

And if you really want to get down and dirty into the code and and uh you can uh actually even just go check it out yourself on GitHub if you go to GitHub and you look at the Python underlying the order method in in zipline and the precise path to that if you go to the zipline repo is If you go zipline, zipline finance order dot pie is the file which has uh the order methods in there. So but just I would I would post that in the forums and you'll get you'll get a better response.

Um at least that way you'll be able to get some code that you can implement and and try out too. Are there any plans to add international exchanges and data in the near future? And in such a case, will the portfolio API be able to manage multiple assets? from global exchanges and different currencies in the same portfolio. So two questions there. Yes, we we have definite plans to add uh international um international uh equities.

uh as uh a tradable market on Quantopian. Uh I don't want to set a timeline on it. Like when you say near future, usually that's taken to mean within the next you know couple of months. Certainly we're not running on that kind of timeframe. We're working on getting futures out the door. Uh first. And then when we get futures out the door we'll decide what the next set of

tradable markets we want to add is and and of course there's a lot of considerations into building that. So I don't want to give you a precise timeline, but certainly we are it is in our queue. And uh in regards to the second part. Uh yeah, we have full intention to as we add more asset classes, make it all tradable from within the same algorithm, same API, it all works from the same system. And actually I think that's gonna be pretty interesting because very few other

Non-institutional systems give you the ability to kind of have one algorithm which controls your portfolio across multiple asset classes. And it opens up Things like uh, you know, cross market arbitrage and being able to hedge future p positions with, you know, equities. So we're actually pretty excited to be able to to trade.

say like equities and futures in the same algorithm and then hopefully when we add more tradable markets, trade them all within the same algorithm. And is there a timeline for when futures will be added to Quantoken? Uh I don't want to give uh specific date on it. Um certainly I would say uh Uh we're we're working as hard as we can to get that out right now. Um we have a lot of people kind of making sure that that gets out the door as as quickly as possible.

Uh I I don't want to overpromise because the classic failure mode in in in engineering is that you say you put a specific date on it and then something comes up and then you're like, oh well now we can't get it done by that date. But uh certainly Certainly, you know, uh I would Keep keep an eye out. Keep an eye out. We're working on it. It's it's it's coming, I promise. Um and uh certainly, you know, it's it's not gonna be a a long time at this point.

Okay. So it would be safe to say expect to see futures on Quantopian sometime in twenty seventeen. I would I would I would yeah I'll I'll I'll say that. I'll say that. If if we yeah, I I think definitely definitely within twenty seventeen. Again, I'm so I'm so worried about over promising, but I that is a safe that is a safe statement.

Okay, okay, sure. Well I'm keen to see that see that happen. Um, do you have any plans to support deep learning on Quantopian, of course? How would that work in the event based architecture of the back tester? Sure. So uh the short answer is yes, we absolutely we do want to and we we've thought about a lot of different ways to make the current API more friendly towards machine learning and deep learning. Um and that includes things like, well, can we have maybe some kind of

uh asynchronous call outs where you could you know call out to some model that trains itself and then it would get the results back and et cetera. So there's lots of different ways to potentially solve that problem. We're working on

thinking about how that might happen. Um but as far as like what you can currently do on the platform, again I'll point to Thomas's stuff where he went through that series of three examples of using machine learning on the platform as is. And there's actually a good amount of stuff that you can currently do on the platform. So Uh, I would just uh look at what he wrote and then, you know, we're we're working on improving the product to be able to support more cases. Okay.

And how do you add a private feed to the Quantopian platform? I I think this question is really asking, is it possible to work with your own data as well as the Quantopian data that's available? Uh sure. There's two ways. Both times you have to have basically a CSV. Um you can do that just by uploading the CSV into the research environment. Uh and and there's tutorials and documentation on that in the research environment under the tutorials and API and documentation folder.

And then if you're looking to integrate it into your algorithm, again in quantopian.com/slash help, if you look for fetcher or fetch CSV. Fetch underscore C S V. That's how you would integrate it into an algorithm.

uh do you know to pull in maybe like some daily values for something that uh uh some private uh data signal that you've you've developed. Uh but again like both of these questions I think are are or this question in particular is is another good forum question if if that doesn't clarify it for you.

Quantopian's Business Model and Future

Yeah, absolutely. Can an individual license an algorithm to use to trade? I'm not a hundred percent sure exactly who wants to license an algorithm, but um maybe you understand that question a little better. I think this is kind of we get similar questions a decent amount, so I don't want to assume I know what this person's thinking, but uh the other questions we get is like

Uh can I kind of like come to Quantopian, see the algorithms that people have written and then like license an algorithm to to to run my own money through? Uh and the answer is no, that's not that's not the business model that we're pursuing. Um so uh the short answer to that question I think is is is no. Our our focus is on being able to make

uh large institutional sized allocations to quants who develop strategies. You know, our plan for that is we are planning to open up um uh an investment vehicle to institutional investors at some point in twenty seventeen and then use that investment uh hopefully to be able to make uh large institutional size allocations to

quants who have developed strategies on the platform and and you know sizes of allocations that would be competitive to what you might get, you know, inside a large uh financial institution. So that's our current focus. Yeah, absolutely. Will we be able to use algorithms developed on Quantopian on a trading platform for our own investment purposes? Th I think this question's getting at two things. One is uh like

Does Quantopian take any of the intellectual property or restrict you? And and the answer is no. We we don't take any, you know, intellectual property and we don't put in place any restrictions. Anything you do on the Quantopian platform is yours and and that's defined in the user agreement on the website and You can take it and you can do whatever you want with it. Um if you're in a position where we have, you know, selected your algorithm for a potential allocation.

Um then, you know, it it we would put in place uh restrictions on how you'd be able to use your algorithm ext you know outside of that just to make sure that we, you know, protect the allocation we make to your strategy. But Unless you're in that world where you're already being considered for an allocation, there's no restrictions. You can you can use it wherever. Um so I I think that's what this question is getting at.

How do you determine whether my strategy is a good fit for Quantopian's portfolio? That is a complicated question that we spent the last a good part of the last 18 months trying to figure out ourselves. So uh The short answer is we do a lot of different things. Uh and it's really like I d uh I can't really uh kind of answer that now easily, but

There's two resources I'll I'll probably want to point people to. Um and the two resources are there's actually a webinar that uh Jess Stouth, who was one of your one of the podcast guests uh just did uh with the the data incubator, which is a data science uh organization. Um and and that should have be released like now or shortly. So I think she talked about our process there a bit. And then also there's a webinar that's coming up.

uh well will already have happened uh by the time this is released, but uh that was done uh by Jamie who's someone at Quantopian and it was talking about how to get an allocation on Quantopian and he goes through some of that process there as well. So there's a there's a lot of different stuff

Um a and it's kind of too complicated to address in a in a short time frame, but I would I would point people to those two those two resources. Sure. Um so I presume those webinars will probably be on YouTube. So I'll just grab a link and we'll we'll put those in the notes.

Okay, now we've only got another couple questions here. Uh this one, what percentage of your members do you believe will ultimately get a capital allocation? I presume that's quite difficult to say, but um I'll let you answer that however you please. Sure. I mean yeah, it's it's really difficult to say. Um and and it's not something that we honestly know at this point. Uh it it really depends on the amount of

of good strategies that are produced and um you know qu how much uh capital Quantopian has to allocate out to the strategies. So Those are the two sides of the market where, you know, how much capital do we have, how much supply of good strategies we have. And it's really like, you know, I can't really predict how that market is going to turn out and and how much how many allocations we're going to make.

You know, certainly I think that we're also focusing on adding value beyond just getting an allocation. So like something we're actually focusing on a lot now is expanding our educational initiatives. So Uh something we've noticed is that, you know, a a good number of users who come to the platform actually want to learn uh kind of before anything else. And and so we're focusing on also being able to make sure that like

regardless of how, you know, regardless of whether you get an allocation, we want you to come away from the platform having learned a lot. Um and so uh, you know, we're trying to make sure that users kind of benefit regardless of how their their their time goes on the platform. Very good. All right, Delaney, let's leave it at that. Um I just want to quickly say thank you to everyone who submitted questions. I think there's a lot of really good questions in there.

And uh thanks so much to everyone who's been listening uh to this series. It's been a lot of fun. Thanks, Delaney. Yeah. Yeah, absolutely. And I apologize if there's anybody whose questions we didn't get to. Again, it's just like I said, like I was impressed at both the breadth and quality of questions that we got. So, you know, the the downside of that is that we can't answer all of them.

But uh again, the Quantopian forums exist, so if you feel wronged that we didn't get to your question, um complain to me in the Quantopian forums and and hopefully I'll see it. So you can do that at quantopian.com slash chat with traders. Uh, Delani, let's leave it at that. Thanks very much, man. I appreciate it.

This transcript was generated by Metacast using AI and may contain inaccuracies. Learn more about transcripts.
For the best experience, listen in Metacast app for iOS or Android