BIRTH OF AN ARTIFICIAL INTELLIGENCE (AI) TRADING COMPANY:
BIRTH OF AN ARTIFICIAL INTELLIGENCE (AI) TRADING COMPANY: PART I
The year of 2008 was supposed to be my breakout year. For the first time in 15 years, I was hoping to earn something meaningful that could compensate me for the time that I lost during the 2001 recession. After graduate school, I worked for small companies that didn’t pay much with small bonuses, not to mention a few years of unemployment with more than 1,500 fruitless job applications.
I graduated from Illinois Institute of Technology, receiving a Master of Science in Financial Markets and Trading degree in the summer of 2000. In October of 2000, a proprietary trading firm with 14 employees and 3 partners hired me as an equity options trader. I remember that I used to pick a building in the loop area, take the elevator to the top floor, and knock on every door all the way down. If you know Chicago, its financial district has mid- to high-rise buildings. It is very compact, and in an hour, you can easily walk from its beginning to end. Of course, after September 11, this strategy wouldn’t work, as you wouldn’t be able to get past security without an appointment.
I found this company on my 11th building where the Chicago Board Options Exchange (CBOE) was also operating. They were looking for a trader and actually thought that someone referred the post to me. I really wanted the job, even though the salary was 40% less than an equity analyst job. My first salary was $36K. I hit it off with the partners right away. They told me that I was chosen among nuclear physicists, MIT graduates and such, which was nice to hear. This was the time where I was heavily indebted because of the cost of graduate school, not to mention the risk that I took in changing careers from civil engineering to the financial world.
Two years ago (1998), I was paying salaries to my small staff as a partner of a Turkish Home Builder firm. It was hard to start from scratch again, but I was still young (31). It didn’t bother me. After all, I had decided to change careers and earn a Master’s Degree at Illinois Institute of Technology (IIT) after realizing that I enjoyed trading stocks more than construction management.
I was lucky to have worked with a company who had a competitive edge. The partners were quite visionary. They saw that floor trading had no future and moved to electronic trading before anyone else. The firm had proprietary models that showed price discrepancies between exchanges. Thus, you could buy an IBM call option from one exchange and sell it the next second from another exchange, making a profit with minimal risk. For awhile that meant that I too could be profitable. In six months, other companies caught up and the exchanges woke up to this. Subsequently, I had to find my own ways of making money. All in all, I survived until April 2002. I wasn’t able to learn volatility trading in one and half years. I wasn’t that bright. I think a trader needs four years of a bullish market in his first gig. That’s barely enough to get a feel for your strengths, weaknesses, and trading style. Unfortunately, I didn’t have that luxury, along with many others.
When I was laid off, I wasn’t ready. I didn’t know what recession really meant for a job hunter. Knocking on doors was still possible to a certain degree. It was after September 11, but probably half the buildings in the Chicago loop area hadn’t yet installed security checks. I actually received an offer within a month from another proprietary trading firm. This time it was in the Chicago Mercantile Exchange (CME) Building. Altea Trading, which is quite big now, was as different as day and night to my previous firm. They were not offering any salary. It was a profit-sharing deal. The company would get 60% of my profits, leaving me with 40%. However, they also keep half of the trader’s share until the end of the year.
I was supposed to trade German Bund futures during the night shift. The firm didn’t have any proprietary models. As a day trader, my job was to make money without any edge. As you can imagine, I didn’t have much confidence in myself, especially as I had just been laid off. The other thing was that until that time, I didn’t have any savings. I was paying back my debt with every extra penny that I had. Well, that worked well. So, I couldn’t say YES. That decision cost me two painful years of my life.
Joblessness can be divided into four stages, at least in my case. At first, you are hopeful, still optimistic. You have the courage to face people, to network. The second stage, after a year, you don’t want to talk to anyone, completing applications only via the Internet. In the third stage, you are just an angry, bitter man. I was. Through the fourth stage, you mature spiritually. You admit that being emotional only hurts you, regardless of how good a person you are and no matter how many times you say to yourself that you didn’t deserve this. You learn to compartmentalize your emotions. While one part of you is miserable, the other part knows that you have to keep on going and push forward.
Actually, all you have to do is find your way of looking for jobs. Try many different things and learn to improvise. One of the things that I tried was waiting outside the studio for the commentators of a local financial TV Channel (WebFN TV). I introduced myself, and after a short chat, I asked for a job. One portfolio manager I met had just $1.0 million in client money. We kept in contact. A year later, he had reached $20 million. I offered to work for free, along with four other money managers such as the famous Harris Associates in Chicago. The funny thing is that when you are jobless, you are not even wanted for free. Anyway, the guy (Ricardo of Ativo Research) with $20 million decided to give me a shot and accepted me as an intern analyst in July of 2003.
Ativo Research (previously Callard Research) had just two partners and a receptionist. The firm was a quantitative equity research company, which owned a proprietary valuation model. Financially, it was weak. The chairs were so old that it was surreal. I had a 13-inch monitor where the colors blurred every once in a while. It turned out that my PC was actually an abandoned PC from the office next door. They moved away and left it there. I had to work seven months for free until I proved myself useful and the company earned the money to pay me. After six months, I had to bluff my boss, Chuck Callard, to hire me, telling him that otherwise I would leave. He agreed to hire me and applied for a H1-B visa. As insult to injury, I had to wait another six months to be paid because the quota for H1-B visas was already used for the year. As you can imagine, my bitterness just kept growing. The four years that I worked at Ativo, were in many ways a healing time for me. It served as sort of a transitional period where I recovered from my wounds and returned to normality. Luckily, the firm also prospered modestly during those years.
We used to sell research to a New York Hedge Fund, Nile Capital, whom Ricardo knew the manager of from the University of Chicago. Knowing I wanted to be a money manager, the hedge fund manager hired me as a research officer in December of 2007. However, January 2008 brought the end of my dreams. In my second month, before I even picked any stocks for the fund, we were down 10% because of the short squeeze in banking stocks. I knew that it was going to be a wasted year. Luckily, my wife hadn’t moved from Chicago and that turned out to be a wise decision. We tried to catch up the entire year, but couldn’t achieve anything. In the end, I lost my job in December of 2008 and returned to Chicago right away.
In May of 2008, my old friend, Cagatay, whom I had started trading Turkish equities with using technical analysis back in 1993, called me to say that he could see the future. What he meant was that he could predict prices with high probability. I had known Cagatay since sixth grade. We had attended the same private high school in Ankara, a city with a population of four million and the capital of Turkey. We were also classmates in civil engineering at Middle East Technical University (the Ivy League of Turkey) in the same city.
Cagatay was sort of the techy guy among us, a serious programmer even back in 1988. I remember during the last year of the civil engineering program that he was developing an inventory management program for the pharmacies that would use barcodes. While this is a standard product now, it was first applied in Turkey in 1991. He had three more partners, all final year students from medicine, industrial engineering, and business administration. That venture failed due to marketing. It was probably too early for neighborhood pharmacies back then.
I also remember him taking robotics classes from the Industrial Engineering department. That’s when he first got hooked up with artificial intelligence. He used it to build a computerized soil mechanics laboratory as a graduation project. In the year 1991, that was huge. This was the time when we had 286/386 microprocessors. There was only one more laboratory like that in the world, to the best of our knowledge. The other was by Mitsubishi of Japan. He didn’t end up in Silicon Valley because there was none in Turkey. Instead, he worked as a civil engineer during the day and continued building stuff and coding at night. In 1995, using artificial intelligence, he built a smart car with an electronics engineer from Istanbul that could memorize and learn its path while making smart decisions to reach a location. Unfortunately, that venture also failed due to lack of financing for marketing.
Cagatay also had a love for trading. He enjoyed the searching for patterns and the mathematics behind it. He started trading Turkish equities immediately after college during the summer of 1991 and has been trading every since. He is actually the one who hooked me up with technical analysis in 1993 after I graduated from university. He gave me a technical analysis book by a Turkish/Canadian nuclear engineer. We used to meet at his parent’s home and talk about the markets and individual stocks at night. It wasn’t sophisticated. We didn’t have a reliable strategy back then. We made some money here, and we lost some money there. I didn’t trade much in 1993 because the construction company I worked for sent me to Moscow, Russia at the end of 1993. Cagatay continued trading.
In 1995, I was back home with some money in the bank. I was a partner of a home building firm and busy for the first two years. In 1997 and 1998, we were trading together again for our own accounts after hours. This time, Cagatay was ahead of me with respect to technical analysis knowledge. I didn’t think that technical analysis was working. When I moved to Chicago in February of 1999, I sold my car and left him some of my tuition money so that he could manage it until June, when my next tuition payment was due. He made 30% with my money by June of 1999.
I tend to think of the Turkish financial markets as a yo-yo. The Turkish equity market tends to have long swings with huge rallies that are followed by significant bearish moves. Thus, when the market was bullish, Cagatay was into trading as a night job. When we had a bearish market, he was spending his after hours on his futuristic projects. This guy works non-stop, but I think you got that already. Anyway, let’s get back to his forecasting abilities. Well, after knowing him for so long, I knew the one weakness he had. He sometimes gets ahead of himself. He wanted to do something together. I didn’t take him seriously, of course. I declined his offer politely. He could see the future. Yeah, right, and I am George Soros.
After the lucky hedge fund episode, I looked for jobs in Chicago for six months. I did that just to make my wife happy, knowing it was going to be a waste of time in a recession, especially after such a financial meltdown. I had been through that before. I was a trader in the previous recession and lost my job in 2002. Job hunting during that period was one of the most painful experiences in my life. Fool me once, shame on you; fool me twice, shame on me. So, in July 2009, Tarcan Capital was born with resistance at home. My wife wanted me to find a job. She didn’t want to be the only breadwinner, as we were expecting our first child. Understandably, this would have been too much stress for any pregnant woman. I promised her that if the venture didn’t make money in one year (by July of 2010), I would shut it down and start looking for jobs again.
The firm was an Illinois Registered Investment Adviser. Basically, a one-man equity portfolio management company operating from a home office. Well, the logical strategy in setting up an asset management firm is to start with seed capital that will help pay the fixed costs. That wasn’t an option for me. I was an immigrant from Turkey with a sharp accent who happened to have never interacted with clients before, not to mention an asocial wife who needed me at home at all times. Katerina didn’t have any friends in Chicago. Her friends were spouses of my friends who had moved to NY or other cities for jobs. She was missing her friends in Greece. I was both her husband and only friend, meaning that my networking had been minimal. In short, my first decade in the US had been about survival, not about socializing. If you know our industry, you will appreciate that it is all about building relationships. Tarcan Capital had to climb the mountain of fundraising with me in the driver’s seat. I knew it was a tough proposition, but it was a lot more satisfying building a company than job searching and hoping to be hired.
At the same time, I was questioning intellectually the aftermath of the financial crisis of 2008 and the new paradigm in asset management. In 2008, I felt that if you were a long/short equity hedge fund, you were not diversifying for your client. My approach to portfolio management has been fundamental to my stock picking with a macro view of economy. I always tried to see the big picture. The big picture was that there was a new world. Traditional asset classes have high correlations at times of stress and collapse at the same time, even when you think you are diversified and well covered. Therefore, Tarcan Capital became an alternative investment management firm. Alternative investment is a broader term used to include hedge funds, private equity, real estate, managed futures, commodities, derivatives’ contracts, and other complicated tangible or intangible investments.
During this intellectual questioning period, Cagatay kept calling me about his model. When he first offered to do something together in 2008, I didn’t pay attention to his strategy. In 2009, it was a different story. I was ready to listen. When he told me he was combining artificial intelligence (AI) with mathematical pattern recognition, the bells rang in my head. I didn’t have a clue what AI was, but even the name sounded interesting, and I was sure it would interest any sophisticated investor more than equities. I am not a big fan of back testing. Only live trading could convince me and that’s what we did. We borrowed $40K from my wife, and in February of 2010, we started live trading.
In about three months (66 days traded with an average of 16 trades per day), the balance was $62K. Ladies and gentleman, we were back in business. I was convinced that Cagatay had a working theory. Out of 1,092 trades between 02/12/2010 and 05/25/2010, 75% were profitable. The average of the profitable trades was $58, whereas the average of losing trades was less ($42) with an initial capital of only $40K. The maximum profit from one trade was $1,514, and the minimum was $1,335. The numbers actually scared me a little bit. The percentage of profitable trades was insanely high. Cagatay had written almost 10,000 lines of code. He called it Robot.
The Robot develops mathematical expressions that describe patterns of predictable market behavior. It uses a machine-learning branch of artificial intelligence to do that. AI facilitates the ability to detect and extrapolate patterns before they are obvious to the human eye. The model uses stored tick data to answer questions and to draw new conclusions. A huge amount of data is required for both learning and testing. Even the sub-second analysis of this data by itself is a huge undertaking. Expertise in high-speed data storage and retrieval is crucial. You cannot do this in Excel, SQL Server, or Matlab. For every tick data, the robot runs a sub-second analysis, forecasting the price targets at 1 minute, 5 minutes, 60 minutes, and 24 hours, while also making buy and sell decisions autonomously. There is no human intervention or input. I understood it had pretty good success ratio and risk management principles, as well. The model worked on spot gold, oil futures, Dow Jones Futures, and perhaps more. From that point onward, the natural thing to do was to unite forces.
Many use artificial intelligence for financial markets, yet most lose money. Why doesn’t it work for most? Cagatay’s answer is, “To be able to use AI for analysis of financial markets, your first decision should be what will you analyze? Yes, we all analyze price history, but how do we go about it? What kind of model are we building? For the sake of discussion, let’s say a trader analyzes stochastic indicators’ correlation visually with prices and trades using the results. Using AI, he could catch optimum signals. Both ways he would fail, however, because you can’t make money using stochastic indicators. The secret is whatever you analyze; whatever your starting point is dictates your path forward. We are trying to catch patterns. The questions are what kind of a pattern, what’s the duration, what data will you use, etc…You have millions of choices. This is the secret sauce. Unfortunately, we cannot give any details here. Artificial Intelligence is just a toll to shorten the long journey. The gist of the model is hidden in the data filtered and results that come out. Of course, while filtering data, we used some futuristic algorithms, but the magic that lies behind the model is the model as a whole. Looking at the model just as a combination of AI and pattern recognition is too simplified. Every model carries the philosophy of the architect. There may be many traders using AI, but what are they modeling, which method are they using, and what are the principles set forth for analysis? How do they decide their trading strategy? Are they really good in trading? Ok, let’s say you get the signal. When are you going to close the position? Where do you put the stop loss? These principles are not always made by algorithmic trading. You must know how to direct your calculations to be able to use algorithms for these real trading decisions. You have to spend at least a year with me to learn this model.”
Cagatay was a self-made trader who never worked on Wall Street, for a hedge fund, or even in a financial company before. He was an executive at a construction industry in Turkey working in his day job as a civil engineer in places you wouldn’t even want to stop while changing planes (e.g., Jordan, Saudi Arabia, Nigeria, Afghanistan). The only good project location that he had been to was Germany. That must have been distracting for actually coding. He was building his models at night. Nothing had stopped him from building models, including the malaria that he caught while managing a project in Nigeria or building roads in a war zone in Afghanistan.
Once I asked him, “Dude, who would write computer programs on financial markets in places like that?” His answer was, “You had to keep your mind busy. Some people were playing video games. My interest was financial markets and robotics. So I was coding.” Due to past entrepreneurial hiccups (a cargo delivery service in Kazakhstan crushed by DHL Worldwide Express and a real-time technical analysis software service for the Turkish Equity Market crushed by Dogan Holding Corp of Turkey), he didn’t have capital. Although, I wasn’t an executive before, wasn’t not well connected, and certainly not wealthy, I was an insider. I knew the industry, had the ability to borrow from wife, and had drive. We were both frustrated by working for others and feeling as if we were not getting anywhere. We both had our own businesses before, which didn’t end as successfully as we had hoped. This was our moment. We were both ambitious and hungry for success. We wanted to build something big, bigger than both of us and bigger than anything an employer could ever offer us.
We didn’t have much money, so a proprietary trading kind of business where you accumulate wealth just by managing your own money was not an option. I knew that this was a hedge fund product. If we could package, execute, and market it right, this could be our lucky break. Since the model was trading spot currencies and gold as well as worked with oil futures and Dow Jones futures, it had tremendous capacity. Managing $1.0 billion was only a matter of time. Well, except that we were just two guys with $62K on May 2010. Not only that, Cagatay didn’t have any savings, and his wife wasn’t working. He needed income on day 1. I, on the other hand, had the luxury of a working wife. That made me, and indirectly my wife, the financier of the firm. My job was to take care of the business side, along with legal, accounting, financing, and marketing. Cagatay’s job was trading, monitoring, front office, middle office, back office, research, analysis, coding, testing, IT infrastructure, servers, Internet security—you name it, even client prospecting at times.
Now, that we had the model ready, what next? Well, just because you have a profitable model doesn’t mean that you have a business. The code was not initially designed for being a hedge fund engine. It could only manage one account. So, that had to be fixed. Then, we acquired our broker. The buyer tossed away our broker’s trading systems and replaced them with his own. So, we had to code for integration to the new trading systems, which took almost four months, during which trading had to stop. It takes time to adjust the model to a new platform every time there is a new broker. You have to test at least two months, if everything works fine.
You cannot make a mistake in execution for an automated trading setting. Let me give you an example using Cagatay’s own words, “In a similar platform change, we were just about to complete the last set of tests on a live $3,000 account. It’s 4:00 am, and I am dead tired. I fell asleep on my desk. The Robot was working. Around 6:00 am, I woke up and looked at the account. I thought I was looking at it wrong. The balance was $1,800. That’s a 40% drop in two hours. How was that possible? Even though the Robot had sent one order, the bridge closed the position and opened up another one. It had hundreds of trades executed in 2 hours. Each time it lost as much as the bid-ask spread. For 15 days in the demonstration account through the testing, nothing like this had happened. During Asian hours, the bid-ask spread became zero at some point. Our formula uses spread as a denominator. So, the result became infinity and the Robot went crazy. You see mistakes when events such as this happen in reality. You cannot be prepared for a zero bid-ask spread. Perhaps, it was a computer glitch. This was a good example of how you cannot rush platform changes and how monitoring is essential. No matter how automatic your systems are, there may be cases that have not been foreseen before and have not been coded accordingly”.
Returning back to me, as an industry insider, I knew that breaking the track record would be bad. I guess knowing is something, but understanding the consequences is something else. Looking back as the business guy in Tarcan Capital, it was my biggest mistake not to find a solution at that time. I was very worried about giving access to the model to a stranger and losing it. Of course, the main problem was that we didn’t have the money to hire a skilled developer. Changes had to be made, and there was no time to wait. When he first started, Cagatay had no way of knowing that he would end up as a hedge fund manager. Therefore, the making of the Robot was an intellectual project, and solutions to problems were more ad-hoc. It was time to turn the software institutional.
We didn’t have any servers. So, being the ace in the company, Cagatay self-learned servers, managing and designing networks along the way. He took care of it while working in his day job as an executive. Using the cloud or renting another company’s server was not an option. We spent serious time and effort on this to gain a super infrastructure and super fast connections. We managed ourselves. It was very hard, but it was the right thing to do. Since we manage client money, if something goes wrong with the cloud service or rental server, we can’t turn to a client and say, “We’re sorry, such and such systems failed in the cloud service or X-company.” At some point, it was too much to handle, and Cagatay had to quit his job in the summer of 2010. I freaked out, of course. He could only last three months with his own savings. We were not even a hedge fund yet. Setting up the server and IT infrastructure for managing multiple accounts took a while.
Towards the end of 2010, looking for a strategic partner seemed to be a good idea, which turned out to be a false start. Our financial picture as it was, we were not going to survive for long. Since the only evidence that we had was a three and a half months of return on a $40K account, we didn’t think that any US institution would be interested. So, we decided to knock on the door of the largest Turkish investment bank. When you call from the US and say you’re form Tarcan Capital in Chicago, it is easy to reach CEOs. So, I got an appointment easily, but I didn’t mention anything about who we were, what we did, etc. As the meeting progressed, the CEO called for VPs who were Wall Street alums and understood to a certain extent what we did. The idea was basically that we have this alpha machine; let’s set up the hedge fund for you, and we’ll run it. It would still be a US hedge fund with US clients, but most of it would be owned by IsYatirim Bank of Turkey. We lost six months going back and forth trying to show them live how it worked. They refused to pay even the $50K upfront for the extra work that we did to build an Internet interface to show them Robot’s action live. Six months later, we were nowhere near an agreement. We desperately needed new money. In May of 2011, we had to stop pursuing that route and get real. As always, I turned to my beloved wife and asked for help. We borrowed another $100K from Bank Katerina to open a track record account. In June of 2011, we started trading and that account has been our track record account for the last two years.That concludes introduction of our story. Episode II will be coming shortly.
For those, who may be interested in being a part of Episode III, we are actively looking to bring in additional technical partner. If you have extensive programming/ systems experience and some knowledge of trading/artificial intelligences then please send an email to firstname.lastname@example.org.