302 points · by srpeck · 11y ago · 186 comments
But - as someone that _loved_ Microcorruption and followed StarFighter from day one, stalking the people on Twitter as to not miss the launch: That's not for me.
The game right now - as this article, this mail shows - requires you to learn about finance systems before you even start playing the game. It's a game where the rule book is - from this pov - too long and already uninteresting.
Good luck, I'll sit this one out and would love to see a future expansion in different directions. Or another Microcorruption, Stripe CTF etc.
Thomas describes that tech tree as "MicroCorruption the way we would have done it if we had dialed it to 11."
Sneak peak: https://www.evernote.com/l/AaedYkVFsB1Oa4eDakZay59-YF7Lu0mcJ...
(I don't have a good screenshot of it at present because they're currently doing UI surgery on the React 0.14 upgrade.)
It's ok not to be for everybody :D
Keep it up Patrick.-
It was interesting enough that I've picked up a few books on market microstructure, that really get into the details. It's fascinating, not just technically, but from a standpoint of looking at humans. It's odd to see how such strange systems persisted for so long (like Patrick mentions in this post, the crazy 1/8th spreads that were gamed). Or in "Dark Pools", they discuss how some of these traders would call up Nasdaq wondering why a certain trade did or didn't work how it did. And they'd find out all sorts of strange rules. Which makes me wonder, wtf? Are Nasdaq's rules hidden? Or were people doing this as a living just too lazy to read the specs? [1] I can only guess how much easy money there was to be made 20 years ago.
I'm so looking forward to Stockfighter, enough that I started looking at FIX and OUCH (OUCH looks far faster since there's ~no silly parsing - just copy into a struct) just in case that's what they offered. It's too late for me to actually work in finance (far smarter people with more experience in math and compsci), but playing the game is still an option. (I've actually been thinking of how we might run some fake exchanges, federated, as a game.)
Anyways, I guess to each his own. But I'm guessing I'm not the only one that will find this scenario intriguing.
1: Even basic stuff, like market orders, are weird. Who the hell would ever submit an order that's literally saying "Sell at any price, including $0"? (Well I suppose now it's "current price minus circuit breaker limits".) Or "buy at any price up to $MAX"? Sure, most of the time it works out fine, but if you can't be bothered to come up with a limit, perhaps you shouldn't be buying or selling?
Pretty much every domain I've worked in has stunned me with the number of people who do things for a living without reading the specs (often literally, or understanding the basics in areas where there aren't literal specs.) Both conscious cargo culting (where people know they are doing what they've learned to do from others without understanding the basics, and know what they don't know) and false knowledge (where people do things based on an understanding of the underlying process that is completely wrong, and so don't know what they don't know) are distressingly common.
And just to be clear, I don't hold myself to be superior in anyway. I avoid conscious cargo culting except when there is no practical choice; but I've certainly ran into places where I discovered I had been operating for a long time on false knowledge when good sources existed to correct that, but I didn't know that I had a gap that needed correcting.
http://www.amazon.com/Flash-Boys-Insiders-Perspective-High-F...
He's one of the most honest and intelligent people I've ever had the pleasure to work with in my entire career. He was at Madison Tyler while I was there roughly 4 years until the Virtu merger (at which point many of us left).
http://www.amazon.com/review/R28Y8AI4PIPYZ2/ref=cm_cr_dp_tit...
"Kovac misfires by supposing the "front-running" condemned in "Flash Boys" refers to a particular kind of abuse, and not surprisingly it's the kind he plans to refute. In common usage there are at least two meanings to the term. One common meaning is as shorthand for "front-running demand," which is what happens when someone tries to figure out whether your mutual fund or your pension fund is buying or selling stock, realizes that it will change supply-and-demand dynamics for the stock, affecting the price, and front-runs that demand to profit.
Imagine if someone made a reasonable guess you needed milk, raced ahead of you to the only store in town to buy up all the milk before you got there, and then offered to sell you milk at a higher price than the store sold it to him; this is one example of front-running demand, just as described in "Flash Boys." (It's also called "trading ahead.") Another common meaning is "front-running a customer order," a type of insider trading, where a stock broker believes his own customer's order will change supply-and-demand and tries to profit from that; this is what Kovac apparently intends to refute, and it has nothing at all to do with "Flash Boys.""
It left me wanting to learn more. I'm currently reading Trading and Exchanges, as well as Market Microstructure in Practise (I wanted a newer book as stuff has changed in 2002 and 2010.)
That can't happen. It might sound plausible, understandably, to someone who has never done concurrent programming and who doesn't understand that e.g. locks are a thing which exists in the world. I am attempting to restrain myself from being too critical here, because that's a higher level of technical knowledge than I would generally expect from a journalist writing for a general audience, but then again this journalist wrote a book-length treatise on how distributed systems and concurrent programming are screwing the American public without successfully demonstrating that he has a handle on either of these topics.
For the better-informed and book-length version of this comment, see http://www.amazon.com/Flash-Boys-Insiders-Perspective-High-F... , which is some of the most devastating technical writing I've ever read.
Or another one, where the price moves before the guy hits enter. So either he's saying HFT's have trojan'd traders' workstations or ...? Instead of investigating this, he just writes more "ooh spooky" lines.
At one point, he spins regulations requiring customer orders use the best price as a bad thing. Basically, you get the feeling from his book that he'd feel better if we went back to specialists on the floor with quotes in 1/8th, doing stuff you can understand as a human. That somehow, all this tech is bad. Hell he even makes fun of colocation - not adding multiple third-party providers of fibre to a connection to make it faster and less likely to break is obviously evil because... well he says it so ominously it must be true!
He doesn't say HFT provides no value. He says everything's a huge conspiracy (involving, apparently, everyone) and HFT is stealing money. He fails to realise there's risk. Instead he makes it out like HFTs can just buy so fast that money falls out (that if they buy at one price, the only possible outcome is a sale at a higher price, that the market can never move in the other direction). He even gives them magical capabilities, implying that they can determine total order sizes from a single trade.
In MMORPG games, those kinds of orders on the auction houses are awesome because they mean someone wasn't paying attention. Profit for the person who finds them! :)
Sometimes the functionality is obscure or poorly documented, so it's difficult to understand how it will work, or you make an assumption that turns out to be wrong. Sometimes, different order types interact in unexpected ways (these are effectively complex systems).
Sometimes, the exchange just gets it wrong. On a number of occasions, I've investigated an incident and it turned out that there was a bug at the exchange's end.
Here's, like, I don't know, a taste, or whatever:
https://www.dropbox.com/s/8l2d814o1cuiumv/Screenshot%202015-...
Given that Starfighter's business model seems to be helping filter programming talent for recruiters, filtering out developers who aren't interested in programming financial systems is a good first step. My day job involves understanding the finance "rule book" and translating part of it into something that developers can understand and build to. But, even with my translation, the developers still need to be capable of understanding a certain amount about the "rule book" so they can delivery code/functionality that actually fulfils the requirements.
If a developer isn't interested in (or capable of) doing that, they're not going to be of interest to someone who's looking to recruit developers to work on finance systems.
We intend to get in touch with very talented players. We’ll be interested in talking about the game, about what you’ve built, and about what you want to do in the future. If your future goals include “Get a better job!”, we can help make that happen. If not, no worries.
We have agreements with a small number of companies to find qualified engineers and introduce them to the companies. These clients pay us for introductions which result in placements.
This is not true, at least in the US. HFT has made sub-penny trades a pretty common thing. Quotes are displayed in pennies, but using limit orders you frequently see sub penny trades for highly liquid tickers (AAPL for example).
http://blogs.reuters.com/ben-walsh/2013/11/18/do-stocks-real...
> "A level is simply a price. Why not call it a price?
> I have a sneaking suspicion Wall Street invented many of
> these words to give customers the impression “This is
> all really, really difficult — pay us money and the
> complexity goes away.”)"
Its called a level because an order book has many different orders at different prices and quantities. If you funge all the quantites at the same price together you create a 'level', say 1100 shs of VODAFONE @ 107.5 . The next 'level' may then be 17 shares of VODAFONE
@ 108 followed by 5 shares @ 110--
Another term for 'Level' is a trade term for what 'level' of market data you are paying for.
Level 1 Market Data corresponds to trade and price data... Price, bid, ask, trade price, trade quantity
Level 2 Market Data corresponds to when you want to know much more about what is happening on the exchange. You want to know how many orders are on each book and at what price/qty.
This is also commonly referred to as 'Depth of Book'
Dark Pools do not send out Level 2 data, while primrary exchanges do ( LSE, NYSE )
I haven't read any of the books you've mentioned. But, "Market Microstructure in Practise" seems more relevant.
By the way, the overall trading landscape has changed rapidly over the past few years and the pace of change continues to increase.
That's not correct. What you describe is simply a trade that appears on the Time & Sales (aka "the tape"). Level 1 represents the inside quote, meaning the highest bid and lowest offer. Level 2 represents the combined highest bids and lowest offers of all market participants (which obviously includes the L1 data).
I think that sentence would make most professional equities traders chuckle. I mean, it's true-ish for some of the big etfs and some of the highest volume individual companies, but there are 8k+ listed symbols in the US and you can't just go buying and selling "almost any quantity" of most of them. Nobody really trades that way. Trading in size typically involves chopping a large order into smaller orders that get managed by a trader or really a trader's execution algorithm.
There's a lot of stuff in there for future games. Network stuff, low level memory stuff, backoffice, a million FIX engines to write against, optimal execution, distributed computing.
How long would a game take? And what other languages would you support?
It seems like it's utterly language agnostic. Patrick has said a few times that you could play entirely through curl if you really wanted to, or play manually through the trading interface. I'm planning on using this as a first "real[ish]" project for Haskell.
I tried to build one-- and quickly found myself far out of my league. I wish this article had been around back when I was trying to write it!
<plug shame="1">If anyone's interested, it's up on Github at https://github.com/Efruit/marqit .</plug>
I might take another swing at it if I can get through this article in one piece.
We will have way, way, way too many people noodling around with this to scrutinize everyone's work. The linkage between the CTF and our recruiting work will be largely automated, and entirely opt-in: nobody that works for us is going to notice you until some automated thingy asks if you're on the market, and you tell the automated thingy "yeah, I'm interested in being recruited".
The overwhelming majority of people noodling with our CTFs, including most of the "best" players, will not be job candidates.
I'm also really enjoying the position taken on OSS here:
> I’d personally be very disappointed in an engineer who, in 2015, defaulted
> to scratchbuilding their own clients for every API they consumed.
> Starfighter loves OSS and the OSS culture. Go nuts.
Perfect.1. Is it just useful for getting noted by some companies and get invited to interviews? So basically it is equivalent of sending them CV and/or contacting relevant persons.
2. Is it supposed to replace the tech interviews (which suck) completely? In this case, yes, I can see the value of allocating significant time for these games.
It is OK if they are not your cup of tea.
We are going to get the CTF right, and then work from there to a sustainable recruiting business. We should have done it the other way around, but we didn't. :)
1. People just seem to love playing CTF-style programming games
2. People who are successful get put in pool A.
3. if Pool A people have checked the "I am looking for work" on their profile, then the starfighter team matches them up with people that want qualified candidates that will actually be able to do the work.
The thesis is that there are qualified people that want/need better work opportunities but traditional hiring processes filter out these people or don't even see them, and that Pool A of Candidates have PreQualified themselves just by playing the CTF.
It's like going on to World of Warcraft or EVE Online and hiring the top market traders / economic strategists for a real world position.
Unfortunately, for most stuff, at some point you simply must have a problem to solve to progress further, and that's where I get derailed. I have a hard time getting excited about the real-life problems, so I end up getting stuck in the beginning stages of new pursuits. I'll read textbooks, I'll memorize syntax, but I'm never drawn to getting my hands dirty.
What I like about this sort of games is that they provide targeted problems for people who aren't naturally drawn to this stuff in practice.
Networks. Compiler theory. Language design. Web APIs. Caching layers. Core algorithms. Packet switch microcontrollers. FPGAs. CRUD apps. Big Data. Anti-abuse tooling. Application security. Machine learning. Any topic you possibly want to throw an engineer at, an investment bank is already throwing a team of engineers at.
Our Chapter 1 release includes levels which have you jailbreak multiple chips (AVR microcontrollers) on a custom handheld device given to minimally trusted gophers to own up a stock exchange through their REST API. And that isn't even a theoretical attack.
Additional factors which tipped the scales include "finance has a default goal function which is really easy to understand", "some subsets of financial work are surprisingly easy to model" (like a stock exchange is), and "finance has narrative choices which allow us to excite people without getting typecast as A Video Game For People Who Played Dungeons and Dragons In High School" (which is, for a variety of reasons, important to the team, including to me, the ex-DM).
Other strong contenders for our first game were "Like Dwarf Fortress but with code" (harder to build than a stock exchange; includes the word "dwarf") and "a nuclear power plant" (slight problem: we know nothing about nuclear power plants).
This comment makes me feel that I must live in an alternate universe of software engineering. I've spent 99% of my career working on things that would be of no interest to an investment bank: GUIs, graphics, video, audio, GPU rendering, mobile platforms, CAD, content creation tools...
(It's not the first time I've had this feeling. At one point years ago, when I had been doing professional programming for maybe 3 years, a friend and colleague asked me a question about databases. I had to confess that I had never worked on software that interfaced with one; that all my work exclusively dealt with local files and network streams. He almost wouldn't believe it.)
One of the many interesting conversations I've had over the last few months is with a guy who leads a team of X00 developers out of one bank's 1X,000 developers, which does minimally GUIs, graphics, GPUs (for rendering and simulation), mobile platforms, and content creation tools. His #1 problem right now is that you are representative of many, many developers who don't know that his sort of group exists. I think he'd describe his job as "We're the thin edge of the wedge hitting the really hard problems so that our customers in the bank can focus development on the really valuable problems."
(I don't know if I'm cleared to talk about them until contract negotiation wraps. Sorry, not trying to be coy here. Take it on faith that many of the big guys run shops which have those needs and more besides.)
Mobile platforms: ...and they want to do this all from wherever they are. :)
Starfighter is divided into N tech trees, where as of the Chapter 1 release N = 2. Each has a distinct player-facing UI and, generally, some specialized backend systems, but they're all a part of the same product, behind the same login, running off the same message bus. Each tech tree has a series of levels: start at level 1, beat it and unlock level 2, etc. The levels do not necessarily progress linearly and trees can interact with each other in terms of level requirements, although I don't know if any levels requiring, etc, "passed $FOO in algorithmic trading and either $BAR or $BAZ from low-level programming" will ship in Chapter 1.
Each level has its own goals/victory conditions/etc. There may be interplay between levels, such that your past/simultaneous performance on one allows you to do X, Y, or Z advantageous thing in the other. Those interactions might happen across tech trees. I am saying "might" here because I haven't coded any level which actually does that but it came up at design meetings and our systems support it -- not sure if it will happen in Chapter 1 but I'd rate it as "highly likely" it happens in Chapter 2.
Chapters: we intend on doing a new content release (which adds to, rather than replaces, existing content) every 6~8 weeks, with a new tech tree introduced roughly every 2~3 chapters.
Would love anyone's thoughts on "How do I explain this succinctly such that I don't turn-off anyone who is less interested in a particular tech tree?"
I've worked with tons of extremely bright, well credentialed people who get lost in the weeds of analysis paralysis or trying to build the world's most complex model. Many fail. The best hires I've made internalize the nuts & bolts quickly, work hard to try many ideas, and are "smart enough." They're probably just as smart as the other guys actually but use intelligence as a tool rather than an end unto to itself.
That said there is also one other thing that prevents me from looking at a career in that kind of business: I imagine the traders as the kind of people with no empathy who are just looking to metaphorically stab you in the back the second they get a dollar in bonus for doing so.
Further, the very concept of what a "trader" is has fundamentally altered in the last 15 years. A trader is just as likely to be a physicist or hold a PhD in signals processing today as they are to be your typical "Tall Guy With Aggression issues".
I'd also point out that lots of people co-mingle different industries. Trading is not investment banking, which is not asset management. There are interesting software problems and good people working in all those fields.
Aside from systematic errors like Knight, market-makers rarely blow up due to competition or a bad model, they just fade away. They make or lose money pretty slowly, they just do it consistently over time.
Aside from the most basic strategies there isn't one "right" way to price a market. It's an engineering problem like any other. How much risk do I accumulate? How should I manage this risk? How far apart should I set my bid and offer? Do I use a simplistic model with lower latency or a more complex one that's slower? Is it better to be more accurate and avoid bad trades or less accurate and build up priority in the order book by staying on a price longer?
A market-maker's objective function is to maximize total profit (turnover * average gain/$ traded) while controlling risk (volatility of P&L over time). Usually changing your answer to questions like the ones above will shift turnover one way and profit per trade & risk in the opposite direction. For example, if you quote your bid and offer very close together, you'll trade large market share and have less risk exposure since you get in and out of positions very quickly, but your profit per trade will be low (if traders arrive randomly, at best you will make the small spread between your bid and offer, in reality a fraction of that since they usually have a reason to trade against you). If you set your quotes wider, you'll make more per trade on large dislocations, but do less volume and hold more risk.
There are a lot of efficient points along this continuum and traders play to their strengths. Someone with little capital/risk tolerance, top-tier infrastructure, and forecasting models for the next price tick should play very differently than someone with a lot of capital, average infrastructure, and models that can forecast the next 10 minutes.
And you are right regarding bonuses, but all team efforts have this problem. Who creates value and deserves the best compensation in a SaSS startup? Is it the salespeople who get clients? The engineers who build the software? The Ops team that keeps it running reliably? I actually find trading to be a bit more meritocratic than other tech jobs: either you make money or you don't, and teams are smaller so it's easier to assign reward (or blame).
I can't think of many options with all of these properties that also require the particular technical skills they're looking for. It feels like doing a market simulation reasonably well is actually easier than their other track (a security CTF).
One particularly nice aspect is how many skills an exchange simulator can test. You have low-level programming and optimization, interesting algorithmic problems and high-level data analysis. That's applicable to a lot of jobs outside of finance. As a game, it's surprisingly open-ended.
Personally, I'm glad they chose this. I actually wrote a market-making bot for a mock exchange as part of an internship. It was fun and a great learning experience and not just for finance. I'm glad somebody is bringing this experience to the public at large.
Around the time a large contract ended in Hong Kong, I was at a web development conference for new programmers getting out of a bootcamp-style program (8 weeks, program or die). They put me on a panel and asked me about what it was like to be a freelance web dev.
At one point, a guy raises his hand and starts asking about equity deals. He asks what it would take to get someone like me to work on a startup with him, no cash. Now, the market's rough for that sort of thing if you want experience. I told this guy that he would just "have to find some bozo who believed in the idea so much, he'd be willing to give up salary in exchange for massive risk. Who's going to do that?" We laughed a bit and moved on.
Well, I ate my hat: I'm that bozo. I was impressed with his knowledge, so I joined up with him and another expert he wrangled. The two of them had an impressive amount of cumulative experience not only in trading, but in writing financial systems. We filled in each others' knowledge gaps perfectly. They took the lead on the backend systems and I did the rest.
Cue months of finance training, seemingly endless numbers of commits (over 5000 between just the frontend and API alone, and that's only half the system), and we quickly pushed out our first beta of BitMEX. It's our take on a derivatives exchange with a much more finance-slanted perspective than our peers. We did months of paper trading and went live November of last year (we're almost to our first birthday!). In that time, we've explored many of the very hard problems in finance (margin trading is incredibly complex), and many more in UX (in short: finance is hard, making it simple for users is even harder). And now we're trading nearly $10M/day and growing.
What's so great about today is that there are so many markets out there you can play on, and so much code to learn from. If you try Stockfighter, I commend you. I'd like to offer our simulation to the community - we run it at https://testnet.bitmex.com, and a really simple market making bot at https://github.com/BitMEX/market-maker. In about 20 minutes you can be up and running market making on our Testnet and trying out your strategies.
Yeah, it's not the most complex bot out there (and we forked it from an old MtGox bot). It pretty much does the minimum possible to quote both sides of a market. But it's a great building block for more complex strategies, and it has all the parts you need, including Websocket hookups. Come grab me on Freenode #bitmex-testnet if you want help with it.
I hope some of you give Stockfighter or our Testnet a try. Finance is a rabbit hole, but it's worth learning about.
(tl;dr: Moved to Hong Kong, met some finance pros, wrote a ton of code, and now am CTO of BitMEX, one of the top Bitcoin exchanges by volume. We have a simulation market, it's worth trying out)
- Doesn't this ask/bid matching sound very, very much like barter?
- If so, for the times when the market isn't liquid, couldn't they introduce... money? You know, to abstract over barter.
(I know I'm asking idiot questions here, but I'd really appreciate someone ELI5 my idiocy here.)
I think what is confusing you is that a grocery have one price for an item and very rarely sold out, whereas as a stockmarket is more like a market: you are dealing with multiple sellers and not guaranteed to be able to find what you want and the price may depend on where you get it.
{
“symbol”: “BAR”,
“venue”: “FOOEX”,
“direction”: “buy”,
“qty”: 20,
“price”: 5100,
“type”: “limit”,
“account” : “OGB12345”, // your trading account (game gives you this)
}
should read "qty": 100 to jive with the response ("originalQty": 100, 80 filled, etc).Solving arbitrary puzzles someone else has set in front of you, in order to get a job, is not a fun programming challenge.
It's one engineer saying "I bet I can come up with something this guy won't be able to do" and clueless companies and HR thinking they can "evaluate" programmers by "how well" they do on these quizzes.
They will miss out on the best programmers because the best ones value their time enough to create new things-- not solve "challenges".
Challenges are attempts to make you fail. They are not about learning about the person.
If you have self respect, you will use Straighter as a filter to exclude companies that are not worth working for (because if they use Starfighter, you can guarantee their working environment is not conducive to a career where you look forward to going to work every day.)
Starfighter should pivot into education. Then this work would be useful. Right now it's corrosive to programming as a profession.
By that I mean, they have two different target audiences: companies who want to hire people, and separately, developers that want to play their game. When there is an overlap of those two groups where they can make a job connection, then great.
I don't think the goal of this is to make it so that anyone who wants a new job plays Stockfighter.
Except this is how actual jobs work. Real business value-creating requirements tend to resemble an arbitrary puzzle much more than something fun to scratch your own itches.
You may be right that Stockfighter won't attract the best programmers. It's not trying to. Those programmers don't need and aren't hired via any sort of challenge system anyway. What Stockfighter is trying to attract and identify are programmers capable of being plugged in to a real-world business application to create value.
Actually they don't. I say this with 25 years experience as an engineer and a couple patents and a long history of solving very hard problems. The hard problems are rare, the trick questions and puzzle type problems virtually never exist in business and are useless for evaluating programmers.
Programming is about a lot more than solving puzzles.
Why not simply give programmers the NYT and have them solve the crossword puzzle? That's what this is the equivalent of.
It only addresses one aspect of programming and actually a very small part.
Thinking about systems. Communicating with code that others can read, and communicating about code in a way that others understand, these are skills not addressed here. Maintenance and reading others code, also not addressed with trick questions.
I really have no problem with them making programming based games-- if the games are fun, great.
My objection is only with using this as some sort of recruiting tool. It shows a lack of understanding of what programming is, and it optimizes for exactly the kind of recruiting tactic that has effectively destroyed the software development profession during the past 20 years-- it's seeking code monkeys, not software developers.
The reason software is broken is the current model is "get a biz guy to tell code monkeys what to do, hire the fastest code monkeys and pay them as little as possible using the threat of outsourcing to indian code monkeys to keep the min line."
The ability to find a faster code monkey (as measured by their score on a coding game or hackerrank or any other arbitrary score) eliminates the messy need to have the hiring team actually understand software development enough to hire developers.
A better solution-- one that would be cheaper and more efficient -- is to hire more expensive software developers and have them lead other more junior software developers to develop software that actually solves business problems.
It's shocking how rare this is.
Straighter is enabling the problem, not trying to solve it.
Given this premise please explain the popularity of Project Euler.
You have no trouble imagining a site like Project Euler funding itself from ads, right?
And you can imagine that virtually nobody who looks at the ads on an ad-funded site actually buys things because of the ads, right? The ads have nothing to do with why people come to the site.
Just mentally substitute "recruiting" for "ads" here.
That said, I'm immensely looking forward to this and have already spent dozens of hours reading up on things and over a hundred bucks on books. (My main decision right now is if I use a higher level language like F# or Haskell to be elegant, or use something lower like Rust for speed. Seeing as they didn't mention any low latency interfaces in this post, I'm guessing high level it is.)
Literally anyone in the industry can get me on Skype, without ever playing Starfighter. I'm hoping that remains true forever, and would be sad if it became untrue.
To the very limited extent you're competing on speed, in Chapter 1 you're competing with a) a Ruby script which b) is forced to sleep for roughly 80~90% of the simulated trading day. You don't exactly need to strive hard to win the race.