Monday, June 20, 2016

Fundamental news parser

Hello, welcome back to my blog about automated trading. Last week I have provided a view (it is too weak to call it research) into fundamental news. This week I am going to present simple news parser.

For the source code example, please download repository and update to branch 16-news_parser, changeset d8acc9e4f15d.

Coding

Coding is straightforward today so let's go directly to it. There is main inteface FundamentalProvider which contains method for news selection. This method accepts symbol and returns list of news. Then there is an implementation called FinvizFundamentalProvider together with related test case. Implementation just queries the html page and extracts the news from the news table. Everything is done with technologies covered in the previous chapters. Finally there is FinvizFundamentalProviderTestInternetApp application which allows to run quick live test with Microsoft stock. This implementation needs internet connection. That's enough for play.

Now do you have any idea how to use that? Please let me know. There are no bad ideas.

P.S. I am thinking to go for the payed version with finviz.com. They have proved to me to be reliable and useful data source.

My stock trading account

Yes, unfortunately I am still in the process. I live in Japan and application is send to New York. If I want to sleep well, then there is usually only 1 email during day. Therefore couple of missed fields and misunderstandings are making it long.

Strange for me is when I compare process for opening Forex and stock account. Seems anyone can open Forex account just with email and credit card. Pretty quick setup. For stock account there is a lot more validation (I am not considereing stock offered by forex brokers). One point I have read is, because government wants to prevent the finanicing of terrorism. I understand this is definitelly good idea. However I haven't figured out yet how extra paper work helps with this at all. At the end of the day this is just paper work and people who want will deffinitelly find the way how to trick it. Does anyone have insight into it? Please let me know. I am curious.

That's it for today. Next week I will be talking either about my trading account or will show one use case for this fundamental parser. Thank you for reading!

Monday, June 13, 2016

Fundamental news

Hello, welcome back to my blog about automated trading. Last week I wrote about the 'features' offered by broker. For this week I had a plan to talk about my real trading account. Unfortunately opening the stock account requires some paper work and it will take me more time to go through all the steps. Therefore I have prepared another topic for this week. I have made a little pre-research about the connection of stock price with fundamental news.

Before that, let me cover the point about minimal account balance from the last post. I have send request to this broker, received email saying that ticket has been created in their system. Since that time, no answer for a week. Comparing this experience with a broker who allows me to do live chat and skype call which actually works very well... I think there is no need to say where I am opening account right now.

Now let's go to today's topic. As I am running live test of my automated trading strategy - at this point with demo account!!! From today I will be holding these 5 positions:
  • TRXC
  • CHMA
  • CBR
  • CFMS
  • DNAI
I have looked up the all the symbols in the finviz.com, looked through the events at the bottom and compared them with price changes.
TRXC - I bought on April 22. On April 21 there was announced investigation from Rosen Law Firm which I think caused the price gap.
CHMA - I bought on April 27. Before that there were announce several investigations and finally on April 25 stock has been downgraded by Barclays.
CBR - I bought on May 12. Before that there was no investigation, but quarterly loses have been announced.
CFMS - I bought on May 17. Before there was some downgrades and reported loses.
DNAI - I will buy today (June 13). There was an investigation announced on June 6 which caused the price drop.

What to take from it? For the moment I put this as a simple theory that 'investigation' or 'class action' will cause price drop and possibly the negative gap. Quarterly loss will probably cause price going down in the near time. To verify that theory I want to build up the dictionary and connect these key words with price action. This will be definitelly good excercise for some of the next topic.

That's it for today. Next time I will be hopefully able to finish my real account setup. If not, then I will figure out some different topic to talk about. Thank you for reading!

Sunday, June 5, 2016

Brokers

Hello, welcome back to my blog about automated trading. Last week I have presented trading algorithm which opens and closes positions within a day. This week I am going to talk about the brokers who are offering to trade stocks.

Because I am preparing to trade with real money I have made a lot of research research about the brokers who are offering stock trading. For this article I am not going to name any of them. Instead I will talk about the conditions and concepts in general. Please remember that I am focusing only on the STOCK trading.

Leverage / margin

Leverage / margin essentially means that broker provides loan for trading. Many times big promotion says to use leverage to "gain" more. In the same time little text in the bottom explains that it might turn the other way around as well - "loose" more. Whether you are lucky or not, borrowing money from any institution brings obbligations and reduces the freedom. Typical catches are interest, margin calls, liquidation. Let's go through them in detail.

There is an interest fee if you are trading on margin and holding over night positions. The rates are various. I have seen from about 3% -10%. Let's make an example. Today Microsoft is around 50$ / share (for simplicity). If I buy 1000 shares, then cost is 50000$. If this would be whole borrowed money with 7% margin rate, then cost per year would be 3500$ which is about 9.5$ for the first day. This means I would pay almost 10$ a day having no guarantee for stock to going up. To me this sounds like the set up to loose money. The only way to avoid interest fee and use margin is to do day trading, where daily commissions comes into place.

I don't like to receive call from ex girlfriends. In the same way I would not like to receive the margin call. This happens when position on margin goes badly. Broker is allowed to make a phone call and request more money. Do I really need to go through this kind of stress?

Last part is liquidation. This means that broker can close any position even without any notice. That means I would loose control over my money (because for margin account these are actually not my money).

Forex brokers

Many forex brokers are offering stock trading as well. I have looked through some of them and typically they offer limited selection of stocks (just US market has around 8000 and I could see some brokers offers about 100 of them). These stocks are the one I can't afford to pay on my own and therefore I would be forced to use leverage. In addition pricing is based on spread and I have discovered there are a minimal sizes which I can buy. My guess is that minimal sizes guarantess commission to the broker.

Realizing all these I am going to use only real stock broker. That broker must have stocks as main product rather than just some spin off.

Trading signals

In short, trading signals are advices which should not be taken as advices. Any broker who has commissions based pricing and trading signals is already in the conflict of interest. That leads me to the point that the only information I want from broker is the one that I can be sure this is objective (e.g. price or fundamental data about companies).

Minimal account balance

I have found broker with pretty good conditions. Simple, easy trade. The only caveat is the minimal account balance which is 2500$. They have different conditions if balance goes under this value. I have raised question whether this applies for cash accuonts as well. I will need to wait for answer, because there is a Sunday afternoon in US. Will be back to this in my next post.

What to do then?

All these above are the negative points or points to watch out. The ultimate purpose is that I don't want to get broke no matter what market does. This means I want to be ready for the very small possiblity that all stocks will suddenly drop to zero and I loose all my money there. Luckily I have found few brokers where I can make good set up for this. These will appear in my next post.

That's it for today. Next time I will talk about my account set up and how I started to trade using my platform. Thank you for reading!