SmartQuant Discussion
http://www.smartquant.com/forums/

bar Volume when using quote to build middle price bars
http://www.smartquant.com/forums/viewtopic.php?f=60&t=14653
Page 1 of 1

Author:  azuric [ Fri Oct 07, 2016 10:37 am ]
Post subject:  bar Volume when using quote to build middle price bars

Hi,

How do you calculate volume in this case it does not appear to correlating to my trade volume data.

Author:  Dr. Anton Fokin [ Fri Oct 07, 2016 10:39 am ]
Post subject:  Re: bar Volume when using quote to build middle price bars

(ask.Size + bid.Size) / 2 ?

Author:  azuric [ Fri Oct 07, 2016 12:52 pm ]
Post subject:  Re: bar Volume when using quote to build middle price bars

ah ok i thought the volume component would be like the bars based on trades. But it is pretty easy for derive trade volume.

Author:  Dr. Anton Fokin [ Fri Oct 07, 2016 12:57 pm ]
Post subject:  Re: bar Volume when using quote to build middle price bars

Well, usually people construct bars from bids and asks in Forex, where you don't have trades in the market data stream... so no trade volume anyway...

Regards,
Anton

Author:  azuric [ Sat Oct 08, 2016 11:21 am ]
Post subject:  Re: bar Volume when using quote to build middle price bars

I tend to use mid price and inverse weighted mid price (bid ask imbalance) quite heavily for intra day trading when down sampling because the using trade price gives too much jitter, and the bid ask spread also tends to swamp out other effects.

Author:  Dr. Anton Fokin [ Sat Oct 08, 2016 6:42 pm ]
Post subject:  Re: bar Volume when using quote to build middle price bars

Something like price = (bid.Price*bid.Size + ask.Price*ask.Size) / (bid.Size + ask.Size) ?

Author:  azuric [ Sun Oct 09, 2016 10:01 am ]
Post subject:  Re: bar Volume when using quote to build middle price bars

Other way round :

(bid.Price*ask.Size + ask.Price*bid.Size) / (bid.Size + ask.Size)

but also with you can take into account the last price that traded in your function as well you get a weighted function since the last price that traded is slightly more likely to trade again.

I have also found predictive significance in quote/trade intensity and

(trades@ask - trades@bid)/(trades@ask + trades@bid)

useful but you need do irregular time exponential smoothing possibly Kalman,

or regular bar time/volume based smoothing.

Author:  Dr. Anton Fokin [ Mon Oct 17, 2016 3:42 pm ]
Post subject:  Re: bar Volume when using quote to build middle price bars

Quote:
(bid.Price*ask.Size + ask.Price*bid.Size) / (bid.Size + ask.Size)



Are you sure? This doesn't look like weighted average. I think the idea is that if bid size is much larger than ask size, then we use bid price. In your formula we would use ask price instead.

Author:  azuric [ Fri Oct 21, 2016 3:58 pm ]
Post subject:  Re: bar Volume when using quote to build middle price bars

Wait if the bid price is much larger than the ask then the ask is more likely to trade next therefore the ask is the price you want to consider. The conditional probability of an uptick is higher than a down tick.

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/