Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Market Making's Troubling Tails

Hey all, this is a for fun example of what returns look like for liquidity providers in VXX. An interesting aspect of a structured product like VXX is that it's composed of futures, but doesn't expire. That means when a trade doesn't work out the trader gets a choice: exit the position, or add it to their inventory and wait. Taking the latter road exposes the trader to massive skew risk.

This is the short leg of a simplistic volatility market making strategy. It attempts to sell 1% of the account on every little pop in VXX, then cover the short after the trade has made a 2% return. A majority of the trades are closed for a profit within a short period of time (see the logs), but larger downward movements cause it to accumulate an inventory. Since it's selling risk premium with essentially no expiration the only unknown is the time it takes to earn a yield (also borrowing costs & forced covering).

This algo blew up in 2011, but that's skew risk for you.

5 responses

As a market maker, the algo should not accumulate into a position (yours blew up in 2011 because of it), but trade in and out of it.

As such, you need a stop loss order, and it needs to be linked to your profit taking order. You also need a linked time stop, so that is no colsing orders get triggered and filled, the algo drops the security at a certain point after it bought it. From what Q IT has said, this is not possible to do, so if you can elaborate/edit/update the code, that would be great.

Hey BT. Thanks for the feedback, most of the things you mentioned are actually already implemented in the algo. It trades in and out, averages 10 transactions per day and as many as 46. It has a time linked stop on each trade, it's set high to demonstrate what happens when inventory is allowed to accumulate. The only thing not there is the stop orders, but that's on purpose because of the nature of what it's trading.

This was just a for fun example of what skew risk looks like

Thanks David,

Can you add the stop loss and link it to the profit taking order as well as the time linked closing order, for each bet, in "one cancels all" fashion?

Thanks,
BT

I can't submit the orders as an OCA group if that's what you mean. As I'm sure you know, Q doesn't yet support a lot of the more complex order types.

What you can do is simulate those types of orders by building them in your algo. Of course you would be constrained to updating them once per minute, so they would need to be wide enough apart so more than one filling in a single bar is unlikely. It wouldn't be perfect, but it is possible.

In my backtests, I noticed a few instances in the log where Q warned of the automatic canceling of limit orders at end of day.

Maybe I missed it, but is there logic to re-establish those limit orders at the start of the next day?

Am just wondering if this could be a factor contributing to the accumulation that is mentioned above.

Richard
http://quant-coder.prokopyshen.com/ContactMe