Updated docs to include liquidation, own definitions
This commit is contained in:
parent
68810eb4f3
commit
b4de68e1bc
@ -19,22 +19,21 @@ The possible values are: `spot` (default), `margin`(*coming soon*) or `futures`.
|
||||
|
||||
#### Leverage trading modes
|
||||
|
||||
# TODO: include a resource to help calculate stoplosses that are above the liquidation price
|
||||
# TODO-lev: include a resource to help calculate stoplosses that are above the liquidation price
|
||||
|
||||
#TODO: Taken from investopedia, is that ok?
|
||||
Leverage results from using borrowed capital as a funding source when investing to expand the firm's asset base and generate returns on risk capital. Leverage is an investment strategy of using borrowed money—specifically, the use of various financial instruments or borrowed capital—to increase the potential return of an investment.
|
||||
With leverage, a trader borrows capital from the exchange. The capital must be repayed fully to the exchange(potentially with interest), and the trader keeps any profits, or pays any losses, from any trades made using the borrowed capital.
|
||||
|
||||
Because the capital must always be repayed, exchanges will **liquidate** a trade (forcefully sell the traders assets) made using borrowed capital when the total value of assets in a leverage account drops to a certain point(a point where the total value of losses is less than the value of the collateral that the trader actually owns in the leverage account), in order to ensure that the trader has enough capital to pay back the borrowed assets to the exchange. The exchange will also charge a **liquidation fee**, adding to the traders losses. For this reason, **DO NOT TRADE WITH LEVERAGE IF YOU DON'T KNOW EXACTLY WHAT YOUR DOING. LEVERAGE TRADING IS HIGH RISK, AND CAN RESULT IN THE VALUE OF YOUR ASSETS DROPPING TO 0 VERY QUICKLY, WITH NO CHANCE OF INCREASING IN VALUE AGAIN**
|
||||
|
||||
**MARGIN**
|
||||
*coming soon*
|
||||
*Currently unavailable*
|
||||
Trading occurs on the spot market, but the exchange lends currency to you in an amount equal to the chosen leverage. You pay the amount lent to you back to the exchange with interest, and your profits/losses are multiplied by the leverage specified
|
||||
|
||||
**FUTURES**
|
||||
*Freqtrade can only trade **perpetual futures***
|
||||
**Perpetual Swaps (also known as Perpetual Futures)**
|
||||
|
||||
Perpetual futures contracts are traded at a price that mirrors the underlying asset they are based off of. You are not trading the actual asset but instead are trading a derivative contract. In contract to regular futures contracts, perpetual futures can last indefinately.
|
||||
Perpetual swaps are contracts traded at a price that is closely tied to the underlying asset they are based off of(ex. ). You are not trading the actual asset but instead are trading a derivative contract. Perpetual swap contracts can last indefinately, in contrast to futures or option contracts.
|
||||
|
||||
In addition to the gains/losses from the change in price of the futures contract, traders also exchange funding fees, which are gains/losses worth an amount that is derived from the difference in price between the futures contract and the underlying asset. The difference in price between a futures contract and the underlying asset varies between exchanges.
|
||||
In addition to the gains/losses from the change in price of the contract, traders also exchange funding fees, which are gains/losses worth an amount that is derived from the difference in price between the contract and the underlying asset. The difference in price between a contract and the underlying asset varies between exchanges.
|
||||
|
||||
|
||||
``` python
|
||||
@ -48,11 +47,10 @@ The possible values are: `isolated`, or `cross`(*coming soon*)
|
||||
# TODO: I took this definition from bitmex, is that fine? https://www.bitmex.com/app/isolatedMargin
|
||||
**ISOLATED**
|
||||
|
||||
Margin assigned to a position is restricted to a certain amount. If the margin falls below the Maintenance Margin level, the position is liquidated.
|
||||
Each market(trading pair), keeps collateral in a separate account
|
||||
|
||||
**CROSS**
|
||||
|
||||
Margin is shared between open positions. When needed, a position will draw more margin from the total account balance to avoid liquidation.
|
||||
One account is used to share collateral between markets (trading pairs). Margin is taken from total account balance to avoid liquidation when needed.
|
||||
|
||||
``` python
|
||||
"collateral": "isolated"
|
||||
@ -60,6 +58,8 @@ Margin is shared between open positions. When needed, a position will draw more
|
||||
|
||||
### Developer
|
||||
|
||||
**Margin mode**
|
||||
|
||||
For shorts, the currency which pays the interest fee for the `borrowed` currency is purchased at the same time of the closing trade (This means that the amount purchased in short closing trades is greater than the amount sold in short opening trades).
|
||||
|
||||
For longs, the currency which pays the interest fee for the `borrowed` will already be owned by the user and does not need to be purchased. The interest is subtracted from the close_value of the trade.
|
||||
@ -76,5 +76,7 @@ For longs, the currency which pays the interest fee for the `borrowed` will alre
|
||||
I (interest) = Opening fee + Rollover fee
|
||||
[source](https://support.kraken.com/hc/en-us/articles/206161568-What-are-the-fees-for-margin-trading-)
|
||||
|
||||
**FUTURES MODE**
|
||||
|
||||
Funding fees are either added or subtracted from the total amount of a trade
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user