Devreal

ML Martin Froehler 5 3 16

ML Martin Froehler 5 3 16

Recording: ML Martin Froehler 5 3 16

! Tonight's talk will be about algorithmic trading and practical tips for algorithmic trading from a machine learning perspective. What we're going to do tonight, I will give you an introduction to quantitative finance in general, so what it is and what it does, and then an overview of our Quantiax framework that you can use for free to build trading algorithms, and then good practice and pitfalls of algorithmic trading in general. So this applies not only to machine learning methods, this applies to all methods that you could use for algorithmic trading. Then Nobby is going to develop a simple trading system, LIFE, and we'll walk you through the results of it and what we can learn from them. And then finally Eugenio will do his talk about practical tips for algorithmic trading, especially in a machine learning context. So these are 21 lines of Python code that manage or could manage 25 million and do that pretty successfully for over 23 years. So that's in a nutshell what quantitative finance is about. Quantitative finance is the methodical way of trading

Quantitative trading program or a trading algorithm is simply a small computer program that automatically buys and sells assets. Usually it does that because it detects recurring patterns in price series or in data in general, and then automatically and autonomously makes its decision. So a simple example would be if gold gained 5% in the last 10 days, buy gold. If gold lost 5% in the last 10 days, sell gold. So quantitative trading is the methodical way of trading. It applies the scientific method on financial data. And it eliminates much of the human error from trading simply because algorithms are not subject to human emotions. They do the same every day regardless of weather and anything else

All right. Quantitative finance. The industry today, it's a big industry. It's a $300 billion industry. And if the current trend continues, it's going to be a $1 trillion industry in 2022. What does the industry look like today? It's basically in the hands of a few pretty successful companies. Most of them are based on the East Coast Wall Street. Who hire researchers, scientists, engineers to build quantitative trading algorithms for them

And then ultimately they market a product, a hedge fund product. So the most popular names in the industry would be Renaissance Technologies, De Shaw, Two Sigma, and many, many more. Very successful quantitative hedge funds. It's a very elitist industry. So getting in and becoming a quant is actually a tough challenge today. So worldwide we've got approximately 10,000 quants working at quantitative hedge funds. And in the US alone we have 20 million people with a science and engineering degree. So you can imagine how hard it is to get into the industry

So these are the companies who build the most successful hedge fund products, quantitative hedge funds. And then on the other side we have got their investors. So high net worth individuals, institutional clients, institutional investors who would invest in the products that they create. So today a $300 billion industry. So our role as Quantix is, our mission is to make algorithmic trading accessible for everyone to participate in that industry. Quantix is the first marketplace for trading algorithms. So we connect user generated quantitative trading algorithms with capital from institutional investors. Quantix is the first place to build a business

That's our mission. We want to make use of the potential of the great scientists out there, of students, of professors, of data scientists, of everybody who has worked with data in some way and who wants to make a living with a skill or a decent side income with a skill. We want to empower you guys to compete with the big guys on Wall Street. That's the mission of Quantix. So how does it work? We provide our quants with free and open source software to build quantitative trading algorithms and free historical market data. These are the two key components that you need to build quantitative trading strategy. You can use them. Like I said, the software is free

It's open source. At the moment we support both Python and MATLAB. And more languages might follow in the future. So you can use them to develop and test and improve, of course, your algorithms. And then ultimately if you're satisfied with your solution and if you want to make money with them without investing your own money, you can upload them to our platform, to our marketplace. And we market them to institutional investors. So as soon as you upload a strategy, we start to build up a life track record of the strategy. That we update every day as the market data arrives

And that's exactly what we show institutional investors. So they can assess how well your strategy works not only in a back test, but also on life data. Yeah. And then ultimately if you get an investment in your strategy, you get to pocket 10% of your algorithm's profits without investing your own money. So as a marketplace, we have a second side. The second side would be investors. In our case, institutional investors. What we can offer them is a huge variety of uncorrelated quantitative trading strategies

At the moment we have about 900 trading algorithms from more than 2,000 people. So not everybody has submitted something so far. And they can find systems that complement their existing portfolios best. So that's really the value add. Depending on the investor, they might have different portfolios. Let's assume you run a family office. You hold a couple of stocks. You're very correlated to the S&P 500

So what you're looking for in order to diversify or to improve your portfolio is a trading algorithm or a strategy that is uncorrelated or even negatively correlated to the stock market. So you're looking for something that makes money or is profitable in years like 2008, 2009 financial crisis. And that's what we offer institutional investors. A huge variety of uncorrelated trading strategies. They simply can invest in one of the strategies. We handle a trading operation for them. They don't need to worry about anything. We do that for them

And then they only pay fees to us if this strategy is profitable. So the interests are perfectly aligned. We and the quant only make money if the investor makes money. Which brings me to the business model. The investor bears all the risk. So the money comes from institutional investors. And they get to pocket 80% of the profits of the algorithms and split the other 20 to equal parts with QuantX and the offer of the strategy with the quant with you. At the moment, we are still a proprietary trading firm

We trade seven algorithms with 5.5 million in futures with our own money. The benefit, the huge benefit for investors is that we don't charge them any management fees. We're currently in the process of becoming a CTA. We are registered since last week. Yeah, which allows them, which allows us then to open a marketplace to institutional investors. Yeah, that's pretty much where we're at at the moment. So, in order to write trading algorithms, we empower you guys with market data and with free software that you can use to test, build and validate your algorithms. We are working with futures

We focus on futures and we have 49 of the most liquid US and European futures on our platform. You can download the historical market data of these futures. We have some 25 years or so for most of them in end of day resolution. And the reason why we work with futures or why we choose futures, futures are among the most liquid markets worldwide. So strategies on futures can handle a lot of money. And that's great because that's what institutional investors want to see. And if a strategy manages more money, that means that your cut of the profit is higher. Then futures are very regulated and standardized

This is also a very good thing because this way you have a very low default risk of the counterparty when you trade futures so you really can rely on liquidity. And they cover a very diverse instrument of assets. So we have foreign exchange futures like Japanese yen, British pound and so on. Then we have a couple of commodity futures like energy, precious metals. Then a couple of agricultural commodities like wheat, corn, oats, you name it. So all these assets, they are very uncorrelated. This is a big advantage of futures. So if you write a strategy that systematically works, you have the chance, a very good chance, that it actually works in every so-called market phase because there are so many markets

So it's not just a stock market that is representative. Okay, here is a little overview. I don't know if it can be read. It's on our website as well. So basically we focus heavily on US futures that are traded at the CME. And then we have a couple of European futures added recently for our last competition. A pretty diverse set of instruments. Okay, data alone does not do the trick

We provide you also with a framework to develop trading algorithms. And we simply have named that framework. It's a toolbox. It's a framework for writing trading algorithms, testing them, backtesting them in a standardized way. And at the moment we support MATLAB and Python. Or MATLAB and Octave and Python. Octave is the open source version more or less of MATLAB. And our goal is to support the full arsenal of those two languages

So we really want to empower you guys with all the tools that you like about your favorite programming language. At the moment we provide Python and we will add more languages in the future. It's free and it's open source. So you can take a look at how we compute a backtest. How we actually run it. And we're also of course happy to help you out with the logic so you can ask us questions in the forum anytime. And we're happy to answer them if anything should be unclear about how we compute a backtest. You can also tweak it and adjust it to your needs

We have built it for you so let us know what you're missing, what you want. And we're happy to include it as soon as possible. Okay, a trading system. This is something we need to define. A trading system for us is always one function. Either a MATLAB or a Python function with a specific template. So in order to be able to interpret your trading systems we need to have a convention or a standard of a function template that you can use. Since we don't look at your code, so your source code remains your intellectual property

We need to ask you to write your trading system function in a specific template. And this is it. So this is the MATLAB implementation. So you would have a function with two return values. This is P and settings. And then with a couple of arguments. And then a name of course. A function name

This would be a trading system name however you want to name it. And then a couple of functions that you can select. At the moment in this function header you can see this is primarily the market data. So date open, high, low, close, volume and open interest for futures. And then the settings. We'll come to settings in a bit. Date is a vector of integers in the format of four digits for the year, two digits for the month and two digits for the day. And then we've got the market data as matrices

So open, high, low and close. Where you've got a row for every market that you want to trade. Sorry, a column for every market that you trade. And a row for every day or every data point. And then we've got settings. is the struct with or the dict in Python with the settings of the simulation. And you work your magic in the trading system function. You can do everything with the data that you can think of and that languages support

And then ultimately you come up with a position vector P. This is a percent allocation of your available assets at time t to the markets that you want to trade. That's the return vector P. So we call your trading system function every day and we ask you basically to tell us what kind of positions do you want to hold in your portfolio tomorrow from the markets that you have selected. So think of P as a vector of weights. We take your P, we normalize it to sum of absolutes equals one. And that's how we allocate your available capital at time t to the assets in your portfolio. OK, let's get to settings

can be used to define what kind of markets do you want to trade. So you can of course select from the markets that we support. You can build your portfolio. Maybe you don't want to trade for an exchange futures but only bonds or only index futures. So build your portfolio. Then in settings you can answer the question how much data do you need in order to compute your position. So typically a quantitative trading algorithm does not depend on all the market data since inception, since it exists. So your decision to buy gold tomorrow usually is not dependent on the value of gold in 1980

So at some point historical data becomes obsolete. So this would be your look back period or your look back window. So usually trading algorithms depend on a rolling set of data. This is what you can define here in settings. Yeah, and then it's good practice. And I can only strongly recommend and suggest that. Regardless of what method you use for quantitative trading, save some of the data for an out of sample test. So don't use all the data that's available to build your and test and optimize your algorithm, but save some of the data for an out of sample test

This is the closest you can get to a simulation on live data, on new data that your model has never seen before. So it's good practice to save a chunk, a portion of the available market data, let's say a year or two years, ideally at the end, for an out of sample test. And once you're finished with developing your algorithm, take a look at the performance of your algorithm on the out of sample data. Yeah, and unfortunately in approximately 70% of the cases, you'd be surprised that your algorithm will not perform very well on the out of sample data. So this is one of the pitfalls that should be avoided. Overfitting, especially with powerful machine learning methods. And an out of sample test can be a very good indication of whether you have overfitted or not. Yeah, and then ultimately, of course, settings can also be used to define the transaction costs

So if you're interested in trading, you're interested in trading, you're interested in trading, you're interested in trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading, trading And then maybe interesting for machine learning people, data scientists is how can I work with just the market data without running a backtest? So how can I come up with a model? You can download the market data and everything on your computer so there are no hidden connections to any spooky quantics cloud. Everything happens on your computer, on your machine locally. So you can simply download the market data with our embedded load data function. And load data expects as arguments what you define in settings. Basically. So this is how you can call it. And the additional argument one would denote that you want to download the data from the server. And refresh it

So it's updated daily on our data server and you can simply download it and force a refresh. You can also of course look at all the functions in our toolbox. So also at load data. And utilize parts of it for your own scripts to grab the data from the server. From our servers or from anywhere else. All right. Are there any questions to that part so far? Yeah. I'm a little confused about when you do the slippage computation

Is it time to call or is it only the p's or range or what is it? Okay. That's a very good question. When do we do it? Yeah. For the video. When or how do we compute the slippage? At what point and to what extent? Yes, it's correct. We compute the slippage whenever the position changes. So for every delta of p we compute slippage of the day where the order is executed. Yeah? So when you say like long, short, is that like specific duration or is that not? Also a very good question

No. That refers to the direction in which the market is going to go. So if you go long a market that simply means, think of it in terms of stocks, you simply buy the stock. And you wait until the price rises and then you sell it. This would be going long a market. So you speculate on rising prices. Going short a market or shorting a market means that you, so to stick with stocks, it would mean that you would sell a stock that you don't have yet or that you borrowed actually and buy it back later. So you would profit from a falling course

And that's shorting basically. Futures have the nice property again. So we focus on futures for a variety of reasons. But futures have the nice property that they come with a natural short. So one futures contract, every single contract always consists of a short. So there are always the equal number of longs and shorts in the market for futures. So that's why it's very easy to speculate on falling prices with futures. Okay

Any more questions? Yes. For your trading, do you only enter and exit at the open or close of the day or you can set up a stop or limit where you can enter in the middle of the day? Okay. If we, the question was if we support stop and limit orders to enter and exit the market in the middle of the day or if you only execute it at the close or the open. At the moment, we execute everything pretty close to the open. So there are no intraday orders. You compute your position for the next day with the knowledge of the settlement. So with the knowledge of the close. Then overnight the positions are computed and are executed at the next open of the next session, basically

This is necessary to some extent. We are working with institutional investors and we need to protect their interests. And that means that we need to have a certain amount of discretion of when we actually execute the trade that your algorithm computes. So if you would know that a big party would enter the same market at the exact same time, like you could arbitrage them or front run them. So we need to protect our institutional investors from that. That's why we work with daily data, protecting their interests. We have more discretion of when we actually execute the trade. So it's not possible at the moment to do intraday trading

Also not with limits and stop orders. Yes? I saw on your website you supported the TensorFlow. And I was just wondering what version of that and also can you run any arbitrary Python library or limited to including certain libraries like TensorFlow but not . OK. The question was TensorFlow. Yeah, we support that. That's on our website. What version? Good question for Novi

The most recent one. Generally, also for Python, we work still with Python 2.7 and not Python 3x. Yeah, and the second part of the question is we try to support all the libraries that are out there. If they're not listed on the website, we simply link them in or include them in our backtesting framework if they're safe and stable enough. That's basically the only criteria. OK. Yes? What other data sources do you have available other than just the price? I mean, yes. Yeah, for our competitions, nothing other than the price at this point

However, for your own backtest, you can work with any data that you want, any data that you can grab from the internet. You can use our load data function. You can modify it and work with it. So, for production, it's pretty critical because we need to be able to rely on the data sources that we provide you with. So, if you use your own custom data source, we cannot vet all the data sources that are out there. We need to have access to the data source in production. We need to have redundant access to the data source in production. And we need to know that this data source is for real

You could link on any discretionary traits that any trader has made as a data source, basically. This would make backtests useless, basically, if it would allow other data sources than our own. We're working hard to include more data because we understand the demand for much more data than just the market data. So, at the beginning of the slide, you show you trade 7 million of your own money. How are you guys doing that? At the beginning, we showed we trade not 7, but 5.5 million in futures of our own money. How are we doing with that? Good questions. We had, actually, today an all-time high day overall, again. So, all the strategies pooled in our portfolio

We had another all-time high day. So, yeah, thanks, we're doing pretty well. Are there any, like, computational complexity requirements for the algorithms? Okay, are there any computational complexity requirements for the algorithms? Only runtime-wise. So for the competitions, also for the competitions only. So if you want to use our marketplace, you can pretty much submit anything. Eventually after a couple of hours, you might run into a timeout and we will contact you and ask you if you could speed up the process. But for the competitions, we have a strict runtime limit of, yeah, not so strict, but runtime limit of 10 minutes on our cluster for every strategy. So this is usually 30 minutes to an hour on a normal computer as a runtime limit

But no complexity. So whatever you want to do in that hour is up to you. But at the beginning, you showed us the . Yeah. Sure. It's not exactly that code, but it's close. Okay, the question was, I showed a piece of code that had apparently this or a similar equity curve. Which was that? So, yeah, this is pretty much it

This is, I guess, the system that nobody or not, no, you won't show that system. Oh, unfortunately. Okay. It's a trend-following system. It uses RSI indicators. So trend-following classical technical indicator plus one more function that we haven't showed you here, unfortunately. But it's up to you to find it out. So it utilizes a little more than what's standing here

But the equity curve is real, and that's a backtest of 25 years. And compound interest is a nice thing, and that's why it's 5,921 or so over 21 years. Okay. The presentation will be available afterwards, so you can start from there. Okay. Any more questions to that part? Yes. Who owns the model? What's the provider? If Geni wouldn't take his model and just do it somewhere else? Yeah, he could. The question was who owns the IP? Yeah

You, as developer, own the IP. However, if you upload it to our marketplace, you grant us the right to utilize it and to market it. That's it. But you could take it and market it somewhere else. You could trade it for yourself. That's great. Yeah. It's yours

Yeah. Is there any precaution that you'll prevent the hackers from hacking your code? Yes. The question is, is there any precaution from preventing hackers hacking our code or the code of other quads? Yes. There is. I cannot go into details, obviously, about that. But yes, security is an issue. We basically run untrusted third-party code. That's correct

So security is an issue. And we have procedures in place that protect our interests and the interests of our quads and of our investors. Yes. You mentioned run time limit details. Can you go into a little more detail on how that's calculated? Okay. Run time limit details. How it's calculated. Basically, we execute your algorithm

It's in a black box for us as well. And if we don't get a response after a while, your algorithm is apparently in a timeout for us. And you would get a notification, okay, evaluation failed on our backend. That's a daily batch thing. Yeah. Okay. What about the backtesting? Is there a runtime limit for the backtesting? On your computer, there is only the runtime limit of your computer's capacity. On our cloud, yes, there is the runtime limit of roughly comparable to one hour on your computer

And after that, your algorithm would most likely run into a timeout. That's for backtesting? and also for all systems on our platform. The reason behind that is not that we are greedy with computation power, but we eventually need to rerun all the algorithms on our platform. If data changes, if something happens in production, whatever. We could be forced to rerun, reevaluate a thousand algorithms. And in order for this not to take a week, we have to limit it to some extent. Okay. One more question if there is any

Otherwise, yes? How is it a black box to us? You submit us the source code. So technically, if we look at it, it isn't. In our user agreement, it's pretty clear in which instances we are allowed to look at your trading system. And this is basically something fails in production or if you have reason to assume that you're trying to mess with our framework. That's pretty much it. But other than that, we run it. We have, to this point, we have a thousand algorithms. So it's humanly impossible to, even if we wanted, yeah

And we don't want to look at every single one of them. So we run them in a safe environment, evaluate them, take the results, and that's it. Is the presentation going to be posted? Yes. We will make the slides available after the session. Tony will send out an email and we all read Tony's emails. Right? Cool. Okay, then, ultimately the question is, how good is a trading system? So once you're done with your research, once you came up with a hypothesis, you want to know how good is it. So there is unfortunately no universal number that tells you everything about the quality of a trading system

So, because there are so many factors that you need to consider. First and foremost of all is, of course, performance. So, how much profits did the algorithm make? Profits alone is a poor measure because you need to relate it to the risk it took you to achieve those profits. So, if you made a million in the markets, that's awesome. But if you have to risk a billion for it, it's not awesome anymore. So, that's how volatility comes into the equation. Volatility is the risk. Think of it as a risk of your trading strategy

It's the standard deviation of the returns for us historically on the data. Yeah, and volatility is once estimated, a pretty good estimator also for the future results of the trading algorithm. So, it's much harder to estimate direction compared to volatility of a trading algorithm. Yeah, then of course, alpha drawdowns of an algorithm. It could be important to look at. And then, of course, correlations. are really a key metric to the quality or to the relative value of a trading strategy. Trading strategies, even if they have a high performance and a low volatility, if they are very correlated with what everybody else can trade, like the stock market, then they are not as valuable as a strategy that might have a lower performance and volatility, but is negatively correlated to the stock market

It has a higher relative value because not everybody can do that. You can diversify stock portfolios with such a strategy. So, even if you come up with a strategy that has, I don't know, a performance to volatility ratio or a sharp ratio that we are going to discuss in a minute of only 0.5, it still could be very valuable for some investors because of its correlation properties. So, if it's negatively correlated to what the investor holds in his portfolio, it can actually be a valuable contribution. Yeah, there is no universal performance metric and we have again the bug with the formula, unfortunately. It will not be in the poster slides. Yeah, the sharp ratio, think of it as a performance volatility ratio. So, we take the performance of the strategy and divide it by the volatility or risk that it took us to achieve that performance

That's called the sharp ratio and that's a pretty good start to assess or measure the quality of a trading system. We take, for our internal score that we use on our platform, we take two different sharp ratios. We take the sharp ratio of your trading system in a back test, so all the data that has been available to you when you build the strategy, and compute the sharp ratio, so the performance volatility ratio, and then we build a second sharp ratio, which is the sharp ratio of the performance of the strategy. Which is the sharp ratio of all the data that came after that. So, of the live performance of your algorithm on data that you didn't have when you built the algorithm. Second sharp ratio. We take those two sharp ratios and the lower one of them is your score. This way we punish overfitting, because overfitting usually has a great back test, but a very bad life result

And we reward consistency. That means if your trading system actually works on live data as good as it did in a back test, that's a very good thing. And that's also what investors want to see. So we take the lower of those two numbers, the lower of your back test and your live performance, and that's your score. And that's how we rank the systems on our website. The score is not perfect, it's not brilliant, but it's a good start to give you an idea of what investors are looking for. They are looking for consistency in results, in trading system results. Okay, which brings me to good practice and pitfalls

I've worked in the industry as quant for almost 10 years before I started Quantix. And I can tell you from my own experience that overfitting is really the natural enemy of quantitative trading. The more complex the method is that you use, the easier it is to retell the past perfectly, to retell the history perfectly. With very complex methods, with many degrees of freedom, a lot of parameters, it's very easy to retell the past. You can always build a straight line between two data points, you can always build a polynomial of degree two between three data points and so on. So the more complex the model is that you apply on the data, the better you can describe it generally. But that does not necessarily mean that it has a higher predictive power. So what you want to do is start simple

That's really very important. Start simple. There is a lot of noise in financial data, especially in futures data. Futures are the most efficient and most liquid markets in the world. It's the playground of the pros. Very efficient markets. Start with a simple method, with a simple assumption. And go there from simple to complex

So overfitting is really the natural enemy. We have seen many systems, of course, and I, in my active time as a client, also had the problem. You think you have an effect. It's very plausible. It's reasonable. You've tested it. You try to avoid overfitting. And then you run an out-of-sample test and then you see nothing is there

Nothing is there. So you've overfitted the past. You've retold the history pretty well. But actually you were not onto an effect, but you found an artifact or whatever in the data. So overfitting is really tricky and the natural enemy. And one good way to get an idea if you're a trading algorithm is overfitted is an out-of-sample test. That's the closest you can get to live trading. Yeah

Then, of course, stability. So how stable is your algorithm? How does it react if you modify either the input data by a certain threshold or percentage? Or if you modify or change the parameters, let's say 10%. So does it still produce a good result or does it do something completely different? So this is also something. Stability of an algorithm. It can be a good indicator of how well it will work on live data. Yes? How much do you encourage or discourage people to actually model black swan events in your data so that using product, for example, like the crash in 2008 or something? How much do you like? Okay. How much do we encourage people to model for specific events like the crash in 2008? The crash in 2008 is just another market phase. We have 25 years of futures data

So ideally your trading algorithm is able to handle all kinds of market phases. And ideally you won't even see 2008 in the equity curve of your trading algorithm. I would not recommend to model a system to one or two or three specific events in the data unless you particularly want to build an algorithm that is, for example, negatively correlated to the stock market by design. But otherwise I would not suggest to do that. The more general your solution, the more general applicable your solution is, usually the better it is. Because the more confidence you can have in it that it actually predicts something in the future as well. Another thing at this point, don't expect easy gains. So quantitative finance is a business

It's a tough business. A lot of very smart people do nothing else but that all day long. So don't expect easy gains. It's absolutely normal that 70 to 80% of your ideas, as bright as they might have been, simply fail. And that doesn't mean that you did anything wrong. That simply means you need to go back to square one. Your idea simply does not work. Don't be frustrated

That's why not everybody makes it in quantitative finance. You need to be pretty resistant to frustration because 80% of the ideas that you test actually fail. But the other 20 are then very rewarding because they actually work. So no easy gains, unfortunately. But on the other side, don't be intimidated. You will see as you start working on it, you will see how even very simple ideas can give you very good results right away. Yeah, and then there is another thing that I would recommend to avoid, which is the market selection bias. So this is very popular and common among stock traders

Of course, I build a trading algorithm on Apple because I know that Apple is a great stock and who would not have bought Apple in 1990 or whenever. So this is market selection bias. If there is no quantitative reason to choose Apple, don't do it. Simple as that. So avoid that because that's a form of survivorship bias. With futures, it's a little easier because it's very unlikely that futures markets, specific future markets, specific future markets cease to exist. Eventually we're going to run out of crude oil at some point in the future, then there might not be a crude oil future anymore. But there is no such thing as survivorship bias usually for futures

So it is possible for futures, but also if you select certain or specific markets on futures, I would recommend not to pick single markets, but rather groups or baskets of markets. So if your trading algorithm works very well on, let's say the British pound, but it doesn't work on the Australian dollar. Then again, it works somewhat on the Japanese yen and not at all on the Euro. Then you should rather question your strategy than just trading the British pound or the Australian dollar. So selecting whole baskets of assets is a good thing. So there might be a fundamental reason why your trend following or whatever strategy works particularly well on bonds, but not on the other asset classes. Okay, so then let's trade it on bonds. But simply selecting the 10 year note and discarding the five year note is usually not a good idea

So these are some tips that are generally good and valid for quantitative trading. Are there any questions to that? No? Okay, cool. Then I say thanks for your attention. You can ask questions at the end of the session and I'll hand over to Novi at this point for a live demo. Thank you. So I'm going to go pretty fast because it looks like we're running behind. I'm just going to give a quick demo of how the workflow or how I use the toolbox. So let's exit this guy

So you can download the toolbox from the PIV installer if you're a Python user. And I like to use the toolbox from the command line. So typically... There we go. Yeah. I'll make this bigger too. Okay, so yeah, you can install it from the PIV installer. It's PIV install Quantix toolbox

It covers all the dependencies. To run a trading algorithm, you just import from the Python command line, Quantix toolbox. And then... To evaluate your strategy, I'll save your results. And then I'll put my demo strategy in. Okay, so here I'll evaluate a RSI example. This is what Martin showed in the beginning. But the strategy that I'm showing is not quite the same

The way it works for... Yeah, for evaluation is typically I just run everything from one Python file. I define my settings as Martin described. And then the trading system. So here I use the RSI, which is an old school technical indicator. I use it on the close. And I use it as mean reversion. So basically I say that if the RSI is a high number, I'm going to expect it to go low and vice versa

The RSI is calculated based on momenta. We'll put this in the notes from the presentation so you can see that. But basically, yeah, that's how it works. So we can evaluate the trading system. The toolbox will either download or load all the data into the background. And then give you the performance of your trading algorithm. It gives all the kind of pertinent statistics that we care about, which is the Sharpe ratio, Sortina ratio, yearly annualized performance, drawdown, and the longest drawdown duration. It shows other useful things like your long-short split, as well as how your performance was market-wise

So you can look through and see how your strategy is working on a market with different fundamentals. And then you can show the short as well on both sides. Finally, if you want to submit, sorry about this bug, it's based on how Anaconda builds Python. So if you want to submit, same thing, quantity X toolbox. Sorry. And then the path to your trading algorithm. And then what you want to call it on our platform when you market it. This will submit it and open a browser window that shows you your strategy

Yeah, so I'm happy to take any questions. I think it's probably more interesting to hear Jenny talk about how he thinks about machine learning and writing strategies. Go ahead. So what's the buyer's experience? He looks at, he goes to broadcast, looks at available quotes, and then he says, I like this one. Yeah. And he gets the hydron file itself. No, no, no. So to preface, at the moment, as Martin said, we're only a prop shop

We've just finalized the legal infrastructure, so we'll be opening the marketplace soon. For the buyer, they'll be able to see all of the available strategies and be able to filter through them. So I'm showing those here. So besides the graph and the metrics, is there anything else that describes the strategy? The buyer makes an informed decision? Question. Yeah. So he's asking about the buyer's experience. If there's any other details, we provide the buyer about the strategy. So we provide them a lot more than many quantitative hedge funds provide

So we give a large back test, general asset allocation, long short information, and then a good number of statistics. There's no specific details about how the algorithm runs, and that remains your intellectual property. It's also of your best interest because you want to buy a living law. Right. You're in the program as a store line. Yeah. So Bill's commenting on how we're trying to protect the intellectual property by not sharing too many details with them. To further that, we take care of all of the trading for the buyer

So they'll open an account, give us power of attorney, and then we'll execute trades on behalf of that account. So they'll never have access to your source. Go ahead. Is there any way to carry your algorithm side by side? Maybe with a hand up or just kind of have a competition? Yeah. So the easiest way at the moment is to filter by performance. So you can look at these. We do have functionality ready that we can implement so you can compare two equity curves in the same graph. So

What about like other quantitative hedge funds? Yeah. So there are some, we'll add indices as well. It's hard to get the historical performance of hedge funds. They're very secretive about this and most don't even show the full performance. But the Sharpe ratio kind of indirectly goes here. Yeah. Given, yeah, general sense. Right

So that's a good question. Yeah. How do you get paid to close someone and lose their all the money? Mm-hmm. For a month, it makes a lot of money. Are you losing capital fees? Are you paying? Yeah. So the investor takes on all the risk, like we said earlier. And then we calculate fees based on a daily high watermark. So for every new high at the end of the day, we calculate the fee based on that

Yeah. And then pay out to the quant. Mm-hmm. That's such. It's possible that they'll redeem funds. Yeah. So there's a cut off point that you get rid of that rate of life. Can you, sorry, can you repeat the question? How much they lose, they get rid of them? So the question was, is there a cut off for, sorry, I haven't been reading the questions

Yeah. So the question is, essentially, what is the max drawdown we allow? We don't limit the drawdown that someone has in live evaluation, but it's unlikely to receive investment. So there's some natural selection on that. In the back? Okay. What's the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the It depends on how you make the strategy. So if it's overfit, it's unlikely to have good performance in live evaluation. So we're looking for strategies that have similar performance in the backtest as live evaluation. I guess I have a slightly, you have the same question from a slightly different angle

How many algorithms do you have in your marketplace? What percentage of them are actually lost? Yeah, so the question was how many algorithms are in the marketplace and what percentage are invested in or good? So we've got about 900 submitted algorithms. Roughly 10% of those are suitable, viable algorithms. A lot of them are, many of them are, you know, sample systems that we've submitted as well. And then of course many are overfit and other things. So if I upload my algorithm, even though no one invests at it, I just kind of see how it's doing on a daily basis. Yeah, yeah, yeah, we update everything overnight. So in the morning of the next day, you'll see the most recent performance. So these are upgrading algorithms? Can be external calls from VRs? No, they cannot

So I think Martin commented on this a little bit. As a sort of fiduciary responsibility to our investors, we don't allow external network requests to anything. We're working hard to provide more and different data so that you can make strategies on this. But yeah, we can't allow that. But if I had different data, like tweaked data or something like that in any way, like packages in my code, just not make an external call, but it's sort of just bundling like this huge sort of like... Sure. Yeah, so you can find anything you want in the settings definition. So for machine learning purposes, you can find network weights or something like this

You can also submit extra files that have a much larger network that's hard to serialize. Are they in a site? No. As far as tweet data, maybe it's...you don't get the live update, so maybe it's not so useful. But...cool. We'll take one more, I guess, and then...in the back. Okay, is there any other way to cross-validate the data? So the question was, is there any way to cross-validate the data other than backtesting? I can't think of one on the top of my head. One of the best ways to cross-validate is both having an out-of-sample test and then the live evaluation. So kind of forced out of sample

Okay, cool. So next up is Genia. We'll get to the meat of the night.