Author Topic: Margin Call Explanation & Beware of Illiquid Markets with Low Margin  (Read 21160 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline svk

I still think most people don't understand how margin calls work in BTS 2.0, so in a bid to clarify things I've created a Google Doc that explains the mechanics of margin calls as per my current understanding.

I'd appreciate some input on the correctness, and if something's wrong I'll update it. You can add comments directly in the doc.

@alt @tonyk @Xeldal @bytemaster

https://docs.google.com/document/d/1h9E6N9VECh48NKRQGFoPQsSwfZXT4p_TD3LT3CqeTYk/edit?usp=sharing
Nice write-up, @svk
I've put my comments in the document.

I fully agree with your suggestions but they might not be relevant any more. AFAIK bytemaster has already fixed the margin call mechanism, it just awaits tests and a hard-fork to be implemented.
Thanks.

What have they been "fixed" to though?
https://github.com/cryptonomex/graphene/issues/436

OK so the effect of this is almost the same as my suggestion, main difference being that margin calls now happen much later with corresponding higher risk of defaults.

It's also not clear what happens to SQP  in this new configuration. You get margin called only when settlement price goes above your call price (in BTS/USD direction), but will you then still buy USD in the range [FEED, FEED * SQPR]? In other words, we delay the margin call, but still impose the "shorts quality of punishment" as tonyk puts it?
Worker: dev.bitsharesblocks

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
I still think most people don't understand how margin calls work in BTS 2.0, so in a bid to clarify things I've created a Google Doc that explains the mechanics of margin calls as per my current understanding.

I'd appreciate some input on the correctness, and if something's wrong I'll update it. You can add comments directly in the doc.

@alt @tonyk @Xeldal @bytemaster

https://docs.google.com/document/d/1h9E6N9VECh48NKRQGFoPQsSwfZXT4p_TD3LT3CqeTYk/edit?usp=sharing
Nice write-up, @svk
I've put my comments in the document.

I fully agree with your suggestions but they might not be relevant any more. AFAIK bytemaster has already fixed the margin call mechanism, it just awaits tests and a hard-fork to be implemented.
Thanks.

What have they been "fixed" to though?
https://github.com/cryptonomex/graphene/issues/436
BitShares committee member: abit
BitShares witness: in.abit

Offline svk

I still think most people don't understand how margin calls work in BTS 2.0, so in a bid to clarify things I've created a Google Doc that explains the mechanics of margin calls as per my current understanding.

I'd appreciate some input on the correctness, and if something's wrong I'll update it. You can add comments directly in the doc.

@alt @tonyk @Xeldal @bytemaster

https://docs.google.com/document/d/1h9E6N9VECh48NKRQGFoPQsSwfZXT4p_TD3LT3CqeTYk/edit?usp=sharing
Nice write-up, @svk
I've put my comments in the document.

I fully agree with your suggestions but they might not be relevant any more. AFAIK bytemaster has already fixed the margin call mechanism, it just awaits tests and a hard-fork to be implemented.
Thanks.

What have they been "fixed" to though?
Worker: dev.bitsharesblocks

jakub

  • Guest
I still think most people don't understand how margin calls work in BTS 2.0, so in a bid to clarify things I've created a Google Doc that explains the mechanics of margin calls as per my current understanding.

I'd appreciate some input on the correctness, and if something's wrong I'll update it. You can add comments directly in the doc.

@alt @tonyk @Xeldal @bytemaster

https://docs.google.com/document/d/1h9E6N9VECh48NKRQGFoPQsSwfZXT4p_TD3LT3CqeTYk/edit?usp=sharing
Nice write-up, @svk
I've put my comments in the document.

I fully agree with your suggestions but they might not be relevant any more. AFAIK bytemaster has already fixed the margin call mechanism, it just awaits tests and a hard-fork to be implemented.

Offline svk

I still think most people don't understand how margin calls work in BTS 2.0, so in a bid to clarify things I've created a Google Doc that explains the mechanics of margin calls as per my current understanding.

I'd appreciate some input on the correctness, and if something's wrong I'll update it. You can add comments directly in the doc.

@alt @tonyk @Xeldal @bytemaster

https://docs.google.com/document/d/1h9E6N9VECh48NKRQGFoPQsSwfZXT4p_TD3LT3CqeTYk/edit?usp=sharing
Worker: dev.bitsharesblocks

Offline merivercap

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
    • BitCash
I believe SQP rule is misguided and adds an unnecessary level of complication with ultimately no benefit.  Currently we are lying to shorts about where/when their positions will/can be called.

If your goal is to encourage shorts to put up more collateral, simply raise the minimum collateral requirement.
If your goal is to reduce dependence on the feed, increase liquidity.  Ill-liquid markets *should be heavily feed based.

If the information we give to the shorter is " your margin call price is feed price x "  then they should never be called if the feed price is above x.  Currently they can be called when the price (in all other markets) is upto 10% above x (their prescribed call price).  This is a terrible practice IMO.   Initially, shorts could be called upto an unbelievable 50% above their margin call price.

In effect SQP just raises the price at which shorts can be forced margin called.  regardless of whether the fair price/ feed  is above their prescribed margin call rate.

This really needs to be gotten rid of IMO.  Or the ACTUAL margin call rate needs to be communicated (Call rate * (1 + SQP percentage))

In nearly every way, I think the rules under bts1 for margin calls are preferable.

So the main thing is the discrepancy between your personal margin-call price displayed in the GUI and the actual margin-call execution price you can get on an ill-liquid market (10% or previously 50% above the feed).
And the problem is those two prices can be quite far from each other: you expect to be margin-called at price x but the margin call actually executes at price y.
Do I understand your point correctly?

That is certainly part of it.  It is not clear to the user that his margin call will be based on the bid, and not like prior BTS1 rules, based on the feed.   

I think the conclusion of this debate might be: why do we have a feed at all?  If you can't use SQP without liquidity, and if you have liquidity, you don't need a feed; What good is the feed? outside of a settlement rate which we claim should ideally never be necessary to use.

I have to admit, that basing the margin call on the bid (at the exchange, not from outside the exchange) makes sense and is how every exchange out there would do it, and rightfully so as they intend to remain solvent.  We just saw a margin event on polo as an example.  Obviously there are no feeds involved.  The problem is, an exchange would not likely open margin accounts to trade an asset that was not liquid, and our MPA SmartCoins can not exist without margin accounts.  Its unavoidable.  So to protect illiquid markets the margin call should be based on the feed...or the market should not be able to trade without some very large level market depth liquidity.  Which currently none of our MPA's qualify for and if they did the feed would never come into play especially at a 50% SQP.

In the case of massive liquidity, the feeds are mostly irrelevant and an SQP approach can work, but only because its unnecessary and irrelevant.

Given that margin accounts are by default required to have a functioning SmartCoin.  I believe more weight, not less, should be put on the feeds, to protect the backbone of the SmartCoin markets, until the market is so large that they are perhaps inconsequential.

Xeldal,
I agree with your sentiments.  There is an implicit agreement between short and long that the price feed is relevant to the settlement of the CFD.  The price feed is also more relevant especially when there is more liquidity in external exchanges.   Early on it is important to establish a good price feed and rely on it.   Otherwise we should eliminate the price feed all together like in the very original Bitshares.  Although revisiting a system with no price feed is an alternative, I'd rather explore the price feed alternative to it's fullest extent which means putting far more weight on it.  We should at this stage:

1) Set the SQP to 0% so that margin calls occur based on the price feed.
2) Use multiple exchanges including the internal exchange to form the price feed and weight each exchange based on trading volume.

That way the prices from external exchanges will be much more important in the early stages and much less so when internal liquidity starts to dominate. 
BitCash - http://www.bitcash.org 
Beta: bitCash Wallet / p2p Gateway: (https://m.bitcash.org)
Beta: bitCash Trade (https://trade.bitcash.org)

jakub

  • Guest
The forced margin call does not try to use any balance that you already have in your account, but will instead always buy on the open market.
We currently allow people to open positions that get margin called instantly. Any position at a ratio of less than 1.5 * 1.75 = 2.62 gets margin called right away which doesn't seem to be right.

@bytemaster, does the system really work like this?
We lose a lot in our users' eyes when we are not careful about all those little details.

jakub

  • Guest
I agree with @tonyk that we need to limit our discussion to the USD:BTS market, i.e. prices indicating how many BTS you need to pay for 1 USD, e.g. 250 BTS/USD.
This way shorts are those who actually have a short position, i.e. they have sold their USD and to close their collateral position they will need to buy it back in the future.
So BM's original drawing in OP, which is based on the opposite view, should not be part of the discussion, as it just adds to the confusion.

And I agree with @tbone that we need to differentiate between these two prices (and situations):
(1) Margin Call Trigger Price (MCTP), i.e. the price at which a margin call is triggered, bearing in mind that the trigger event occurs when MCTP gets above Your Personal Call Price (YPCP).
(2) Actual Buy-Back Price (ABBP), i.e. the price at which the actual buy-back is executed by the system once the margin call is triggered.

We absolutely need to distinguish between these two situations, as otherwise we end up having a paradox illustrated by the order-book shown below, an event which actually took place in October and put the shorts in an unacceptable price trap.

(Now I wonder if the situation above was actually considered by BM when he was designing the SQP concept - is it a bug or a feature?)

Regarding (1), i.e. MCTP:
I agree with @Xeldal that basing the MCTP on the lowest ask price (from the internal market) is a bad idea, as in a thin market the lowest ask cannot be really trusted.
BM's way to alleviate this weakness, achieved by including an additional restriction (i.e. the lowest ask needs to be below SQP to become a valid margin-call trigger) does not really help because:
- if we define SQP to be far from the feed (e.g. 50% above the feed) it does not force the longs to offer a decent exit price for the shorts when triggering a margin call,
- if we define SQP to be close to the feed (e.g. only 10% above the feed, as we have now) we could just as well rely on the feed itself, as having SQP at this low level does not make margin calls execution much more efficient.

This is how I propose to solve this problem: let's define MCTP as the lowest of these two:
(a) the external market's feed price (or a little above the feed, like 5% above the feed).
(b) the internal market's lowest ask price
This solution will protect us from being dependent entirely on the external feed (in case there are some technical issues with it). For a margin call to be triggered, both the lowest ask and the feed need to be above YPCP.
And once a margin call is triggered (i.e. MCTP gets above YPCP), ABBP needs to be established and this has nothing to do with MCTP - it can be much higher than MCTP, the only restriction is that it needs to be equal or above YPCP.

Regarding (2), i.e. ABBP:
I think I understand BM's intention to avoid those kinds of market limbos that we had in 0.x. A margin call should have a real chance to be executed immediately, even in a thin market. And this is where something like SQP (defined even as high as 50% above the feed) might make sense. It can render ABBP very bad for a short position holder but it will, at the same time, offer a predictable limit for the damage incurred. And that's the reality of shorting in a an ill-liquid market: when you allow yourself to be margin-called, the consequences can be very painful. But still for the whole market it's better to execute a margin call successfully (even at a very bad price for the shorter) than have this kind of limbo that we had in 0.x.

EDIT: To sum up, my conclusion is this: currently we have a serious flaw in the margin-call rules but this is not because SQP is such a bad concept.
The problem is that SQP is currently being misused, because it acts as both a margin-call trigger level and a margin-call execution level.
These two situations should be treated separately (as @tbone pointed it out) and SQP should only be used for the margin-call execution part, not the trigger part.
For the trigger part we should rely on the feed (or something very close to the feed), plus the lowest ask level as an extra safety feature.
« Last Edit: November 03, 2015, 02:21:59 pm by jakub »

Offline wallace

  • Sr. Member
  • ****
  • Posts: 215
    • View Profile
 +5%
What is crazy is to base your margin call price on the more thinner and illiquid market [read easier to manipulate by buying/selling]. The current rules chose the Dax prices/market to do that...
The dax has long ways to go before being more liquid than all BTS markets combined.
I have not understoodnd until now that all this crazy rules were an attempt to achieve exactly this even crazier goal - to use the less liquid market...
ohh my god.
give me money, I will do...

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
In effect SQP just raises the price at which shorts can be forced margin called.  regardless of whether the fair price/ feed  is above their prescribed margin call rate.

@Xeldal  -  I think your statement above is either incorrect, OR you're referring to something different than bytemaster here:

A margin call will occur any time the highest bid is less than the CALL PRICE and greater than SQP

This appears to mean that if the market goes against you and your collateral drops below the threshold (i.e. the highest bid goes below the call price) a margin call is triggered.  UNLESS the highest bid is BELOW the SQP.  In which case, no margin call is triggered. So it appears this is effectively saying that if the market has gotten too far away from the feed, something is wrong so let's not trigger a margin call.  This seems to makes sense as a safety measure for shorts.  And although the need for this appears that it would be much less likely in a liquid market, I don't see why you wouldn't still want it there as a safety net since you never know when a market will lose liquidity.

The problem I'm having is that people (perhaps including bytemaster) seem to be conflating 2 different concepts: 1) the price at which a margin call is triggered, and 2) the price at which the actual buyback can occur.  We just went over #1 i.e. how SQP affects the price at which a margin call gets triggered (or whether it gets triggered at all).  What about #2?  Below, bytemaster is clearly saying SQP can affect the price a short will actually pay to cover: 

The SQP price is the MOST that a margin call will pay to cover.   

This seems to be referring to the SQP as a CEILING and that the highest bid can't be HIGHER than the SQP.  But we've already established that for a margin call to be triggered to begin with, the highest bid MUST be higher than the SQP.  So either something is wrong here, or bytemaster misspoke and there is actually a second value that acts as a ceiling on the cover price (which I think would make sense).  Or maybe I'm missing something,

@Bytemаsteг - can you please she some light here?

@tbone,  Xeldal's explanation  IS correct!!!
What you are confused by [amongst score of others], is BM price quoting prices {he uses  4.45*10-6 houses per dollar when talking about prices}. His view, while not technically incorrect, turns everything upside down - above becomes below,  /1.75 becomes * 1.75 etc, etc.
« Last Edit: November 03, 2015, 02:47:38 am by tonyk »
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline tbone

  • Hero Member
  • *****
  • Posts: 632
    • View Profile
  • BitShares: tbone2
In effect SQP just raises the price at which shorts can be forced margin called.  regardless of whether the fair price/ feed  is above their prescribed margin call rate.

@Xeldal  -  I think your statement above is either incorrect, OR you're referring to something different than bytemaster here:

A margin call will occur any time the highest bid is less than the CALL PRICE and greater than SQP

This appears to mean that if the market goes against you and your collateral drops below the threshold (i.e. the highest bid goes below the call price) a margin call is triggered.  UNLESS the highest bid is BELOW the SQP.  In which case, no margin call is triggered. So it appears this is effectively saying that if the market has gotten too far away from the feed, something is wrong so let's not trigger a margin call.  This seems to makes sense as a safety measure for shorts.  And although the need for this appears that it would be much less likely in a liquid market, I don't see why you wouldn't still want it there as a safety net since you never know when a market will lose liquidity.

The problem I'm having is that people (perhaps including bytemaster) seem to be conflating 2 different concepts: 1) the price at which a margin call is triggered, and 2) the price at which the actual buyback can occur.  We just went over #1 i.e. how SQP affects the price at which a margin call gets triggered (or whether it gets triggered at all).  What about #2?  Below, bytemaster is clearly saying SQP can affect the price a short will actually pay to cover: 

The SQP price is the MOST that a margin call will pay to cover.   

This seems to be referring to the SQP as a CEILING and that the highest bid can't be HIGHER than the SQP.  But we've already established that for a margin call to be triggered to begin with, the highest bid MUST be higher than the SQP.  So either something is wrong here, or bytemaster misspoke and there is actually a second value that acts as a ceiling on the cover price (which I think would make sense).  Or maybe I'm missing something,

@Bytemаsteг - can you please she some light here?

jakub

  • Guest

Sqp must've been 291 yea, and it didn't execute because margin calls aren't allowed to buy cheaper than their call price, which would've been shown in the depth chart and in the status at the time of that picture.

If that's the case, than I agree with @tonyk - the longs can put the shorts in a trap and force them to surrender at a very bad price.
It requires coordination among the longs but in a thin market it is doable, as we can see it the example above.

Now I think it's a serious flaw which should be addressed by @bytemaster.

Thanks @tonyk, I think I finally got it.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile

That is certainly part of it.  It is not clear to the user that his margin call will be based on the bid, and not like prior BTS1 rules, based on the feed.   

I think the conclusion of this debate might be: why do we have a feed at all?  If you can't use SQP without liquidity, and if you have liquidity, you don't need a feed; What good is the feed? outside of a settlement rate which we claim should ideally never be necessary to use.

I have to admit, that basing the margin call on the bid (at the exchange, not from outside the exchange) makes sense and is how every exchange out there would do it, and rightfully so as they intend to remain solvent.  We just saw a margin event on polo as an example.  Obviously there are no feeds involved.  The problem is, an exchange would not likely open margin accounts to trade an asset that was not liquid, and our MPA SmartCoins can not exist without margin accounts.  Its unavoidable.  So to protect illiquid markets the margin call should be based on the feed...or the market should not be able to trade without some very large level market depth liquidity.  Which currently none of our MPA's qualify for and if they did the feed would never come into play especially at a 50% SQP.

In the case of massive liquidity, the feeds are mostly irrelevant and an SQP approach can work, but only because its unnecessary and irrelevant.

Given that margin accounts are by default required to have a functioning SmartCoin.  I believe more weight, not less, should be put on the feeds, to protect the backbone of the SmartCoin markets, until the market is so large that they are perhaps inconsequential.

I think I'm getting the picture:
(1) if we have good liquidity the SQP concept is irrelevant as it never has a chance to be applied.
(2) If we have poor liquidity the SQP concept (together with basing the margin call on the internal bid) works badly as it disregards the feed whereas the feed is the only thing which we can rely on.

So the SQP concept is delusional in this sense: it is meant to protect the shorts from the effects of poor liquidity but it actually does the opposite - it cuts us off from the reliance on the feed when we need it the most.

What is crazy is to base your margin call price on the more thinner and illiquid market [read easier to manipulate by buying/selling]. The current rules chose the Dax prices/market to do that...
The dax has long ways to go before being more liquid than all BTS markets combined.
I have not understoodnd until now that all this crazy rules were an attempt to achieve exactly this even crazier goal - to use the less liquid market...
ohh my god.
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline svk





In the above example order book, you believe the sell orders below 291 make sense...more dangerously you have based you system on the assumption that people will just act like that...   irrationally.

I guess the yellow buy order at 291.24615 is a margin call order attempting to buy USD to close the collateral position.
Does anyone know why it could not execute while there were matching sell orders?
What was the SQP in this case? 291.24615?

Sqp must've been 291 yea, and it didn't execute because margin calls aren't allowed to buy cheaper than their call price, which would've been shown in the depth chart and in the status at the time of that picture.
Worker: dev.bitsharesblocks