Main Menu

Leveraged Trade

Started by Jansky, December 08, 2015, 11:37:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

monsterer

Quote from: Jansky on December 11, 2015, 01:09:16 PM
In my mind I thought that it could be implemented as a market for an interest rate on an asset borrowed for a certain amount of time(second, minute, hour, day, whatever) coupled with the ability to lock funds in protocol based on the loan contract.

Indeed this is the more correct way to do it. I think they are just discussing how to achieve a similar effect very quickly.
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Jansky

In my mind I thought that it could be implemented as a market for an interest rate on an asset borrowed for a certain amount of time(second, minute, hour, day, whatever) coupled with the ability to lock funds in protocol based on the loan contract.

tonyk

Quote from: xeroc on December 11, 2015, 09:28:27 AM
x is the price of another token/asset ...
n is a parameter for your newly created "derivative" (literally)
F is the "derivative":

F = log(x^n) = n*log(x)

log can be of any base

Then, there is an approximation that states

n*log(x) = log(n*x)    // for small x

Let's say x_0 is the initial price, then we get

F(x_0) = n*log(x_0)

if the price moves by 1%, we get:   x_0*1.01 and the derivatives becomes

F(x_0*1.01) = n*log(x_0*1.01)  = (approximation)  log(n*x_0*1.01) = log(n*x_0) + log(1.01) = F(x_0) + log(1.01)  (!!! note the PLUS over here!!! )

Hence:
- log creates a non-linear mapping of x -> F(x)
- n is a scaling factor which allows for fine-tuning

ohh you mean if n=2, this does not represent 2x leverage. For some reason I read it like that. Now  rereading it  really does not say so, and I came up with this on my own.
Thanks.
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

monsterer

So I guess you guys are saying that if the feed price was scaled by, say 2 times, it's conceptually similar to having 2 x leverage, but not exactly in practice?
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

xeroc

x is the price of another token/asset ...
n is a parameter for your newly created "derivative" (literally)
F is the "derivative":

F = log(x^n) = n*log(x)

log can be of any base

Then, there is an approximation that states

n*log(x) = log(n*x)    // for small x

Let's say x_0 is the initial price, then we get

F(x_0) = n*log(x_0)

if the price moves by 1%, we get:   x_0*1.01 and the derivatives becomes

F(x_0*1.01) = n*log(x_0*1.01)  = (approximation)  log(n*x_0*1.01) = log(n*x_0) + log(1.01) = F(x_0) + log(1.01)  (!!! note the PLUS over here!!! )

Hence:
- log creates a non-linear mapping of x -> F(x)
- n is a scaling factor which allows for fine-tuning

tonyk

#8
What is log (x)?  So, x is supposedly being the price.[leaving aside that this does not work with prices <=1]
what is log (d%)?


----
price = 5 ; log (5) = 0.69897

1% increase; 1.01*5=5.05; log(5.05) = 0.70329

log(5.05) / log (5) = 1.006180




I definitely got some part of this post wrong. Which one?
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

theoretical

#7
If you create an asset A and set the price feed of A to be a function F(x) of the price x of some other asset like


F(x) = x^n


then how many percent does F(x) move for a given percent movement of x?


log(F) = n*log(x)


So a d% gain in x will increase log(x) by log(d%) which will increase log(F) by n*log(d%), which is nearly log(n*d%) for small d, i.e. a 1% gain in X will lead to an approximately n% gain in F(x) -- and likewise a 1% loss will lead to an approximately n% fall in F(x):


log(F) = log(x) + log(1%)


Effectively A has the same gain/loss profile as borrowing money to invest in the underlying, then borrowing / repaying on the loan as needed to maintain the same leverage continuously as the price of underlying moves, without actually requiring any actual loan to take place.

There are a couple problems:


  • A black swan is easier to happen in A than in an asset that tracks the underlying directly
  • You have to find a counterparty who wants to invest in the opposite market at the same leverage ratio you do, which may be a very thin market for some pairs
  • The new asset may need its own marketing independent of the underlying asset (especially if they have different feed providers)

Having a way for the system to automatically compute these derived feeds was on my wishlist for Graphene, but nobody seemed to care much about implementing leverage this way.
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

eagleeye

Quote from: Jansky on December 09, 2015, 11:25:13 PM
thanks
Quote from: lil_jay890 on December 08, 2015, 11:51:38 PM
Quote from: carpet ride on December 08, 2015, 11:42:45 PM
Thanks for posting your feedback :)

I understand Cryptonomex is delivering margin trading in in the next few months.

I follow these forums very closely and I have not heard that they will be delivering margin trading/bond market any time in the near future.

It sounds like stealth transactions are first and that isn't scheduled to be done until mid February


Thanks for the info.  I do think that implementing those features [capital market, leveraged trading] would help drive adoption substantially, and would be fairly straightforward to implement.  Bringing traders to the yard would be a good thing.  I for one would like to lend out my parked funds to traders for a yeild.  Also I'd really like to buy at the market and place stop orders (without writing scripts to do so)  any plans to implement this in the UI?

I agree with you.  Margin trading and a loan market are very important.
TheValueSwan
www.thevalueswan.com

Jansky

thanks
Quote from: lil_jay890 on December 08, 2015, 11:51:38 PM
Quote from: carpet ride on December 08, 2015, 11:42:45 PM
Thanks for posting your feedback :)

I understand Cryptonomex is delivering margin trading in in the next few months.

I follow these forums very closely and I have not heard that they will be delivering margin trading/bond market any time in the near future.

It sounds like stealth transactions are first and that isn't scheduled to be done until mid February


Thanks for the info.  I do think that implementing those features [capital market, leveraged trading] would help drive adoption substantially, and would be fairly straightforward to implement.  Bringing traders to the yard would be a good thing.  I for one would like to lend out my parked funds to traders for a yeild.  Also I'd really like to buy at the market and place stop orders (without writing scripts to do so)  any plans to implement this in the UI?

carpet ride

Quote from: lil_jay890 on December 08, 2015, 11:51:38 PM
Quote from: carpet ride on December 08, 2015, 11:42:45 PM
Thanks for posting your feedback :)

I understand Cryptonomex is delivering margin trading in in the next few months.

I follow these forums very closely and I have not heard that they will be delivering margin trading/bond market any time in the near future.

It sounds like stealth transactions are first and that isn't scheduled to be done until mid February

I'm going to default to your recollection then.  I must be remembering something that was said in a mumble session about polo-style margin trading being easy enough to implement.  good thing I can proxy my votes. ...
All opinions are my own. Anything said on this forum does not constitute an intent to create a legal obligation between myself and anyone else.
Check out my blog: [url="http://certainassets.com"]http://certainassets.com[/url]
Buy the ticket, take the ride.

lil_jay890

Quote from: carpet ride on December 08, 2015, 11:42:45 PM
Thanks for posting your feedback :)

I understand Cryptonomex is delivering margin trading in in the next few months.

I follow these forums very closely and I have not heard that they will be delivering margin trading/bond market any time in the near future.

It sounds like stealth transactions are first and that isn't scheduled to be done until mid February

carpet ride

Thanks for posting your feedback :)

I understand Cryptonomex is delivering margin trading in in the next few months.
All opinions are my own. Anything said on this forum does not constitute an intent to create a legal obligation between myself and anyone else.
Check out my blog: [url="http://certainassets.com"]http://certainassets.com[/url]
Buy the ticket, take the ride.

Jansky

I like BTS 2.o :-)

is there a way to open a leveraged trade?  I really want bts to be Bitfinex lol, is there a plan to implement loans?