## The surprisingly complex math behind startup equity and taxes

Taxes for employees at startups are weird and can vastly change the amount you make.  To illustrate why, let’s take a simple example.

Suppose we have a group of early employees at a startup, we’ll call them the Unicorn Inc. Mafia.  They’re all fresh out of college and managed to get through it without any debt, so they each have a net worth of \$0. They all join the same day and are given the same equity package: \$10k in stock options with a strike prices of \$1 (so, 10,000 common stock). We’ll take four members of the mafia, each with a different strategy.

Name Description Net worth
Alice Exercise very early, before price changes \$0
Bob Exercise somewhat early \$0
Carol Wait until liquid to exercise, wait until long-term capital gains apply \$0
David Wait until liquid to exercise, sell immediately \$0

From here on out, keep in mind that this could be the end of the story. The company could always fold, leaving everyone with zero or, if they’ve exercised, a negative net worth.

However, suppose the company is doing well and lets the employees know that they’re going out to raise a \$40M round.  Alice exercises her options before the round happens.  This means that she has to pay for them, so she’s in the hole \$10k.  Now if anything goes wrong, she’s out \$10,000.

Once the company raises the round, the stock is worth \$5/share.  Unfortunately, Bob’s significant other got a job across the country, so he has to find a new job. He feels like the company is going places, though, so he wants to collect his equity before he goes. He exercises his options. Because he is buying his stock for \$1 and it is now worth \$5, the IRS says that he just “made” \$4. So he has to pay normal income taxes on that \$40,000. To keep things simple, let’s say everyone’s tax rate is 25%. So now he’s paid \$10k for the stock and \$10k for taxes:

Name Description Exercise Income taxes Net worth
Alice Exercise very early, before price changes (\$10,000) 0 (\$10,000)
Bob Exercise somewhat early (\$10,000) 25%*\$40,000 -> (\$10,000) (\$20,000)
Carol Wait until liquid to exercise, wait until long-term capital gains apply \$0 \$0 \$0
David Wait until liquid to exercise, sell immediately \$0 \$0 \$0

So Bob’s out \$20k if the company goes under (ouch!).

However, luckily for Alice & Bob, over the next several years, the company continues to grow and raise money. Finally, the company goes public for \$100/share. Wow! Once the lockup period expires, everyone eventually sells (somehow it’s still exactly at the IPO price) and makes \$1M. Our final shakeout looks like:

Name Description Exercise Income taxes Short-term capital gains Long-term capital gains Sell price Net worth
Alice Exercise very early, before price changes (\$10,000) 0 0 0 \$1,000,000 \$990,000
Bob Exercise somewhat early (\$10,000) 25%*\$40,000 -> (\$10,000) 0 20%*\$990,000 -> (\$198,000) \$1,000,000 \$782,000
Carol Wait until liquid to exercise, wait until long-term capital gains apply (\$10,000) 25%*\$990,000 -> (\$247,500) 0 20%*\$990,000 -> (\$198,000) \$1,000,000 \$544,500
David Wait until liquid to exercise, sell immediately (\$10,000) 25%*\$990,000 -> (\$247,500) 25%*\$990,000 -> (\$247,500) 0 \$1,000,000 \$495,000

There are, uh, a couple of different outcomes. Alice obviously has an accountant in the family: she avoided paying any taxes at all! How is this possible? First, she exercised his options before the price changed, so she didn’t have to pay any taxes on exercise. Then she held them long enough to qualify for long-term capital gains. However, she didn’t even have to pay those! It turns out that, if you own stock in a startup before it has \$50M in assets, long-term capital gains up to \$10M are tax-free (Google “QSBS” for details). However, Alice is also taking on more risk for longer than anyone else: most startups don’t have outcomes like this and she’d have just been out \$10,000 if they had gone out of business.

Obviously there are a ton of simplifying assumptions (stock prices never change! Everyone has the same tax rate, which happens to be one that make numbers easy!). However, I wish someone had told me about all this ~10 years ago, so putting this out there in the hopes that it’ll help someone else.

## Goals for 2019

Followup from last year’s post:

Programming: I really dug into Pandas and not I feel pretty comfy with Python & Pandas. This year, I’d like to focus a bit more on stats and machine learning.

Work-life balance: I am freakin obsessed with my job, which is terrific. But I also feel comfy taking days off and leaving at a reasonable time to walk Domino. So, solid win on that front. I’d like to keep that going this year.

Had many fun adventures with Andrew. We’ve kind of made that a priority this year and I’d like to continue doing that.

Baking: made all sorts of cool things. Highlights were Georgian cheese bread (which tasted like crack but sat like a bag of cement), apple cider donut muffins (they’re muffins, so they’re healthy!), and cinnamon pull-apart bread (I killed the yeast and they were still delicious).

Boxing: started going to sparring regularly, which is incredibly fun and hard.  However, one of the women I spar with is several inches taller than me, solid muscle, and just got down to 30lbs lighter than me for a fight. While I don’t feel the need to be that skinny, I’m thinking maybe I should lose a couple pounds next year. Speaking of:

Eating better: we ate weekly salads this year (thanks to Andrew!) but I wouldn’t say we ate more healthily overall. I think we have a solid plan for next year, though.

Finances: not sure if I saved more than usual from my paychecks, but the MongoDB IPO was a nice bump! Dropping this from goals for next year.

Travel: failed miserably, had to go to California many times for work. However, I think I’ve figured out the basics of air travel to the extent that I no longer feel totally screwed over every time I fly.  I even got a free upgrade last trip! Dropping this from goals for next year, I’m going to have to continue to travel a bunch. And playing Assassin’s Creed: Odyssey is making me want to visit Greece.

Read a couple of books: success! My favorite books this year were Spinning Silver and Bad Blood. Dropping this from goals for next year.

Writing: despite feeling like I wasn’t writing anything, actually did manage to hit my goals.  Also, started writing on Medium, since it’s a GV investment.  I’d like to continue with attempting 6 posts next year.

Went camping and hiking a couple times and it was very nice, aside from the one time we got caught in the rain several miles from the trailhead.  But that was fun too, just not at the moment.

Home improvement: fixed most of our toilet’s innards and it works so much better now.  Brings me joy with every flush!

Finally, it was fun to think about this list and what I had done so far all year, looking forward to following up around New Year’s.  So, hopefully it’ll be the same next year.  Happy 2019!

## AST Financial: the dumpster fire of a company

As an employee at MongoDB for several years, I had a bunch of shares that MongoDB was holding for me when it went public which I had to get to my brokerage account to actually sell. It turns out that the company can’t just hand you your shares, they have to go through a transfer agent who keeps the record of who owns what shares of a company. Then the transfer agent transfers those shares to a brokerage.

So several months ago, I got an email that MongoDB would be transferring my shares to AST Financial (a transfer agent). I got an email from them with some forms to return. I heard from international friends that the email address they gave to people outside the US didn’t actually work, but luckily mine worked fine.

I received a somewhat confusing snail mail from AST with an account summary, which added together my first and last stock grants and broke those out into a separate section than the total, for reasons that are completely unclear to me.

I figured that maybe their website would have a more detailed breakdown, so I tried to activate my account. Their password form was pretty badly done but whatever, banks always have crappy logins. Then we got to the “security questions,” which either didn’t actually apply to me (‘What is your oldest sibling’s middle name?’) or might as well have been yes/no questions (‘What color was your first dog?’ Black. It’s the most common damn color for dogs in the world.) Then I agreed to their terms and services and… got an error page. I tried going back to the homepage, saying “Sign up” again, and it took me directly to the terms & services. I nervously accepted, again. My account appeared!

Note that every time I have logged in subsequently, the site has presented an error page. Then I go back to the home page, click “Log in” again, and it takes me to my account.

I decided it was time to transfer my shares to my usual brokerage account. So I called AST, navigated their phone maze, and waited for someone to pick up. And waited, and waited. Eventually, the robot said that they were experiencing heavy call volumes and asked me to leave a message.

I left a message and a support person called a few hours later. Yay! I explained what I wanted and she asked to put me on hold while she looked up my account. Then she disconnected me.

After I finished raging, I called them back. After an hour of waiting for someone to pick up, I gave up and hung up. I sent the original person who had responded to emailed-in forms, asking her to please have someone contact me.

I received a response from help@astfinancial.com: the original email they sent with the forms to fill out and send back.

Luckily, the MongoDB alumni had a group where everyone was bitching and, to a lesser extent, offering advice. Apparently AST actually had an online conversion process: under Account Holdings -> Account Profile, which of course takes you to the General Account Information page, which (of course) is where you transfer shares. I clicked on the button to convert my shares and… got a page that said “ERROR. An error occurred while processing your request.” I tried going to the previous page (which of course didn’t work, back button just took me to the error page again and history was unhelpfully a zillion pages with the title “AST” so I manually put in the URL. This got me to the conversion confirmation page, where it asked if I wanted to submit to convert all shares… with a universal “go back” symbol on the button.

Playing with fire, I entered my total number of shares and pressed submit. It gave me a confirmation page… with a submit button. So I submitted again, and finally got to the real confirmation page.

I didn’t want to publish this before I got extricated from ever having to deal with them again, but now that all my shares are safely out of their hands: AST is the worst. Anyone working on a blockchain-backed transfer agent?

## Thinking with Pandas

You can see and run all of my work for this blog post at Colabratory.

Pandas is a Python library for manipulating data. Wrapping my head around it took a while: I’ve been using it for ~6 months and I’m still learning how to use it “right.” It uses all kinds of syntactic sugar to optimize working with vectors and matrices instead of scalars. This makes working with Pandas very different than working with “vanilla” Python.

For example, let’s say you wanted to get a bunch of random dice rolls for playing Dungeons and Dragons. D&D uses 20-sided dice, so in normal Python, you’d probably do something like:

```rolls = [random(1, 21) for i in range(0, 10000)]
```

In Pandas, it would be something like:

```rolls = pd.DataFrame(np.random.randint(1, 21, size=(10000, 1)), columns=['roll'])
```

In D&D, rolling a 20 on the die is special and called a “critical hit.” It usually does good things for the player. If we iterate through rolls seeing how many critical hits we have in vanilla Python, it’s pretty fast:

```%%timeit
count = 0
for roll in rolls:
if roll == 20:
count += 1

# Output:
1000 loops, best of 3: 267 µs per loop
```

If we do the same naive approach with Pandas, it’s, uh, slower:

```%%timeit
count = 0
for roll in rolls.iterrows():
count += (roll[1] == 20)
count

# Output:
1 loop, best of 3: 3.12 s per loop
```

That’s over 10,000x slower (267 µs -> 3.12 seconds). Like, they-must-have-put-a-sleep()-in-iterrows()-to-discourage-you-from-using-it slow.

So why use Pandas? Because it isn’t slow if you do it the “Pandas way”:

```%%timeit
(rolls.roll == 20).sum()

# Output:
1000 loops, best of 3: 341 µs per loop
```

Nice! Only 1.3x slower than vanilla Python. Also, notice the syntactic sugar: you can pretend that the vector is a single number, comparing it to a scalar. If you look at `(rolls.roll == 20)`, it’s a series of booleans:

```(rolls.roll == 20).head()
0    False
1    False
2    False
3    True
4    False
```

When you take the sum() of that series, False is converted to 0 and True to 1, so the sum is the number of True elements.

## Modifying some elements of a vector

If you’re attacking and your roll (as calculated above) is greater than the defender’s armor class (say, 14), then you roll for damage. Suppose you do 2d6 damage on a hit. If your attack roll is greater than or equal to 14, then you do 2d6 damage, otherwise the blow glances off their armor and you do 0 damage.

With vanilla Python, this would look something like:

```for roll in rolls:
if roll >= 14:
damage = roll_damage()
else:
damage = 0
```

However, with Pandas, we shouldn’t loop through the rows. Instead, we’ll use a mask. Like a theater mask, a Pandas mask is an opaque structure that you “punch holes” in wherever you want operations to happen. Then you apply the mask to your Pandas dataframe and apply the operation: only the entries where there are “holes” will get the operation applied.

First we create the mask with the criteria we want to update:

```mask = rolls.roll >= 14
0    False
1    False
2    False
3    True
4    True
Name: roll, dtype: bool
```

Now we want to:

1. Grab all the hits (wherever the mask is `True`).
2. Generate random numbers for each hit (equivalent to rolling 2d6).
3. Merge those hits back into the `rolls` dataframe.

First we’ll create a series that tracks all of the hits. We want to be able to merge that back into our original dataframe at the end, so we want to preserve the index of each hit from the original dataframe. Based on the mask above, this would be `[3, 4, ...]` and so on (wherever the mask is `True`). We get this with `mask[mask]`, which is a series of all the True values with their associated index. Then we set every element of this series to a randomly generate 2d6 roll:

```hits = pd.Series(index=mask[mask].index)
hits.loc[:] = np.random.randint(1, 7, size=(len(hits),)) + np.random.randint(1, 7, size=(len(hits),))
3     6
4     3
9     8
10    3
14    3
dtype: int64
```

Note that we’re generating a “1D” random int (`randint(len(hits),)`) for the damage instead of the 2D one above (`randint(10000,1)`) because this is a series (1D), not a dataframe (2D).

Then we can combine that damage back into the rolls dataframe using our original mask:

```rolls.loc[mask, 'damage'] = hits
roll	damage
0	8	0
1	8	0
2	6	0
3	17	7
4	15	7
```

This lets you quickly and selectively update data.

Also, I’m still learning! Let me know in the comments if there’s a better way to do any of this.

## GV

Quick update: I’m now a partner at Google Ventures! I’m still doing engineering (although I would love to hear about it if you know about any cool startups I should check out) and I’m really enjoying being back at Google.

## Staying out of trouble on Elastic Beanstalk

Editor’s note: devops always makes me cranky and Domino is in the doggy hospital (he’s okay), so have a rant about Elastic Beanstalk.

This is my life:

If you’re unfamiliar with Elastic Beanstalk: healthy is green, unhealthy is red, and grey is unreachable. Grey is the worst, because it’s inescapable: you can’t change the configuration once it’s grey and if it’s your configuration at fault, none of these options will actually help you:

Theoretically, if you had a good configuration, you could load it from this list. But obviously I don’t. Amazon is just being prissy here: “Well, you really should have made a known-good configuration before mucking around with your only config, shouldn’t you have?”

Shut up, Amazon.

Here is some hard-won advice I have on configuring an Elastic Beanstalk environment:

If you’ve never used Elastic Beanstalk before, start your journey by filing an allocation request. By default, Amazon lets you start up 0 instances. This was insufficient for my needs of, you know, running something. You can check your limits at EC2 -> Limits section (for your region).

Set up SSH key and upload it to the Key Pairs section of EC2. Then, when you’re first creating your Elastic Beanstalk environment, go to “More options” and add it as an SSH key. That way you can actually log into the machine when things inevitably go wrong.

Add a user. Give it access to AWSElasticBeanstalkWhatever (honestly, I’d go with FullAccess for development, but obviously I have no idea what I’m doing). Create an access key for it. Copy the security key! It’s the last time Amazon will ever let you see it. Put it in your ~/.aws/credentials file.

The documentation on credentials files assumes that you were born knowing how a multi-profile credentials file should be formatted. In case you weren’t, here’s how it’s supposed to look:

```[default]
aws_access_key_id = HEREISTHEKEYID
aws_secret_access_key = shhItsASecretToEveryone
[personal]
aws_access_key_id = ANOTHERKEYID
aws_secret_access_key = moreSecrets
```

Not exactly mind-blowing, but I hate it when documentation does that.

`personal` is the profile I use for my personal projects. Every time I run `eb whatever` on a personal project, I have to remember to specify `eb whatever --profile personal`. This is not a thing I am good at remembering: I have uploaded personal projects to my work EB account ~40 times. But, it beats the alternative of uploading my work projects to my personal account.

For my fellow absent-minded readers, I recommend setting the environment variable `AWS_PROFILE=personal` to default to personal when needed. However, if I do that, I will inevitably forget to unset it when I’m done. So, I set my prompt to show the variable–prominently–whenever it’s set:

```PS1='\$(date +%X) w\$(__git_ps1)\${AWS_PROFILE+ e[41m\${AWS_PROFILE}}e[0m\$ '
```

This looks like:

Honestly, I could still miss that. But it’s less likely.

Once you get all that done, you’re probably ready to actually create your “zero configuration required” Elastic Beanstalk app.

## The thing about renting an apartment in NYC

There’s a lot of weird stuff about NYC real estate and this post attempts to cover some of the things that I’ve experienced. I’ve spent years renting apartments in NYC, mostly from rather small-time landlords with pre-war, rent stabilized buildings. If you’re looking for luxury rentals in new construction, a lot of this advice probably doesn’t apply.

##### The Mysterious Other Renter

When I’ve found a place I like, invariably the real estate agent calls me a couple hours later telling me that someone else is willing to take the apartment for \$100-\$200 more per month. Luckily, I’ve never been in a position where I need that particular shitty rental, so I’ve always said, “That’s too bad, I guess I’ll keep looking.” Then a couple hours later the real estate agent calls back and tells me that the other deal miraculously fell through, would I still like the apartment?

This is, I assume, a scummy trick on the part of real estate agent to get an extra \$100 commission for a few minutes of extra work (and ingratiate themselves with the landlord). If you have options, don’t fall into a bidding war over a rental.

##### “Legal rent” vs. what you’re paying

This can actually works out in your favor (at least in the short term). If you are looking for a cheap place, you’re likely to end up with a rent-stabilized apartment. Often, when you sign the lease, there will be an alarmingly high rent listed on the lease (e.g., if you agreed to pay \$1,800/month, the lease lists \$2,600).

How this works: for rent-stabilized apartments, the landlord is only allowed to raise the rent by a certain city-determined amount each year. For example, if you’re paying \$2000/month and the city says landlords can raise rent-stabilized rents by 2%, the landlord can ask you to pay \$2200 next year. However, let’s say you’re a good tenant: you always pay your rent on time. You threaten* to move unless the landlord keeps the rent at \$2000. So they do: they’d rather have another “guaranteed” \$24,000 than risk months of vacancy, a bad tenant, etc. for an extra \$2,400.

The city also sometimes puts the rent increase at 0%. Up until last year, there were ~5 years of 0% rent increases. If a landlord had been bumping the legal rent by the max allowable amount before that, though, they could keep bumping the actually rent (up to the legal rent’s ceiling).

Gentrification also is an issue: if you are renting a rent-stabilized apartment and the landlord wants to renovate it into luxury apartments, they have to get rid of their current tenants, first. A great way to do this is to suddenly bump your rent to the max legal rent. If you balked at paying an extra \$200/month for a crappy studio with no view, how would you feel about a \$1k/month bump? Only the old tenants are gone, the landlord is free to renovate the apartment. Renovations increase the allowable rent they can charge for the apartment, often bumping it out of the range that the city will consider rent-stabilized… allowing the landlord to charge the new tenants absolutely anything.

##### The migratory patterns of renters

Most people move in the warmer months. Once it starts to get cold, people seem to have a nesting instinct and just don’t want to go out and find a place. This means that landlords are more likely to make concessions and give discounts in the winter months, if you can move then. And they’re more likely to be friendly about letting you out of your lease in the summer months.

##### Rental agents: the crème de la crap

Real estate agents work on commission: they literally make \$0 salary. Like strippers, they generally pay the brokerage for getting to use their space. Because brokerages can charge agents to work for them, they’ll often hire literally anyone that can pass the licensing exam.

Now guess which gives a better commission: signing a lease on a rent-stabilized apartment or closing a \$2.5 million sale. The lease gives the agent one month’s rent (maybe a thousand). The sale gives them a few percent of the listing price (maybe \$30,000 for the example above).* There are more expenses with selling a listing, but still. Thus, the real estate agents you’ll be working with will generally be the least-experienced agents at the brokerage. A broker once told me, “If a new agent has a deep network and skills, I’m not going to waste them doing rentals.” Putting together rental deals is the latrine duty of real estate.

Thus, if you can avoid it, don’t work with an agent. They’re unlikely to be good at their job and are generally a huge waste of money. However, landlords of big buildings (especially) will sometimes only work with real estate agents. This is because the real estate agents will do some pre-screening (if you make \$30k/year they’re not going to waste anyone’s time showing you a \$3k/month place) and they will steer tenants to the buildings that they work with (which works out well for everyone, pretty much: the landlords get tenants, the tenants find a place, the real estate agent gets a commission fairly easily).

If you are trying to avoid a broker’s fee, though, you’ll want to avoid those buildings.

##### Leases

In Manhattan, you’re almost certainly going to have standard year-long leases. The landlord sends you a new lease within 90 days of your lease expiring and you either sign it, ask for modifications, or decline and move out. If you need to move out before that, try to find someone to take over your lease (hey, I know a startup that can help with that) or your landlord is likely to fine you at least a month’s rent (good bye security deposit) for breaking the lease.

A perk of Queens and Brooklyn is that leases often turn into month-to-month leases after then initial year is up (and occasionally will start as month-to-month leases). This gives you a lot more flexibility: often you only have to give 30 days notice before moving out. (I don’t know much about renting in the Bronx or Staten Island.)

##### Wrapping up

When dealing with landlords: remember that they really just want someone who will reliably pay rent. And, I mean, not burn the place down or turn it into a drug den, but hopefully you won’t have to work very hard to convince them of that side of it.

When working with agents: remember that they are in it for the commission and you are probably more skilled at literally everything than they are, but they have connections and (some) experience. But do your own research and don’t trust anything they say. And since I’m a real estate agent… and I wrote this post… well, I guess this was a huge waste of your time 🙂

I’d love to hear what your experiences have been, let me know in the comments.

* Threatening your landlord: I use the word “threaten” loosely. I’ve always had good luck with just calling the landlord and saying, “I’d really like to stay, is there any way you can see your way to keeping the rent at \$2k?” So I’m not going all First Blood on them.
* Commission on sales and rentals: I’m assuming that a brokerage is likely to take at least 50% of the commission for either, although this varies widely.

## A self-indulgent post for a self-indulgent day

I think how I feel around holidays is a good barometer for how my life is going. For example, last year over the winter vacation, I just wanted to stay there forever and dreaded returning to “real life.” By contrast, year’s winter vacation I had a lot of fun, but I was looking forward to coming back to work.

Similarly, today is my birthday and I did exactly what I wanted to do: went to work and got dumplings for lunch (which I do a couple times a week). I got a bonus sesame pancake sandwich, which I don’t usually get and was delicious, but I was so full I could only eat half of it. And got a piece of my favorite kind of cake (tres leches from Whole Foods), which I don’t have on a weekly basis. At work I was actually doing work that I don’t enjoy very much, but I knew it was important and related directly to my company’s success. And I found and fixed the bug I was looking for, pushed the fix, and got to see my fix working in production, which was satisfying.

Now I am drinking whiskey and finishing out the day coding up some more enjoyable stuff with two dogs at my feet (both had some of my leftover sandwich). Life is good.

## Goals for 2018

A list of things that I think are doable that I’d like to accomplish over the next year:

• Become as good at Node.js as I am at other languages. I’ve been very impressed by the community so far and EcmaScript 6 is very interesting.
• I think I’m on track for good work/life balance, but make adjustments as necessary there. Try not to feel guilty when I leave work. I am very much enjoying startup life and I really want it to be successful, but I also have need to have time and energy for Andrew and Domino.
• Make sure I have the time and energy to keep having fun adventures with Andrew. He is my favorite person to do everything with, and it’s way too easy to end up doing nothing together every day.
• Learn how to bake some other interesting things. This year I got scones, coffeecake, sausage gravy, and creme patisserie nailed, but I’d like to expand my repertoire.
• On a somewhat related note, continue with boxing and get stronger/more in shape. I am super enjoying boxing and I have more upper body strength than I’ve ever had in my life.
• Eat fruits and veggies more often. We’ve implemented a salad-once-a-week plan, but other than that this is probably the least likely to actually happen.
• Continue to cut spending where possible. I’m generally pretty pleased with my budget, but there’s always room for improvement.
• Not have to leave the country, nor take an airplane anywhere. No plans to do so and hopefully that will continue.
• Read a couple of books. I’ve been reading less and less longform, I’d like to at least read one or two books.
• Write at least 6 blog posts. Or otherwise make things/do creative projects.
• Go camping. Maybe not for a couple of months, though.
• Do a home improvement project. I’ve got a bunch of minor and major projects I’d like to do, it’d be satisfying to knock out one or two.
• Remember to follow up and see how I did on these at the end of the year.

## IPOs, 101

When a friend IM’d me and told me she saw an article saying that MongoDB had filed for IPO, I embarked on a months-long journey of discovering that I knew nothing about IPOs. I found it a bit difficult to get information about them, so I figured I’d write up what I learned. This is mostly from other people/things I read online, so please leave a comment if I got anything wrong/missed anything.

An IPO is a chance for the company to raise funds. Being a publicly-traded company also forces them to have more transparency in accounting and other good things, but the IPO itself is mostly a fundraising event: the company is selling X shares for \$Y.

The first thing a company does is find some underwriters, which are large banks who try to sell the offering. Then the company files a confidential S-1 (probably). The confidential version lets them go back and forth with the SEC and iron out any details. Apparently there have been some embarrassing S-1s in the past where companies gave out trade secrets, had blatantly bad accounting, etc. Generally this stage will last a while, as the SEC tends to have suggestions. The SEC could come back with major issues and the company might decide not to file after all. Basically, at this point, you know nothing about anything. But there’s hope.

If all goes well with the SEC, the company will publicly file their S-1. You can find public S-1s on Edgar, the SEC database, but this will still give you approximately no information. Okay, it has profits and losses and risks and all sorts of information that you’re probably interested in if you’re an investor, but if you’re a techie you’re probably looking for the opening price and that probably won’t be there yet. This is because the company will keep amending the S-1 as the IPO approaches. I recommend subscribing: you can ask Edgar to alert you every time there’s activity for a given company.

At a certain point, the IPO date will be announced. You can find a calendar of upcoming IPOs on the stock exchange’s website (e.g., NASDAQ’s calendar). One thing I found confusing was that the day listed was actually the day before what I’d think of as the IPO: the day listed is the “pricing day” when they decide on the price to open at. About a week before this date, a possible opening price will be announced (i.e., the S-1 filing will be amended). This is subject to change, MongoDB’s original projection was \$18-\$20, then \$22, then ended up opening at \$24.

Some companies will do a “road show,” where they present what the company does to investors. Honestly, if MongoDB did one of these, I totally missed it. Of course, I’m not the target audience, so maybe it happened.

Around this time, the underwriters will find institutional investors to buy the initial offering. At the point the stock goes on sale, hopefully a large portion of offering has already been spoken for. However, the company doesn’t want the entire offering to be spoken for, so they can take advantage if the price “pops” on the opening day.

Another thing underwriters do is gauge excitement and try to choose a good opening price. A good opening price is as high as possible (to raise the maximum amount for the company) while still allowing it to “pop” sufficiently the first day. There is a psychological factor here (investors like it when the stock jumps the first day) and a practical one: the investors the underwriters convinced to invest in the IPO want to get a 20-30% return. In one day. This blows my mind: if you want to make money off of a startup, obviously the best way isn’t to be involved in one at all. Just work on Wall St. Sigh.

The next morning, at least for NASDAQ, you can look at the NASDAQ Facebook page to get a livestream of the event. It happened at ~10:30, although I thought the market opened at 9:30. So that was a little confusing. Some stock market guy will go up, say a couple of words, and introduce the company president. That guy will get up, say some stuff about the company (MongoDB’s the first DB company to go public in 27 years!). Then they get a bunch of people from the company onstage, there will be a countdown, the company president gets to “ring the bell” (which, AFAICT, is now touching a button on a touchscreen, which was a little sad) and then trading starts.

But not for you.

Remember the option agreements you signed? Me neither, but there’s a clause that’s called a “lock out period.” This is to prevent current/former employees (and investors) from dumping their stock and driving the overall price down. Since a main goal of an IPO is to raise money for the company (and, apparently, fat cats, grr), they don’t want a free-for-all when trading opens. Thus, you have to wait 6 months to start selling your equity. If you do not, the SEC will hunt you down and fine the crap out of you.

10 days after the IPO, the “quiet period” will end. This is when “insiders” (AFAICT, anyone on Wall St) will publish what they think of the company: buy/sell/hold recommendations. This is interesting and will give you an idea about what large banks think the price should be, but again, there are no guarantees.

At 6 months, the lock out period will expire. Generally around this time the stock will dip, as everyone’s expecting a lot of noobs to be dumping their equity.

All in all, it’s a very slow process. I expected it to be more fast-paced and dramatic, but it’s basically several months of speculation and then a few days of activity.

Resources:

• I found Seeking Alpha had good financial analysis before the event.