Live data from Hacker News

Algorithmic Trading: A Practitioner’s Guide

henrikwarne.com

11–20 of 149 posts

Re: Algorithmic Trading: A Practitioner’s Guide

#11
post #3

How would I implement algorithmic trading at home? And would this be a viable idea if I knew what I was doing? Has anyone done this successfully?

I spent a good few months building a system for fun/interest. Darwinex has an interesting business model - check it out - but it shows leaderboards of supposed profit-generating trading systems.

Thing is, one will be hard pressed to find solid, relevant, detailed and current information about legitimately profitable trading strategy. Once a strategy becomes widely used, the 'market inefficiencies' being exploited cease to be readily available, so there is a strong incentive to keep a good strategy private. I vaguely remember reading about HFT firms obscuring their trading activity for this reason. Additionally you will find the online world absolutely saturated with the grifter types. So good info is hard to come by. Be prepared to learn at least the fundamentals of both trading and statistics, do lots of testing, and basically figure it out on your own because nobody successful (and smart) is sharing their reliable, profitable strategies (that doesn't mean you can't learn from them - just don't copy paste).

It is a very interesting domain though and I thoroughly enjoyed learning about it all and building mine.

Re: Algorithmic Trading: A Practitioner’s Guide

#12

A colleague here tried to break into the trading world as an adult. He had a reference to be a member with a small cozy firm where his accounts could be held. He got "direct market access" (?) with a trading terminal that he said was good quality. Yet when I watched him work for several weeks each day, he was locked out of a SELL order more than once.. it didn't go through in any reasonable amount of time and he ende…

The article isn't about discretionary trading. It's about algorithmic trading, which is a bit like the word 'hacking' in that it means one thing to practitioners and another to the general public.

To practitioners it refers to the use of algorithms to trade large quantities of stocks or futures or whatever. The goal is to reduce trading costs by executing small trades at the right time. This is distinct from and rather more common than quant trading where an algorithm actually decides what bet to make.

Re: Algorithmic Trading: A Practitioner’s Guide

#13
post #3

How would I implement algorithmic trading at home? And would this be a viable idea if I knew what I was doing? Has anyone done this successfully?

For starters, open a brokerage account at a broker that provides an API. There are many currently available including Ally, Tradier, Alpaca, Think or Swim, Interactive Brokers etc. Although, I think Think or Swim is currently not providing new keys due to their merger with Schwab.

Once you got that part setup, try to write a simple program that buys or sells an equity from the command line .

From their own you can start exploring trading algorithms. Some are pretty basic, like when the price crosses above a 200 DMA, then buy a stock as that usually signifies an upward run, while selling if the price falls below the 200DMA as that is bearish.

Then you can read some books on price action, fundamental or technical analysis and build your own algos.

Re: Algorithmic Trading: A Practitioner’s Guide

#14
post #3

How would I implement algorithmic trading at home? And would this be a viable idea if I knew what I was doing? Has anyone done this successfully?

"Algorithmic trading" in the sense described in this article only makes sense if you have a customer who wants you to execute large trades and pay you a commission.

You can try some trading using algorithms to identify profitable trading opportunities. That would normally fall under "prop trading" instead. There are definitely people doing this in ways achievable by a home hobbyist, but don't expect any low hanging fruit. Find some niche in some less liquid instruments. Don't look for anything that relies on being fast - someone else will be there who measures latency in nanoseconds.

Re: Algorithmic Trading: A Practitioner’s Guide

#15

I always wonder if this space hasn’t been entirely cornered by HFTs. Isn’t it futile as an individual?

>Isn’t it futile as an individual?

HFT is, more or less... but algo trading in general can be as simple as executing strategies you would otherwise manually perform. I believe there's still enough alpha out there.

Re: Algorithmic Trading: A Practitioner’s Guide

#17
post #3

How would I implement algorithmic trading at home? And would this be a viable idea if I knew what I was doing? Has anyone done this successfully?

I'd like to know how an individual can do this, 1) And avoid some code bug causing them to lose all their money, and 2) Not get lose all their money to some company's API fees...

For (1), test profusely beforehand, and apply your algos in paper trades first (demo APIs without real market execution). And of course, hedge your bets, don't put all your cash on one algo/instrument in one go, and do at least some DD.

For (2), there are zero-fee brokers (e.g. those mentioned by downvoteme1 earlier) that you can use, so you don't have to keep feeding the broker.

Re: Algorithmic Trading: A Practitioner’s Guide

#18

I always wonder if this space hasn’t been entirely cornered by HFTs. Isn’t it futile as an individual?

Algo trading != HFT. HFT is a type of algorithmic trading strategies, categorized by trading interval. In the same categorization there are mid-freq strategies as well. The term "high frequency" is rather subjective, it depends on what alpha you're targeting after.

Re: Algorithmic Trading: A Practitioner’s Guide

#19
post #3

How would I implement algorithmic trading at home? And would this be a viable idea if I knew what I was doing? Has anyone done this successfully?

>How would I implement algorithmic trading at home?

I made a python framework to try to help with this: https://github.com/robswc/stratis

However, it became hard to maintain an opensource version. I would say its still not a bad way to get a head start (bias there, ofc)

I will say, its not something that can be done "on the side." I originally made a decent amount of $ by getting lucky in crypto. I figured I'd "just become a algo trader" and it was much more difficult than I could have imagined.

I actually _just_ started a series on how to build an equity trading system from scratch. I planned to put part 1 out later this week but eh, I'll post it now, it touches on it better than my comment here can :)

https://robswc.substack.com/p/building-an-equity-trading-sys...

* the post assumes you already have alpha (a profitable strategy)

> Has anyone done this successfully?

Regarding this, I actually originally talked a bit with the (now infamous) SBF of FTX about this. I originally wanted to join Alameda Research... but at the time, I didn't want to move across the world. For years I regretted that decision (not so much now, lol) I started my own firm though and I have made a decent amount of $. Truth be told though, knowing what I know now, I might have put more energy into a start up. I enjoy the challenges of algotrading but doing some consulting work, I think I enjoy "building" more than running statistical tests, cleaning data, etc etc.

To sum up this comment though, _if_ you had a profitable strategy and _if_ you built a system that could reliably execute trades, you certainly could be successful. It is very difficult though.

Re: Algorithmic Trading: A Practitioner’s Guide

#20
> There is also a special order type called post-only. It is designed to only supply liquidity, never take liquidity. If the market moves between the decision to send out an order, and the order reaching the exchange, the order will not cross. Instead, it will be hidden, or cancelled. This makes it easier for algorithm designers to get the behavior they intend (that is, resting orders will not accidentally be converted into crossing orders).

I'd argue that an order that'd immediately be filled does provide liquidity to the market overall.

One reason to use "post-only" is explained in TFA:

> Many markets use the maker-taker fee structure. Traders that place orders that rest on the exchange earn a maker fee, and traders that “take” liquidity, that is execute orders against the existing resting orders, pay a taker fee. The taker fee is higher than the maker fee

If you do post-only, you'll get maker fees.

Post reply on HN