14 ms·
Developing in Stockfighter with No Trading Experience
- mrdrozdov 11y agoJust had the realization that Starfighter believes there's a huge market for the sort of talent matching they want to do in finance. Why else would they pick this topic?
- gk1 11y agoPatrick often makes the point that the majority of lucrative development work is in big, (usually) boring, business applications. That's where the money and employment is, so it makes sense to start there.
- tikhonj 11y agoI don't think quantitative finance is what he means though. It's a small, selective sector which is well-known and at least a bit glamorous. There's certainly money there, but far more hopeful candidates than positions.
- deleted 11y ago[deleted]
- patio11 11y agoWe're actually not terribly interested in finance qua finance. We're interested in finance qua "it allows us to do anything in engineering in a fiction-consistent way, plugging into anything else." 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).
- pavlov 11y agoAny topic you possibly want to throw an engineer at, an investment bank is already throwing a team of engineers at. 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.)
- patio11 11y agoI've spent 99% of my career working on things that would be of no interest to an investment bank: 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.)
- bostik 11y ago> GPUs (for rendering and simulation) I'd like to provide a data point for this, btw. There are exchanges for sports gambling (we run one), and some of the most succesful betting syndicates run clusters of hundreds or even low thousands multi-GPU servers to crunch the incoming data on their real-time simulations. The results of this type of crunching are feeds, signaling and strategy shifts for their market makers. I have no doubt investment banks, who operate on an order of magnitude more data, would have something similar. Even if majority of it was used for backtesting.
- tikhonj 11y agoI'm sure that's one consideration, but there are a lot of other compelling reasons. It's fun, it's relatively accessible, it's easy to scale difficulty and it's easy to add competition. Performance is directly quantifiable along multiple axes and they can release multiplayer scenarios in the future. 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.
- mrchicity 11y agoI run a mid-sized (5-10 employees) trading desk for an automated market-maker. My first thought upon reading about this game, not knowing what Starfighter is, was "holy shit, I'd love to hire someone who excelled at this or even attempted it." 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.
- MichaelGG 11y agoReally? Aren't most of you at real cutting edge, like coming up with FPGA designs to implement the trade strategies?
- mrchicity 11y agoA lot of research is done in higher-level languages.
- pjlegato 11y agoHey, send me a message, pjlegato at databaselabs dot io.
- tomjen3 11y agoI am definitely one of those people who would assume you have to be a genius to do work in finance because I imagine that if your product isn't perfect you will be eaten alive in the markets. 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.
- kasey_junk 11y agoI've found that traders are no more or less empathetic than any other cross section of users you might encounter in other industries. There are some trading desks that are more bro'd up than others and each trading desk has it's own culture, but the same is true of startups, which correlate pretty well with small trading desks in lots of ways. 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.
- darklajid 11y agoI have the utmost respect for Patrick and the team - and just read the same thing via mail. 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.
- MichaelGG 11y agoInteresting. I'm the opposite. I was sorta curious, so I started reading Flash Boys. It became immediately obvious that A: the author is fucking clueless, and B: I didn't know enough about how this system worked. The book called "Dark Pools" was a bit better (mainly as a light history of electronic trading). "Flash Boys: Not So Fast" was really fun, mainly because it systematically trashes the author of Flash Boys. 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?
- steveklabnik 11y agoFantastic read, and a great introduction to the subject matter. Kudos! 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.
- buzzdenver 11y agoI agree 1000% that the best way to learn something is to start with a problem that interests you, and dive into it. The opposite way, where you start with a technology that sounds interesting and new, and learn it for the sake of knowing it never worked for me.
- hodwik 11y agoI wish I could trade with you; I love learning stuff but it's not so much about using it practically, as it is that I just want to understand it. 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.
- minimax 11y agoThe stock market is incredibly liquid: for any stock listed on an exchange, you can buy almost any quantity and sell almost any quantity, at any time the market is in session. 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.
- patio11 11y agoYeah, should have said "relative to the expectations of a normal human." Shopping a block trade is, I think, level two?
- minimax 11y agoI'm not sure what exactly you mean by block (in terms of size), but let's say you have a stock and the average number of shares at the inside (best) price is X. If you are trying to trade 10X shares, you aren't just going to aggressively trade through multiple price levels all at once to get the trade done, and if you just place an order for 10X shares into the book you will find that the price starts moving away from your order price pretty quickly. For a high volume ETF like SPY, X can be thousands of shares, but for low volume mid/small caps it may be only a few hundred shares, which is not something I'd consider "incredibly liquid."
- echion 11y agoThe sentence is close to literally true, but what I think you're questioning is the implied "[at a price close to the current price]" at the end of it.
- MCRed 11y agoA fun programming challenge is building an open source platform or some other software that scratches your own itches-- it's being a creator. 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.
- elbear 11y agoDid you consider that some people will just want to solve the challenges for fun not because they want to get a job?
- MichaelGG 11y agoI highly doubt I'll get a job out of Starfighter, if only because any good compensation (150K+) is probably gonna require a ton of work. (Especially being outside of SV, since such salaries are really top end so the demands are too.) I'm comfy enough doing little consulting here and there. The most I can see getting out of Starfighter professionally is the promise of 10-15 minutes with Patrick and Thomas (I think that's the prize if you win?). 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.)
- patio11 11y ago
- tezza 11y ago> "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 )
- MichaelGG 11y agoAny suggestions on what to read to get up on these details? I've started "Trading and Exchanges", "Algorithmic Trading and DMA", and "Market Microstructure in Practise". Does that sound like a good path?
- hardikp 11y agoFor US equities, nanex research articles (http://www.nanex.net/NxResearch/ResearchPage/0/?sort_val=date http://www.nanex.net/NxResearch/ResearchPage/0/?sort_val=dat...) provide good insight into various aspects. 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.
- phyalow 11y agoNanex is overhyped gibberish.
- 11y ago
- zerr 11y agoI don't fully understand what's the main purpose of this "game" (edit: regarding recruiting)? 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.
- dcosson 11y ago3. Fun :)
- tptacek 11y agoI don't fully understand the purpose either. People just seem to love playing CTF-style programming games, and we happen to really enjoy making them. It is OK if they are not your cup of tea.
- zerr 11y agoI meant with regard to recruiting, which is what your (new) company is about (again, if I understand correctly :)).
- tptacek 11y agoI literally lack the ability to form coherent sentences about our business that don't somehow involve how to render a graph of AVR basic blocks in a React web app, is how little we're thinking about how the game interacts with recruiting right now. 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. :)
- zerr 11y agoI see. So it is kind of classic way - create the community first and make the business out of it later :)
- 11y ago
- it_learnses 11y agodid you mean "model web developer" instead of "modal web developer" ?
- tptacek 11y agoModal as in the statistical mode.
- jonknee 11y ago> These days the markets are decimalized — stocks trade in increments of a penny. (They are not allowed to trade in increments smaller than a penny, by federal regulation. This is unfortunate, because “the minimum spread is 0.01 dollars” is not any more rational than “the minimum spread is 0.125 dollars” — if someone is willing to provide liquidity for cheaper, we should encourage that.) 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-really-trade-for-fractions-of-a-penny-sort-of/ http://blogs.reuters.com/ben-walsh/2013/11/18/do-stocks-real...
- MichaelGG 11y agoPatrick: If the REST URL has FOOEX and BAR, why is that info repeated in the JSON body?
- patio11 11y agoIt's optional -- if you don't put them in, we do. The canonical representations of any order has them in, otherwise you have no clue what is going on.
- MichaelGG 11y agoSo why bother with putting them in the URL? Why not just have /submit and put the details in the body where they belong?
- deleted 11y ago[deleted]
- tptacek 11y agoCorrection to Patrick: we do support FIX in ch1, but you have to write AVR assembly to use it.
- ninjakeyboard 11y agoI saw this email today - sounds like some cool play to me. There are both trading problems as well as lower level challenges. Seems like there is something for everyone. The idea that hits home is that it presents problems which you may not know about in domains and technology areas that are not ones that you work in so you get to flex yourself a bit in new ways.
- lordnacho 11y agoAs someone who wrote the whole tech stack of a hedge fund, this looks really interesting. The summary looks pretty good, though I've only skimmed it. 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?
- BWStearns 11y ago> 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.
- STRML 11y agoMarkets are truly fascinating. However much you think you know, you don't know as much as you could. The whole idea of Stockfigher really resonated with my experience over the last year and a half. Markets are incredibly complex. 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 https://testnet.bitmex.com, and a really simple market making bot at https://github.com/BitMEX/market-maker 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)
- EFruit 11y agoI'd much rather use something like Stockfighter, but built around experimentation; one that has no competition, and no recruiters looking over your shoulder, scrutinizing your work. 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 https://github.com/Efruit/marqit .</plug> I might take another swing at it if I can get through this article in one piece.
- tptacek 11y agoThe non-competitive open-ended Stockfighter you're looking for is called Stockfighter. :) 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.
- TeMPOraL 11y agoI know next to nothing about stock markets, but reading 'patio11's description made me think about two things: - 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.)
- tomjen3 11y agoWell that is what they are doing, say you want to sell you stock in apple because the new iPhone is crap. Well Apple doesn't pay dividends (i think Microsoft is the only tech stock that does) so the only way anybody wants to buy is if they think the stock will go up in the future, so you need to find somebody who wants Apple stock more than they want the money. Well what if you can't find somebody right now? That is where the makers come in and buy the stock for a short while, hoping that they are then able to sell it shortly to somebody else for a profit. 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.
- consz 11y agoBy money, do you mean IOUs? Who's handing out the IOUs during illiquid times? Certainly not the exchange, they have no interest in bearing risk of holding actual positions, they're merely providing a marketplace.
- finnh 11y agobugfix - the sample order: { “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).
- KasianFranks 11y agoContact me, I know a lot about what you're trying to do.