Live data from Hacker News

Ask HN: Automate Stock Trading?

news.ycombinator.com

1–10 of 77 posts

Ask HN: Automate Stock Trading?

#1
I'm building an automated stock trading system for my personal investments. The plan is for the trades to be based on data ingested through past stock performance, current trend, fundamental analysis, performance compared to similar stocks, and other data sources added incrementally.

There is a learning curve in which I'm developing the initial algorithms that will help gain an advantage over simplistic human investing with the computer providing a more deterministic risk-reward management system that it will apply. Once this has been achieved, the goal would be to increase the ROI and maximize the final take-home profit (minimize tax where possible to increase effective ROI). I'm validating algorithms with a back testing approach, currently obtaining data from Quandl.

I'm planning to host this on AWS and use a combination of Python and R. I haven't decided on the datastore yet, but I'm open to suggestions.

Does HN have any suggestions or any tips from someone who has attempted to do something like this in the past, if so, please also briefly describe your past experience and current position with the project?

Thanks!

Re: Ask HN: Automate Stock Trading?

#3
I'am working on this.

Only using python , ipython rethinkdb and postgresql.

We are working on a event driven fund to find pattern, but we still need human at the end (the program found pattern and we try to find why and if they are reproductible).

Good luck :)

Re: Ask HN: Automate Stock Trading?

#6
If I could just give you one piece of advice it would be this: don't do this.

A bit longer: You're a pig headed for the slaughterhouse. Please do it 'for play money' only for the first 5 years or so, if your method makes money over that period then set yourself a goal and if you reach it stop.

Re: Ask HN: Automate Stock Trading?

#7
post #4

"A mathematician plays the stockmarket" is an interesting read of a smart person who made a bunch of mistakes and lost money. http://www.amazon.com/gp/aw/d/0465054811/ref=mp_s_a_1_sc_1?q...

I haven't read the book. From the description on Amazon it seems the investor/mathematician let his emotions come in the way of his investment decisions which led to him losing money. I think that's a risk we run by providing that human touch, which sometimes may even help us if the software is making stupid decisions. My goal is to build a fully-automated system (no human interference) that makes "confident" decisions based on statistics and hard numbers.

Re: Ask HN: Automate Stock Trading?

#9
You may want to take a look at http://quantopian.com/, who make an engine that does just that. A lot of brokers actually support this.

The reason appears to be that there are lots of stock trading packages that people want to use (and to be fair, most brokers' interfaces suck somewhat. Also one interface for 2-3 brokers sounds appealing to me).

Here is an article about one such trading API:

http://www.quantstart.com/articles/Using-Python-IBPy-and-the...

Most API's also let you play with the "fake money" accounts of the brokers. But keep in mind that they usually cheat on transaction costs in those modes.

You may want to read a lot of the algorithms on Quantopian. To be frank, the only one that really makes sense to me is the "auto-rebalancing" approach. What this does it it keeps your investment at what you set it.

Say you invest 50% in automotive stocks and 50% in nasdaq stocks. Nasdaq goes up 10% -> it sells 5% of the profit and invests it into automotrive stocks. This is one of the few algorithms that seems to :

1) beat the market

2) actually spreads risk around (or it seems to me it does, depends on your investment spread I guess)

Re: Ask HN: Automate Stock Trading?

#10
post #6

If I could just give you one piece of advice it would be this: don't do this. A bit longer: You're a pig headed for the slaughterhouse. Please do it 'for play money' only for the first 5 years or so, if your method makes money over that period then set yourself a goal and if you reach it stop .

If you could please shed some light as to why you hold that opinion (past experience etc.), it would be of great help!
Post reply on HN