Monday, August 22, 2016

2 months of real trading

Hello, welcome back to my blog about automated trading. Last time I flushed some of my opinions about mobile trading platforms. This time I will present my current state of the trading with real money.

I am executing this strategy, started from June 27 (look to the first week). Just to recap I have started with $2500. Now after almost 2 months my account looks like this.


In total I am about 9% in plus after 2 months. I sill hold 9 open positions (AMPE, AVXL, CHMA, DNAI, GBIM, INFI, TKAI, TRXC, ZFGN). In total they are currently -107$.

How was these 2 months? As I told there were ups and downs. I had few times temptation to be smarter than the computer and manually open/close some of the positions. Now I am happy that I haven't break the strategy. At the end of the day I discovered that I would not be more clever than system. This was a great lesson.

What I am going to do next? Just follow the strategy. I have put my trust into it. If it works, then great. If it doesn't, then I will look for the way how to improve it.

What I am not going to do? Trying to be 'smarter' and alternate the strategy just because of emotions.

That's it for today. Next time I will present strategy based on the company ratings.

If you have any question or just want me to look for any topic, please let feel free to contact me at radek.hecl@gmail.com. My promise is to give the honest answer without BS.

Thank you for reading!

Monday, August 15, 2016

Mobile platforms

Hello, welcome back to my blog about automated trading. Last time I talked about company rating. This time I will tell you my thoughts about tradnig platforms for mobile devices.

Recently many brokers made their cool apps for trading available in many devices. Providing instant access to the market, ability to trade any time from any where and being able to non stop monitor the situation. I personally see time to time people in metro playing with these apps.

My opinion: Do this only if you want to put your money into an envelope and send them straight to the pocket of rich people, hedge fund managers or investment banks.

And here the list of whys.
  1. Mobile devices have small display. This limits the ability to aggregate the data. If you are thinking you are able to find out something clever in the candlestick chart on the 6 inches display, then you are wrong.
  2. The fact that you are attached to the device anytime brings much more stress. How many times have you just check it out.
  3. Thet way how this is done pushes customer into the day trading. Statistics says that majority of day traders will just loose money.
  4. Lack of strategy. Imagine you are trading in a metro. Then what is the chance that you can have procedure for searching for trades or setting up limits for taking profits and loses. Chances are you will lookup something which is known or you heared about before and deal just with it.
  5. If broker provides you trading signals, then they are in the conflict of interest. This is because they are payed by commissions from trades. Of course they would love to take credit if their signals work and say 'it was your decision' if they don't work.
  6. All these markets are zero sum game. If some people earn money, then some other people loose money. Considering the fact that 90% of market players are loosing the money. Therefore increasing the number of players is just good for that 10%. I would be not surprised if investment banks are actually supporting these platforms.
These are my thoughts. Take them or not. If you have any story with trading over mobile devices, then please give me a message. I am interested in hearing that.

That's it for today. Next time I will give you an updated about my trading with real money.

If you have any question or just want me to look for any topic, please let feel free to contact me at radek.hecl@gmail.com. My promise is to give the honest answer without BS.

Thank you for reading!

Monday, August 8, 2016

Company rating

Hello, welcome back to my blog about automated trading. Last time I showed one strategy targetting the companies that made IPO recently. This time I will present my way how to rate companies.

For the source code example, please download repository and update to branch 19-rating, changeset 44a04ac27f36.

Background

Goal: Goal is to create ordered list of all (currently more than 7000) companies.

Natural question is how to order them? There are unlimited number of ways. And this post is about my own one. My mind process is following. I am imagining to have 10.000$ in my pocket. Then I want to run the rating program, take first 10 companies from the list and invest 1.000$ in each of them. Time will then show whether this was a right decision or not.

Now to make the problem smaller I will transform the ordering into the rating. Point is to create the method which takes the company symbol and returns the rating number. The higher nuber the better company. Then list will be ordered from the highest rating at the beginning. If 2 companies have same rating, then they will just be ordered alphabetically according the symbol.

Rating function

Rating function simply takes the company symbol (e.g. MSFT), aggregates all possible data sources and returns number (e.g. 2260). This is the rating number of the company. It is important to realize 2 points. First one is that over the time rating is changing as the new data are arriving. Second is that rating might end up as a negative number and there is no need to panic about it. It is just number which is lower than 0, not special meaning for this post. Now let's go through the data I will focus on. Here they are ordered from the most significant at the top.
  1. Price
  2. Price compared to the year high / low
  3. Fundamental more important - debt, income, sales, sales growth, earning growts
  4. Fundamental less important - volume, number of employees, recommendation, market capital
  5. News
Now you see there are 5 different levels. In each of them I will be assigning the ranking score and total ranking will be just sum of the scores through all levels. The numbers needs to be chosen in the way that most significant level has the higher impact. For example it is unrealistic for me to invest to the company if stock price is over $100, no matter how other data look like. My best is the copmany where price per stock is between $2 and $20. Therefore I will be adding thousands to the rataing for the level 1. For the level 2. I will be adding hundreds. For level 3. it will be tens or hundreds. For level 4. it will be units or tens. And finally level 5 will be adding only units. With this system companies which looks good in the 1. and 2. level will most likely be in the top of the list. For the details please look to the source code.

Coding

Entry class for code RatingTestApp which is an application and you can run it and get the same results as me (note that result will change over time). Undrehood the applicatoin is using CombinedRatingProvider. Application workflow is very simple. It takes every symbol from finviz and calculates the rating. Results are stored in the TreeMap where value is a set of companies with same rating. This structure provides easy natural sorting. Finally the result is printed out and written to the csv file.

Results

The whole program took 7209 companies from Finviz.com and was able to calculate rating for 6656 of them. There were few results which ended up as NaN and some where company stock price was 0. For the purpose of this post I have manually excluded these them from the result.

Top 10 rated companies are:
  • MFG - Mizuho Financial Group, Inc. - 6701
  • SMI - Semiconductor Manufacturing International Corp. - 6572
  • ORIG - Ocean Rig UDW LLC - 6451
  • MTG - MGIC Investment Corp. - 6413
  • SIM - Grupo Simec S.A.B. de C.V. - 6402
  • NMR - Nomura Holdings, Inc. - 6386
  • AEG - AEGON N.V. - 6359
  • MTU - Mitsubishi UFJ Financial Group, Inc. - 6313
  • XBKS - Xenith Bankshares, Inc. - 6169
  • NOK - Nokia Corporation - 6150
Worst 10 rated companies are:
  • BRK-A - Berkshire Hathaway Inc. - -7262421
  • SEB - Seaboard Corp. - -93899
  • APA - Apache Corp. - -92111
  • DVN - Devon Energy Corporation - -69573
  • PBR - Petroleo Brasileiro S.A. - Petrobras - -62570
  • FCX - Freeport-McMoRan Inc. - -60604
  • CHK - Chesapeake Energy Corporation - -57499
  • E - Eni SpA - -54001
  • NVR - NVR, Inc. - -52129
  • DB - Deutsche Bank AG - -45273
What surprised me what that there are 3 japanese banks between top 10 rated companies. Then also that Nokia ended up between top tem. And finall price of Berkshire Hathaway Inc. which is around $220000 per share (yes more than two hundred thousand USD). I am definitelly not going to trade this one (;

Conclusion is that is is good idea to have feature which can compare 2 companies in the way I like. I am going to tune this up and build strategy around it. I can see the potential which can build up nice portfolio.

That's it for today. Next time I will talk about trading platforms for mobile devices.

If you have any question or just want me to look for any topic, please let feel free to contact me at radek.hecl@gmail.com. My promise is to give the honest answer without BS.

Thank you for reading!