Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From the article:

>The problem arises when Robinhood incorrectly adds the value of those calls to the user’s own capital.

This is not precise. Premiums received from short options positions _do_ get added to your "capital" and show up as cash in your account. You will accrue interest, etc. on this cash like any other cash in your account. The premiums should _not_ increase your margin/buying power which is where RH made a mistake.



Not quite. The issue is that Robinhood incorrectly valued the stock collateral covering a short call position. It should be valued at the strike price of the call option, rather than the current spot price of the security.

Eg, suppose FOO is trading at $100/share, and you have $5k of cash and $5k of free margin. You use all $10k to buy 100 shares, then sell a call option with a strike of $60 for $40/share.

Under RH's calculations, you have $5k of account equity, $10k of stock and $4000 of cash from selling the call. This qualifies you for a margin loan of up to $9k.

Under the correct calculation, the stock is only worth at maximum the $60/share strike price of the short option, since that is the cash you'd get if the option is exercised. So you have $5k of account equity, $4k of cash, and $6k worth of net marginable securities.

The advantage of this is that it treats out-of-the-money covered calls better. If you sold a call option on FOO with a strike of $105 for $2/share, you should have $200 extra free to spend on stuff. Selling extrinsic value should wind up generating net cash that users can use for whatever purpose they want. Selling intrinsic value, on the other hand, is selling a portion of the economic right to the underlying.


This seems like the sort of thing that happens when the people writing the code don't know the domain, and the domain experts can't express how the software needs to be tested.


This entire class of bugs should be caught via fuzz testing. Swap out the live back-end with one that fakes execution against a snapshot of prices, do whatever you can do, and verify position sizes are within leverage limits.


That probably would help. I think a properly functioning margin system would never result in negative balances on liquidation, as long as the fake executions were filled at exactly the trigger price. Doing crazy but valid shit and looking for negative balances would probably catch other issues too.


This is easily the best explanation of RH's goof in this entire thread.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: