Great stuff.<p>I think the author would have been better suited without mentioning HFT, maybe algo trading model?, as its a lighting rod for controversy.<p>If anything I thin this is useful to illustrate just how hard it is to write a full blown trading system.<p>So maybe we could look at what you could add to this to make it something you could use in production(Note, please don't use this in production).<p>1) Risk system, before you write any algos, before you learn how to ingest market data, before you write anything else, you write the risk system.<p>in a true trading system because you always have orders flying between you and the exchange you never really know what your positions is. The Risk system allows you to deal with this uncertainty by giving each algo rules as to how many shares its allowed to be offside.<p>If you only ever take away one thing let it be this:<p><i>Trading Rule #1</i> Sooner or later your algo/code will make a mistake, it's your risk system that determines if you have a job tomorrow or not.<p>2) The system has no rate limiter, what do you do when the quotes come in too fast for you to deal with?<p>3) Locking the world, the system retrieves a quote and locks up the entire system while the quote is acted on. Essentially the very design of the system means you can only ever run one strategy for one set of tickers at a time.<p>If you wanted to tackle this start by looking at this data structure/library:<p><a href="https://lmax-exchange.github.io/disruptor/" rel="nofollow">https://lmax-exchange.github.io/disruptor/</a><p>4) Back testing, no HFT trade idea's go into production without backtracking, Every HFT firm is different but I think they'd all adhere to this rule.<p>5) Closing positions, every algo gets offside at some point. How do you notify a trader to close out a position? How does the trader close the position and notify the algo?<p>6) Multiple algos over multiple symbols.<p>7) Real time PnL. Your PnL is everything, it means you get paid, it means you can do this again tomorrow. it is the single most important piece of information(Risk metrics are a close second) that you can track. This is probably my only quibble with the demo.