Replies: 2 comments 4 replies
-
re 3: it's not as easy, seems like maker creates the |
Beta Was this translation helpful? Give feedback.
-
Another thought on this (taking into account combined positions). Here is my current understanding: When go long, you buy contracts. You buy them at a certain price, which, together with your leverage defines how much margin (collateral) you have to put up. Once you've bought them, the price is irrelevant. You now own these contracts and you have a certain margin locked up. Your profit/loss depends on the number of contract that you own (which have a value of $1/contract) and the current price. If you were to buy more contracts, your position changes:
How much margin you need to lock up depends on the price and leverage of that second purchase. Once the second purchase is completed, you now own more contracts and you have more margin locked up. The new liquidated price depends on both of them (again). My conclusion is: Once you have a CFD, your leverage should actually be computed. The source of truth of your position are the number of contracts and your margin, not the other way around. This makes sense once you consider combined positions: Buying more contracts with a different leverage changes the effective leverage of your position AND the liquidation price. |
Beta Was this translation helpful? Give feedback.
-
While working on getting "taker goes short" together we noticed that the model has certain weird quirks:
initial_price
,quantity
,leverage
), but we actually only need these values to calculate themargin
.margin
and then just store that instead of the base values.quantity
should be renamed tocontracts
Order
should be renamed toOffer
, because it represents the maker's offer to the takerposition
should be the one of the taker, because we are offering to the taker to go long/short. Currently the position in theOrder
is the one of the maker (whereas the leverage is the taker's... super confusing).With the changes of #1435 there are some new model constraints:
Role
(which is derived from theOrigin
of the offer - i.e. if the offer is ours we are the maker, if not we are the taker). The leverage of thetaker
is currently taken out of theOrder
, the maker's always just assumed to be1
.leverage
aslong
andshort
leverage, because it makes it easier to handle calculations.Long/Short and Taker/Maker
I think internally we should always try to depict long vs. short, and not taker vs. maker. The only points where taker vs. maker is relevant are:
Offer
(depending on if we are the maker or taker one of them has to flip the position of the offer to depict what position the Cfd has their point of view)I wonder if we should change this in
maia
as well, where we keep talking about maker and taker.Beta Was this translation helpful? Give feedback.
All reactions