Forums  > Trading  > orders distribution vs forward price and trade distribution  
     
Page 1 of 2Goto to page: [1], 2 Next
Display using:  

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-07 16:16
Asking question to myself:
Suppose, I have an idea about forward price and trades distributions/intensities, then

"What should be the shape of asks and bids in the order book of the exchange?"

In this question, I ignore all competition present on the market.


M.O'Hara, J.Hasbrouk, Lyons, D.Farmer etal, JP.Bouchard etc. etc. I did look at.

Any other references to read? I would be happy even with some simplified formulation of the problem.

My current read:
"High-frequency market-making with inventory constraints and directional bets"
Pietro Fodra, Mauricio Labadie

bullero


Total Posts: 13
Joined: Feb 2018
 
Posted: 2018-09-07 23:27
Well... there definitely is no right or wrong answer to this... but I guess my two cents would be that: based on measureable variables the spread definitely depends on your current inventory, time to market close, asset price vol., tick size and probability of being filled?

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-09 00:15
Inventory can be accounted via distributions transformation in the way given by Amihud-Mendelson. There are more complicated solutions but I believe a second order empirical corrections are possible

My marker is crypto 24/7. No close. But yes, interesting notion.

Price vol, cross/autocorr etc is part of generic "forward price distribution".

Im not interested in spread as such but distribution of orders, where, for example, bids are distributed
from ask(volume) (execution prob = 1) down to zero (execution prob = 0).

tick size forgot. Thank you


bullero


Total Posts: 13
Joined: Feb 2018
 
Posted: 2018-09-09 12:50
Right, I got your point now. So you are not interested to know what should your spread be as such but rather how does the book look like / what kind of structure it has given some assumptions/context (?) regarding the market.

Referring your previous read the authors (correct me If I am wrong) give optimal spreads given exogeneous assumptions for the mid price process. So for example pure BM and OU etc. If I remember correctly they also talk about the forward price case and how you should take liquidity as a mm in some particular cases.

To be honest I am not aware of any other paper which would consider these things.

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-09 19:13
Correct

My (vague) hypothesis is that the order book reflects future view on the traded asset price [Of course, i have to account for those inventory and pure order market mechanistic effects, like flushing, order book structure etc.] If that representation exists, than I can imply future price from the current shape of the book and compare it with mine.

benbloom


Total Posts: 2
Joined: Aug 2018
 
Posted: 2018-09-10 03:18
It helps to assume there is a single market-maker. He creates a ladder rather than a single price because he wants a spread which is narrow enough so that takers will execute trades, but wide enough to maximise his PnL. In that sense the shape of his quotes are related to those different goals. I found this paper to be helpful in terms of understanding the relationship between spread and volatility https://arxiv.org/pdf/1606.07381.pdf

ronin


Total Posts: 341
Joined: May 2006
 
Posted: 2018-09-10 16:23
> Im not interested in spread as such but distribution of orders, where, for example, bids are distributed
from ask(volume) (execution prob = 1) down to zero (execution prob = 0).

@nikol, you are on the right track.
But execution probability is always 1, if time horizon is infinite. The only reason an order would be impossible to hit is if it expires before it is hit.

And then you would modify that to include seasonality. E.g. transform "elapsed time" time to "traded quantity". So the measure would be quantity to trade before the order is hit.

If you are talking about infinite time horizons, you probably also have to account for the cost of carrying any inventory over long periods.

"There is a SIX am?" -- Arthur

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-10 19:51
@benbloom thank you. I have seen this, but just scanned through.


@ronin
Sorry for confusion. Yes, time is part of it.
I mean this:
- Given high enough price to buy, the market will take the order immediately after they see it
- Similarly, if I sell valuable asset at zero (basically gift) it will be taken immediately

>> cost of carrying any inventory.

Perhaps, at short term I can ignore it. What is the price of holding EUR or BTC? I have no margin, borrowing cost etc, only me "eating food" and my infrastructure is "eating electricity".

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-11 14:52
Thinking about this problem I find some caveat in my argumentation and, therefore, more questions.

- Assume short term horizon.
- Imagine respective term structure of the forward price distribution. Its description is quite reach and includes all sorts of conditional probabilities, which describe mean-reverting and more complex effects.
- In what I described earlier, I set bids and asks in a static manner, i.e. within defined horizon.

Or course, my intention is to 'earn profit' from such a market, where market orders hit my limit orders at rates balanced by inventory correction in Amihud-Mendelson style (to keep inventory within limits)

Now is the question:
In this setting, is it possible that my competitors can outplay me such that my orders are never hit and I have zero profit (if not a loss)?

ronin


Total Posts: 341
Joined: May 2006
 
Posted: 2018-09-11 16:28
> What is the price of holding EUR or BTC?

Geez mate. If you don't know, you shouldn't be trading it. Are you in the market for second hand cars as well?

Seriously, check it - it could be a lot. Funding is where bookies make money, not trading fees. Same as banks.

But if your orders are effectively good for day, then cost of carry won't come into the fill probability. Then you do actually have a meaningful fill probability - as in, fill by eod.

Now your concern is how expensive will it be to get out of inventory by eod, versus how expensive it will be to carry the inventory overnight. On both horizons you have some price volatility, so you penalise for that based on your risk tolerance. Then it turns into a simple optimization problem.


"There is a SIX am?" -- Arthur

ronin


Total Posts: 341
Joined: May 2006
 
Posted: 2018-09-11 17:17
> is it possible that my competitors can outplay me such that my orders are never hit and I have zero profit (if not a loss)?


That is not what it would look like. Your orders will get hit, at least some of them. You may find that you find it difficult to get hit on orders where fills would have made you money, and easy on orders where you lose money.

That is called adverse selection. It is a thing, and if you do any sort of intraday trading, that will be the key to whether you make money or not.


"There is a SIX am?" -- Arthur

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-11 17:37
> Seriously, check it - it could be a lot.

Of course, if I leverage or borrow. But what if I don't? => cost of carry = zero.

> Now your concern is how expensive will it be to get out of inventory by eod,

EOD is not a concern here. I might stop trading 30 minutes before and gradually close all positions. Besides, my market (crypto) is 24/7.

Remember, I conditioned to price my orders to facilitate zero inventory = if I get too many buys (long), I stop buying and shift price to sell more.
-- Problem: under falling market I can get too many buy hits of my bids, therefore, I have to set the limit. My asks (market for shorts) will have to get lower than the market at higher speed to liquidate those long positions I've got due to the fall. I have to measure it.


> key to whether you make money or not

that's key to everything. it is also key to Life, where you find a food and feed yourself and kids or you do not.

Thank you for the challenge )

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-20 11:15
Here is bid-ask of triangle arbitrage spread shown within 10 seconds window (2 vertical grid lines). Black horizontal is zero.

What is the reason of doing this?



Exchange has a limited number of messages per second, so, perhaps, the other side puts a gun smoke for "me" such that I follow and spend my message limit within second bucket, right?

Of course, I can teach my algo to quickly identify this "dribbling" and ignore it.

Jurassic


Total Posts: 152
Joined: Mar 2018
 
Posted: 2018-09-20 11:53
> Funding is where bookies make money, not trading fees. Same as banks.

@ronin do you know where i could read more about this?

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-20 14:30
[deleted]

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-20 14:46
If exchange has fee ladder and you are able to aggregate customer flow, then you get the residual fee.

F.e. 1% for <1M per month and 0.5% if more. If you are able to attract 200 clients trading 10k each then this alone gives you 10k residual. Apart from free funding.

ronin


Total Posts: 341
Joined: May 2006
 
Posted: 2018-09-24 17:47
@nikol,

I have no idea what is on this picture. An orderbook of some sort? It doesn't look like any orderbook I have ever seen. And I have seen orderbooks.

If your point is that some cross is putting hidden liquidity inside the spread, there could be many reasons.

It could be that somebody is working a large sell and they are using all means to take any liquidity they can. Expect the market to go down.

Or it could be that somebody is suspecting that there is a large buy, and they are flying out a few baits to see if anybody bites. Expect the market to go up.

Or it could be just random sh*t that means nothing. Expect the market to do what ever it does anyway.


> @ronin do you know where i could read more about this?


@jurassic, sorry no. It's an observation - I am not aware of anybody actually doing a study of bookies.


"There is a SIX am?" -- Arthur

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-24 19:04
@ronin - "I have no idea what is on this picture. An orderbook of some sort?"

Yes, it is (best) quote stuffing. Working on filtering it out.
This pattern makes my life difficult because I use it to market other related market.

I have a very simple guess:
This particular exchange limits common clients with 20 messages/second and pro-clients have a limit of 50 msg/sec.
Therefore, if I follow his oscillations, he will freeze my orders after I waste my 20 moves, so he can do with them whatever he wants. There are 1000 milliseconds per second and even more microseconds.

Thank you.

ronin


Total Posts: 341
Joined: May 2006
 
Posted: 2018-09-25 10:26
You shouldn't be following his oscillations full stop, regardless of exchange limits. If you follow him around, he will scalp you.

Say I want to sell something, and the bid ask is too wide. What is this - 20 ticks, 50 ticks? But that's ok - I'll just place a small bid one tick below the best ask. When the guy comes following me, I cancel my bid and hit his. Repeat. I just saved myself 49 ticks.

The exchange limit is there to protect you. There is nobody, I repeat nobody in the entire world who sends a thousand messages per second, every second. Nobody. Not Virtu. Not Tower. Not Jump. Not Jane Street. Nobody.

I don't know how your strategy works, but you probably need to sit down again and re-think this part.

The key question to ask is "can somebody manipulate my behaviour? how expensive would it be for them?" If the answers are "yes, not very" then you need to keep looking.

"There is a SIX am?" -- Arthur

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-25 10:59
Following oscillatory patterns is self suicide - I felt it but now after your example I know and understand.

"Advance, cancel and hit" strategy will cost me taker fee much much higher than the tick or even the spread. While staying on the maker side is free.

Thank you for the insight.

ronin


Total Posts: 341
Joined: May 2006
 
Posted: 2018-09-25 15:34
If you look at your picture, there is very little that has actually happened in those ten seconds. The market didn't go anywhere, the spread didn't go anywhere. Yes, there are thousands of events, but on the whole they add up to nothing.

Also, it doesn't seem to be very difficult to improve on the best market levels. There is plenty of room inside the spread, and the oscillation of touch levels leaves you enough room to scratch any unwanted fill with some room to spare.

If I was designing a market making strategy for this sort of market, that would be where I would start.

"There is a SIX am?" -- Arthur

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-25 16:07
Indeed. It makes sense.
Here is my plain vanilla estimation (in red) based on the cross markets information (my basic algorithm). I still have to remove oscillations.

Blue line is what 'market' is doing.


Of course, I will quote +1 tick better as I see no need to cut the spread all at once.

ronin


Total Posts: 341
Joined: May 2006
 
Posted: 2018-09-25 16:49
It makes sense in the middle of the picture. Put in some condition for changing your price level, and calibrate the threshold. You really only want to change when there is a good reason. And good reason can not rely on things like "best bid", "best ask" and "mid". Because somebody can throw one clip inside the spread and manipulate best bid, best ask and mid until the cows come home.

But I don't understand the left and right parts of the picture.

On the left, you are buying at ask and selling a few levels above ask? Fair enough if the ask is just some artificial thing inside the real spread.

On the right, the market has gone up but you have gone down? The right end doesn't make sense.

"There is a SIX am?" -- Arthur

nikol


Total Posts: 520
Joined: Jun 2005
 
Posted: 2018-09-25 17:58
> But I don't understand the left and right parts of the picture.

My bids and asks are direct function of other markets. On the right: Reds under Blues might indicate that I have an arbitrage (possible fee and wanted margin are not yet accounted). Red lines are my prices, which I do not publish with orders.

If it is an arb, I plan to execute this sequence of actions:
a. wait for hit of my sell limit-order below blue upper line at this market (let say it is market-A),
if yes, then
b. I sell market-order at another market (let's call it market-B)

However, based on your comments this situation might be a trap. While my machine is taking the decision and the signal goes through the wire, my 'faster' opponent can increase his buy limit-order on market-B and I loose money.

ronin


Total Posts: 341
Joined: May 2006
 
Posted: 2018-09-26 10:40
Got it.

If you can't make money by crossing two spreads and paying two taker fees, then it does become complicated and it depends a lot on how other traders react to you.

Try a few things and see what works. Also, expect "what works" to change every once in a while as other traders change how they interact with you.

"There is a SIX am?" -- Arthur
Previous Thread :: Next Thread 
Page 1 of 2Goto to page: [1], 2 Next