Tulip file of this project, Tulip file of the project . You can download directly.
All the related codes, pictures about this project are in this site: related codes
If the following pictures can't display normally, please refresh the page.
Algorithmic trading involves entering trading orders through electronic trading platforms using an algorithm which helps in taking into account order’s characteristic like timing, price, and the volume of the order. On august 31st, 2011, RYBN has launched the Trading Bot ADM8 on the financial markets.The motivation of this project is using data visualization to study the performance of this robot.By analysing the performance of this bot, to see wether this algorithmic trading Bot was profitable, and to find wether there exist some problems of Bot that could be improved. We would provide some evidence to support the prediction on the Bot(we call this trading bot as Bot in the following part) going bankrupt. The data visualisation results were generated by tulip software.
After importing the data into tulip, we got the result like figure4 shows, each nodes in the right windows represents one transaction. The 1563 nodes stands for 1563 times historical transactions by the Bot, each node includes the information of one stock, such as the name of stock and when it was bought or sold and the value of cost or earn, etc. We sorted the nodes according to the time, in order to distinguish different types of transactions, buying stocks were arranged in the left side, selling stocks were arranged in the right side. As figure 5 shows, The height of the nodes based on the date of his operation, The arrows indicate the direction of time growth. If the buying node is the same stock as the selling node, we added an edge between two nodes.
From figure5, we can make two conclusion, first conclusion is that each time Bot bought about five different stocks. Secondly, every time Bot oversold all the shares he own before it bought shares, that means this Bot didn’t do long-term holdings.
The figure6 represents the interval of one complete transaction(after the Bot selling the stock it had bought, we define this as one complete transaction), in the graph each small circle stands for one complete transaction, the label on it is the days interval between buying and selling of a same stock. From Bot operating records, 93.3% transactions were finished within two days, it should be added that, if the stock had been bought on Friday then been sold next Monday, we counted this 1 day, we didn’t count the other holidays, so the ratio of 1 day transaction was more than 93.3%.
In addition, we noticed that, there were two stocks which had been bought and sold in the same day, as figure7 shows. We verified these two transactions, we found that those special cases were caused by the sharp dropping of the stock’s value.
We can conclude that the Bot is a high-frequency trading algorithm Bot. Its algorithm designed to buy stocks every day, and then sell the next day. But in some special situation, it strategy would be modified by the operator.
The figure9 shows the activities of Bot, one cube stands for one day, if the color of cube is yellow, that means Bot didn’t make any transaction that day, if the cube is red or green, it means Bot had did at least one transaction that day, from the didn’t figure out how many stocks were bought or sold in a day, the aim of this figure is just to figure out which days did Bot not trade and why. The conclusion from this graph is that in 2011 and 2013 Bot was running almost every weekday, at the beginning of 2012, Bot slowed down the trading frequency, after the middle of 2014, the trading frequency decreased sharply. After introducing the ￼different exchange markets, we would give some possible reasons for this frequency decline.
From the historical records, the Bot was trading with three currencies: USD, EUR, HKD. In past 1563 transactions, trading in euro and HKD were both 220 times, and the rest 1123 transactions were operated in USD. We also find the Stock Exchange for each stock bought, there were: NewYork(NYSE), NASDAQGS, HongKong, ENParis, Xetra and ENAmsterdam, first two are American Stock Exchange, last three are in Europe. The figure10 shows the percentage of the amount of stocks bought from different Stock Exchange over the total number of operations. From figure10, we can find that Bot preferred to trade stocks in the United States. We would discuss the reasons latter. Considering the difference between Stock Exchange, we compared the trading frequency in different locations. Figure11 shows the trading frequency difference of American markets, European markets and HongKong markets.
From figure11, we can conclude that if excluding the influence of the european debt crisis on European markets, the trading frequency in HongKong markets and European markets were almost the same. The Bot focused on American stocks.
From Bot’s page, we can get information about buying or selling hour, in this section we would analyse its operating hour setting. Figure12 shows the operating time, X-axis represents the date, Y-axis represents the time of day, a circle represents a selling stock, a cube represents a buying stock, We can directly see from the picture, the operating time is a regular. In addition, all the following is (UTC/GMT +1) Central European Time Zone.
After adding edges between the same buying and selling stocks as Figure13 shows, the operating time strategy is very clear. Considering the time difference in different locations, we shows this graph depend different locations.
From figure14, we find that in American Stock Exchange, Bot sold the stocks in 15:00 - 16:00(New York time), bought in 10:00 - 11:00.
From figure15, in European Stock Exchange, Bot sold the stock in 16:00 - 17:00, and bought in 09:00 - 10:00.
From figure15, in HongKong Stock Exchange, Bot sold the stock in 15:00 - 16:00, and bought in 10:00 - 11:00.
We can conclude that, Bot bought the stock at the opening of the Stock Exchange each day, then sold at the close of Exchange next day.
Figure17 shows the profits of all the complete transaction, Bot made profits 390 times, lost 391 times, it lost 1849dollars. its forecast accuracy was 49.93%. In American Exchange, it make profits 292 times, lost 269 times, market’s profits was 516 dollars, forecast accuracy was 52.04%; in European Exchange, it made profits 58 times, lost 52 times, market’s profits was -295dollars, forecast accuracy was 52.72%; in HongKong Exchange, it made profits 40 times, lost 70 times, market’s profits was -2071 dollars forecast accuracy was 36.36%.
We can conclude that Bot’s performance is much better in American Exchange, in fact those four years it was losing money. Figure18 shows the change of amount of it’s money.
Figure19 shows the profits of each transactions, we can find that most of its profits is less than 40 $.
Figure20 shows percentage of the amount of cost for buying stock over all the cash it owned, this diagram wants to analyse each time if the Bot cost all its money for buying, the average percentage is 27%, it means Bot only spent part of it’s money to buy stocks every day.
From 08/13/2011 until now, it running for 1234 days, in those days it lost -433 euros, and there are 22013 days before it bankrupt. But as we just showed, it lost 1849 dollars. for past 4 years, -433 euros do not equal to 1849 dollars. was I wrong? In fact both of me and the Bot are right. It calculate income in euros.
But is this calculation method correct? My answer is no. First is that most of its transaction were operating in American Exchange using dollars; secondly, 90% of its property are not euros. Using euro for summary cause illusion.
8148 days is much less than 22116 days, so the prediction given by Bot is not correct. But according to its recent performance, I think Bot already changed it’s initial strategy for running, we will discuss this in next section.
Although Bot have bought 781 times of stock, it bought 178 different stocks in past 4 years. Figure 24 gives the layout of those 178 different stocks. The Figure using my shell algorithm layout.
There are 15 different stocks are bought more then 10 times. 90% of those stock are in American Exchange.
Figure25 shows the stock ‘Bristol-Myers’ operating records. The motivation of showing this diagram is to analyse the buying strategy of Bot, but after knowing Bot’s algorithm, we found that this direction is useless. Because Bot make decision depend on continuous data, but figure25 shows record discrete distributions. Figure26 shows the strategy of Bot which was found from Internet.
Bot operated 165 times in sector ConsumerDiscretionary, for 10.55 %. Bot operated 116 times in sector Industrials, for 7.421 %. Bot operated 174 times in sector Energy, for 11.13 %. Bot operated 84 times in sector Utilities, for 5.374 %. Bot operated 92 times in sector Communications, for 5.886 %. Bot operated 126 times in sector Materials, for 8.061 %. Bot operated 186 times in sector HealthCare, for 11.90 %. Bot operated 220 times in sector ConsumerStaples, for 14.07 %. Bot operated 136 times in sector Technology, for 8.701 %. Bot operated 264 times in sector Financials, for 16.89 %.
After 4 years operation, Bot lost 1849 dollars, we can’t say that’s a good performance. But it’s lost did not due to continuous predictive failure. If ignore it’s worst transaction, it could realise profits. We find its profits came from small income, its lost were caused by less then 5 failure prediction. If I design Bot’s algorithm, I would add a tracking system, if the stock falls below a certain percentage, then immediately sell out, also, my vector of buying would concern the whole perform in the same sector during past short days.
In addition, through observation, we find that the robot's recent performance has been significantly changed since 2014. From figure30, we know that the first change is Bot increase the cost of each stocks, The average cost of year 2011 is 938. The average cost of year 2012 is 509. The average cost of year 2013 is 345. The average cost of year 2014 is 1568. second change is that it slow the transaction frequency from April 2014, Bot stopped buying stock from HongKong and Europe. The performance since April 2014 is much better than before, As figure32 shows, it earned 420 $ in 2014 until November.