Author Topic: Options and Futures contracts  (Read 2071 times)

0 Members and 1 Guest are viewing this topic.

Offline Gleepower

Options and Futures contracts
« on: December 26, 2017, 07:32:24 pm »
Would there ever be interest in getting options and futures smart contracts for bitshares? I think options especially would be a great boon for bitshares, since no one really offers options on bitcoin at the moment. Are there any barriers to getting these implemented? (expiry date, counterparty risk).

Offline zapata42

  • Full Member
  • ***
  • Posts: 59
    • View Profile
  • BitShares: zapata42
Re: Options and Futures contracts
« Reply #1 on: December 29, 2017, 10:16:27 pm »
I'm interested in this topic too.

More specifically on how to implement then.

I think it might already possible to do  some kind of European style option with cash settlement with the proper configuration of MPA and a custom price feed.

May be this has already been discussed?

What kind of underlying do you imagine? Crypto or stock/commo/... ?

Offline Gleepower

Re: Options and Futures contracts
« Reply #2 on: January 01, 2018, 10:53:09 pm »
Yes you're definitely on to something there. Owners of MPA (Smartcoins right?) have the right but not the obligation to settle at the feed price. Problem is that MPA is more than an option since it's not just a right to buy, it's a right to get it without handing over anything (e.g. a bitusd gives you 1 dollar worth of BTS, it doesn't just give you right to buy 1 BTS at a dollar price). I can't see directly tho how you recreate a european option from an MPA.

I was thinking it over and there's many routes you can go over. I was thinking one is where options are fully collateralized - those who write a call option for asset A at price P in terms of asset B would have to put up asset A (and those who write a put option would put up asset B) as collateral for the duration of the contract. The owner of the option could at any time exchange asset B's for asset A's at price P from the issuer.

Under this system, the underlying could be any bitshares asset.

It's nice and simple with no counterparty risk. However, being able to write naked options would be nice as well. But I think that would be much more complex and would also run the risk of default. Also using a feed price to have cash(bts?)-settled options on non-bitshares assets would be a boon as well.

I also think it would be great publicity for bitshares having options, because there is no good crypto-exchange for options AND our options would be secured by smart contracts so there is less scam risk.

Offline Gleepower

Re: Options and Futures contracts
« Reply #3 on: January 01, 2018, 11:33:01 pm »
Futures I haven't thought about - but potentially might need some sort of clearing party, no idea how this would interact with smart contracts/blockchain.

Offline zapata42

  • Full Member
  • ***
  • Posts: 59
    • View Profile
  • BitShares: zapata42
Re: Options and Futures contracts
« Reply #4 on: January 02, 2018, 05:41:58 pm »
I can't see directly tho how you recreate a european option from an MPA.

Let's say I want an Option on Bitcoin @ 15000$ at maturity 31/01/2018.
 
I had in mind a price feed like this:
Code: [Select]
if today <= maturity (31/01/2018)  then
    price_feed = max(bitcoin_price_in_usd - 15000, 0)
else
     price_feed = 0

At MPA issuance I will:
   -  put bitUSD as collateral (but it will work also with BTS, or bitBTC if I adjust the rate of the feed).
   -  put a feed publication rate of one hour, but any rate will work,
   -  put a short delay for force settlement like 1 minute.

Anyone will be able to borrow and sell  the Option on [email protected]$ to the price (aka strike) they feel right (using their prefered pricing model).
If I buy this option I will be able to take some profit if the Bitcoin price goes higher than 15000$ before the maturity. Afterwards it will be valueless.
This will enable leverage trading, and hedging.

I suppose there are various issues when the price_feed = 0 that will make this solution invalid.
One of those is that anyone can borrow the option without any collateral, a fix could be to set a minimum collateral value.

A similar setup could be done for futures, but we need to avoid any settlement before maturity, and force settle all the futures at maturity.

Do you think somethink like this makes sense and could work?

Offline Gleepower

Re: Options and Futures contracts
« Reply #5 on: January 02, 2018, 08:26:58 pm »
Damn that's pretty ingenious - it seems you're right in thinking you can implement them as an MPA. This is much better than my solution. As you say the main issues
for options are that they need a different collateral function one that's ideally related to the volatility of the price of the underlying against the collateral asset AND the current profit.

For a normal MPA, the collateral function is 
Code: [Select]
(collateral / debt * feed_price ).

The collateral function is a function of the feed_price and always needs to be above the MCR.

Off the top of my head, a collateral function of
Code: [Select]
(collateral / debt * feed_price + (0.2 * strikeprice))) would work
and solve your collateral of 0 when the feed price is 0 problem. For example, if the MCR is 1.2 - assume your call option is written and the bitcoin price is 15000 usd. Your
debt is 1 BTC. The feed price is 0. Therefore your collateral needs to be at least 1.2 * (15000*0.2 + 0) = 3600. If the price of bitcoin rose to
17000, then the feed price would be 2000 and you would have to put up at least 1.2 * (1500 + 2000) = 6000.

I think futures is much harder to do with the method however, if we made the feed price:

Code: [Select]
if today <= maturity then price_feed = bitcoin_price_in_usd - 15000)

we would need to do 4 different things:

1) have a different collateral function (as with options)
2) BOTH sides need to now put up collateral
3) we need to only allow settlement at maturity date
4) we need to have 'negative' settlement. For example, if I went long on a bitcoin future, and the price fell to 14500, and we reached
maturity date, then I would force settle for -500 bitusd.

This would be much more radical than an option, since buying a future would require putting up margin, whilst buying a bitusd or a btcoption (under our system)
can be a simple transfer.

I think a way of giving a custom collateral function to MPA would really make them more flexible to implement things like options (and potentially many other things).
« Last Edit: January 02, 2018, 09:04:58 pm by Gleepower »

Offline zapata42

  • Full Member
  • ***
  • Posts: 59
    • View Profile
  • BitShares: zapata42
Re: Options and Futures contracts
« Reply #6 on: April 05, 2018, 08:53:08 pm »
Bump up this thread.

I think the final proposal of @Gleepower it's a good start.

Is there anyone else interested in this topic?

May be we can just put it in a roadmap so poeple can speculate  ;)

Online abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3809
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Options and Futures contracts
« Reply #7 on: April 06, 2018, 07:42:05 am »
Yes, it's very interesting. Actually I have these in mind since the beginning. Wish someone can write down the specifications clearly so we can implement it faster.

If no need to change the back end, anyone can make a proof of concept UI for it.
« Last Edit: April 06, 2018, 07:43:41 am by abit »
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline zapata42

  • Full Member
  • ***
  • Posts: 59
    • View Profile
  • BitShares: zapata42
Re: Options and Futures contracts
« Reply #8 on: April 06, 2018, 08:28:39 am »
If no need to change the back end, anyone can make a proof of concept UI for it.

Unfortunately I think it needs a new margin call management formula.

Ideally an asset issuer should be able to provide a custom margin call formula through a small Domain Specific Language.
This would literally allow to build any type of products.

Online abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3809
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Options and Futures contracts
« Reply #9 on: April 06, 2018, 01:13:16 pm »
If no need to change the back end, anyone can make a proof of concept UI for it.

Unfortunately I think it needs a new margin call management formula.

Ideally an asset issuer should be able to provide a custom margin call formula through a small Domain Specific Language.
This would literally allow to build any type of products.
If we need to parse a formula, IMHO the scope is a bit too wide. We're not a generic smart contract platform. If the formula can be narrowed down to parameters only, I'm sure we can get it implemented.
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline Hexler

Re: Options and Futures contracts
« Reply #10 on: April 06, 2018, 05:45:08 pm »
Thank you for sharing it's great

Offline ebit

  • Committee member
  • Hero Member
  • *
  • Posts: 1740
    • View Profile
    • 推荐链接
  • BitShares: ebit
Re: Options and Futures contracts
« Reply #11 on: April 07, 2018, 03:22:04 am »
i will support the worker .But the ultimate goal is to pump bts but not to hurt bts.I think MPA is not the best choice .UIA ,such as usdt cnc ,will be best .

In my mind ,the MPA should be quick turnaround .with the purpose of  hedging collateral risk.

Offline Cryptick1

Re: Options and Futures contracts
« Reply #12 on: December 20, 2018, 09:57:59 pm »
I like the idea of call options.

I have been thinking about call options of various coins. I think there could be a great market for these as it would allow people to hedge risks in a variety of ways, take on leverage, and provide an alternative form or interest and or lending all safe and secure through smart contracts on the blockchain.

I know one can create a custom smart coin. I know it is possible to provide a feed price to that coin. (This could be done at expiration if needed.) It would surely be more preferable to have the price calculated in contract, although I admit I would need help implementing this.

A simple call contract would be a great way to start. Say BTS is at 5 cents. I could sell the right for you to buy BTS at 5 cents for the next two months. In order to generate the option I lock up my BTS into the blockchain (just like we do when implementing bitUSD now.) I would only need to lock up one BTS to issue one BTS option. That options could have a strike of 5 cents and expiration in a standard end of month time frame. (Following Stock option and future markets expiration dates to keep things simple.) Once the collateral is locked up the system can generate the Call Option contract asset. (like BitUSD is now generated) At that point the contacts could trade freely back and forth on the market, until expiration day. I would expect this options to be pricing. (for example if BTS is at 5 cents I think the contracts would trade for 1 to 2 cents). All cryptos are HIGHLY volatile. If I did my Black Scholes calculations correctly the other day I got a 0.56 cents for the BTS call option at 5 cents based on recently volatility. Black Scholes though has limits.

I think an option market would be able to help people hedge risk, and I think it would stabilize the market some. I also think it would be interesting as the contract could be written on any coin. Open.LTC; Bridge.BTC; Open.eos... (I know portal assets have risk or portal defaulting, not really different than a company going bankrupt.)

While options are truly investing this would attract the gambling crowd.

I also think options would allow people to "stake" their coins. And "earn income."

I also think it could become a kind of "peer to peer loan" market.

This would allow those that want to take on more risk to do so. It would also allow those who want to earn income on the side to do so.

Options Markets are diverse powerful financial instruments and offering them could set BitShares apart from other exchanges, especially if it can offer a secure peer to peer trading in a decentralized way without risk of counter party default.

I believe we could do american or European style options. What ever is easier to implement.

I also like cash settled options.

It would be great to have a universal automatic settlement at the end of the options contract. Normally though money has to change hands. (If I have a BTS call option at 5 cents when settled I have to give you 5 cents to get the underlying BTS.) That said, I could see where some accounts might not have the money. Requiring the buyer to put up the entire strike in collateral sorta defeats the purpose.

If BTS is at 8 cents. One might settle via giving 3/8 of the BTS position to the call holders.  This would sort of be like a instant cash settlement of value of the BTS.  (BTS call option with strike of 5 expires at 8 cents.) (A normal cash settlement would pay the call owner 3 cents (8-5=3) A physical settlement would require the call owner to transfer 5 cents to the call seller and the call seller gives the call buyer the the underyling BTS, which was locked into the blockchain.

 Settling (in a case where one account -like the buyer- might not have the money to deliver gets complicated.)  ( In the regular stock options markets, brokers allow accounts to go short and then buy or sell as needed to balance everything out. That could get complicated, and sense everything needs to be done in a fair way without risk it is more complicated. )

So since both the call buyer and the call seller might not have the needed money at settlement. And since we could divide the underlying coins into fractions, One can calculate out the cash values both positions should have, then divide the underlying contracts as appropriate.  I think this would be a "financial innovation." I think this would be "fair." Please tell me if it is not.  I think this would allow us to have an options market. I think this is simply enough to do.

I think this would allow both parties to have a secure crypto option contact on the blockchain free from in a trustless way free from counter party risk.

Is this doable with existing smart coins?

Can a universal settlement be done at expiration (or even several days after. This could allow time for manual feed prices to be put in if needed.)?

Weekly options have proven very popular among stock investors and if weekly and monthly secure crypto options became available, that could generate some real excitement, and a lot of hedging of coins. This would bring volume and crypto-investors to the exchange.
-cryptick1

 

Offline Victor118

Re: Options and Futures contracts
« Reply #13 on: December 24, 2018, 01:40:12 pm »
I do not master prediction market nor the concept of options
but is not the prediction market exactly made for that?

Offline Cryptick1

Re: Options and Futures contracts
« Reply #14 on: December 27, 2018, 11:29:47 pm »
Yes and No.

My understanding of the prediction market it that they generally have a payout from 0.0 to 1.0. And that one can short and they can settle anywhere between that point. So if it were 50/50 the price would be 0.50, if it were 60/40 it would .6 or .4 ect. Options in the traditional sense (as in stock options) have a very specific payout based on a formula. This varies as expiration arrives and then the final settlement price is reached. I think we are close, and it may be possible with currently, but I need a little expert advise on helping in that reguard.
-Cryptick