Presentation is loading. Please wait.

Presentation is loading. Please wait.

Djohan Wahyudi Supervised by: Prof. Dr. Pericles A. Mitkas Vivia Nikolaidou 1.

Similar presentations


Presentation on theme: "Djohan Wahyudi Supervised by: Prof. Dr. Pericles A. Mitkas Vivia Nikolaidou 1."— Presentation transcript:

1 Djohan Wahyudi Supervised by: Prof. Dr. Pericles A. Mitkas Vivia Nikolaidou 1

2 Background  Richest Men in the world 1. Carlos Slim Helu ○ Net Worth: $53.5 billion ○ Source: Telecom 2. Bill Gates ○ Net Worth: $53 billion ○ Source: Microsoft 3. Warren Buffett ○ Net Worth: $47 billion ○ Source: Investments  Software Agents combine the field of these richest men in the world 2

3 Goal and Purpose  Goal : To create a software agent that will make profit and avoid loss  Minimal Achievement : Succeed in building the parser and the simulator  Maximal Achievement : Succeed in finding the agent that wins a lot of money 3

4 Software Agents  A Software Agent is a computer program which works toward goals in a dynamic environment on behalf of another entity, possibly over an extended period of time, without continuous direct supervision or control, and exhibits a significant degree of flexibility and even creativity in how it seeks to transform goals into action tasks. (http://agtivity.com/agdef.htm)http://agtivity.com/agdef.htm  A Software Agent is a piece of software that acts for a user or other program in a relationship of agency (wikipedia)  Intelligent Agent (IA) is an autonomous entity which observes and acts upon an environment (wikipedia) 4

5 Stock Market  Double Auction Market Seller : Ask Order Buyer : Bid Order  Stock Market Transaction Guarantees the Seller will get the money he asks for. Guarantees the Buyer will get the stock by paying not more than the price he wants to buy  Analysis Fundamental Analysis Technical Analysis 5

6 Penn Lehman Competition  Competition for Stock Market Agents (2002-2005)  Built a simulator that is called Penn Exchange Simulator (PXS)  Using Real Stock Market data from the island website  The agent will have unlimited amount of money and can perform short, but the agent needs to put the money balance into 0 in the end of the day 6

7 Data from BATS website 7

8 Architecture BATS Website Parser Historical Data ExtractorExecutorAgent Simulator Analyzer Result Analysis Simulation Data 8

9 Extractor Calculation 5 Seconds200 Shares in Transaction List - Create the Order 200 Shares in Total Volume Same Number of Shares = Don’t do anything Input all the order in database 9

10 Several Changes in Developing Executor Order Transaction Extractor The Parser responsible for putting the order based on the history Executor Agent After finding the match order it will execute it and put it in Transaction Order History Order History Executed by the time range and the Order executed by looking from Transaction No Need to Query anymore from Transaction table because if the order is executed it will be deleted 10 The Agent puts the order based on its algorithm The Executor will get the orders and choose the ones that haven’t executed by looking at Transaction

11 Agent  Should produce Ask and Bid Orders  Take the decision based on the algorithm being used  Can use several algorithms for the decision making, using majority result Algorithm  Will have access to all the necessary data. (Time, Price, Order)  Need to give result to agents and produce the decisions (Buy, Sell or Do nothing) 11

12 Algorithms 1. Up Buy Down Sell 2. Reverse Strategy 3. Trend Following 4. Average Order 5. Static Order Book Imbalance (SOBI) 6. Volume Average Weighed Price (VWAP) 7. Market Making 8. Jump and Dump 9. Moving Average 10. Momentum 11. Reverse Momentum 12. Channel Breakout 13. Reverse Channel Breakout 14. Buy Low Sell High 12

13 Basic Condition  To avoid loss the agent should not sell the stock at a lower price than it bought  Selling condition applied to agents price >= min(history price)  Average Order better without the condition 13

14 Reverse Strategy  Condition Price Going Down : Buy Price Going Up : Sell  Proven in (Feng and Stone, 2004) to be a good strategy. It was also confirmed in the first simulation.  Even though it looks like against the logic, it is a good strategy because of the fluctuation behavior of stock market. 14

15 Average Order  It calculates the average of the order, which is considered the actual price  Condition If the average order > price then ○ Buy the stock If the average order < price then ○ Sell the stock  This algorithm is considered capable of predicting whether the stock market price will go up or down (from investigating with the basic condition) 15

16 Channel Breakout  Condition Buy : If the price is higher than maximum price Sell : If the price is lower than minimum price  It was not that good in comparison with other agents in the first simulation (7 th in rank)  It was the second highest in minimum daily which means that the algorithm can help the agent to avoid risk. 16

17 Market Making  It is a popular algorithm in Penn Lehman Competition  How it works : Create 2 orders every time it makes the transaction The middle value : current price The range : desired profit Create ○ Ask Order : current price + 0.5 * desired profit ○ Bid Order : current price - 0.5 * desired profit If both orders executed, it will have the desired profit 17

18 Jump & Dump  It was the winner of Penn Lehman Competition in May 2005  Original algorithm 1. Buy lots of shares 2. Buy all the shares in ask book. Calculate Jump Price. Place a pair of buy/sell orders for just one share each close to the jump price. 3. Continue to buy any shares in the ask book that are priced lower than the jump price, and keep placing small buy/sell orders close to the jump price. Continue this behavior for 40 minutes. 4. Sell off all shares until cash level = gross Profit. 18

19 Jump & Dump  Simplified algorithm : 1. Buy Stock 2. Calculate the jump price with desired profit 3. Sell the stock  It was considered the best algorithm in the first step simulation and second step simulation.  It reached $259,094 from $100,000 in 2 months when it ran alone. 19

20 20

21 21

22 22

23 23

24 5 Best Combinations in 1 Simulation RankAgent Overall Result Profit 149-9,510,139139 247-9,5,4,1310,112112 420-9,3,12,510,07070 332-9,3,5,1310,06565 529-9,3,12,1310,04848 RankAgent Overall Result Profit 132-9,3,5,13277,196177,196 249-9,5219,805119,805 347-9,5,4,13210,130110,130 420-9,3,12,5123,05923,059 529-9,3,12,13108,6658,665 24

25 10 Best Combinations in 1 Simulation RankAgent Overall Result Profit 12311,467 1,467 24911,202 1,202 33211,112 1,112 42010,896896 517 10,683 683 62910,160160 74710,115116 83510,08585 94410,03536 RankAgent Overall Result Profit 132 224,430124,430 247199,588 99,588 317183,100 83,100 449180,602 80,602 520148,011 48,011 644109,407 9,407 723101,590 1,590 829101,1861,186 935101,0901,090 25

26 When Stock Is Going Down Agent Start Money DateOverallStockLoss% 4910,0001/22/20109,992.9119-7.09-0.0709 1/29/20109,990.7318-9.27-0.0927 100,0001/22/201099,831.16881-168.84-0.16884 1/29/201098,851.443414-1148.56-1.14856 3210,0001/22/20109,991.0910-8.91-0.0891 1/29/20109,991.0117-8.99-0.0899 100,0001/22/201099,909.38166-90.62-0.09062 1/29/201099,915.64116-84.36-0.08436 26

27 Conclusions  The project has built the simulator that can represent a real stock market environment using real stock market data.  The combination of simple algorithms that works well in stock market has been found (Agent 32) Jump & Dump : Take advantage when the price is going up Average Order : Know whether the price will go up or down Reverse Strategy : Take advantage of fluctuation behavior of stock market Channel Breakout : Keep the risk low  The agent can gain a lot of money (230 % from $100,000 in 2 months, 11% from $10,000 in 2 months) avoid loss (less than 0.1 % per day) 27

28 Future Work  Try to do the research with more data and time.  Consider to use Data Mining Fuzzy Logic Neural Networks  Consider to include Option ○ The only way to gain money when the price is going down News ○ Can avoid risk if there are major issues Fundamental Analysis ○ Should know which company is good to invest on  Try to connect the agent to real stock market 28

29 Any Questions … ??? 29


Download ppt "Djohan Wahyudi Supervised by: Prof. Dr. Pericles A. Mitkas Vivia Nikolaidou 1."

Similar presentations


Ads by Google