Hi I have been working on the spread between Commonwealth Bank (CBA.ASX) and National Australia Bank (NAB.ASX). I was a bit confused by the performance of my dealing loop so I took out the spread movement from rqHistoricData 1 minute bars using the close and plotted it and also the spread derived from the tick data from reqMktData which is being used to drive my dealing algorithm. They are in the same ballpark but really rather different. The graph shows the position best and can be viewed at this url: http://www.organicfoodmarkets.com.au/bar-n-tick-plots.pdf I am not experienced with this so I wondered if this sort of discrepancy is typical or am I just making a mess of it. If they are typical so it makes setting trigger levels a bit difficult as mine are derived from bar data but implemented by tick data movement. I'm surprised the tick data doesn't fall within the one minute bar so any comments would be of great interest. Am I better to only work with tick data for example? Stephen Choularton PhD, FIoD
tick data and one minute bar data appear out of line (IBrokers)
4 messages · Joshua Ulrich, Stephen Choularton
On Thu, Mar 3, 2016 at 9:38 PM, Stephen Choularton
<stephen at organicfoodmarkets.com.au> wrote:
Hi I have been working on the spread between Commonwealth Bank (CBA.ASX) and National Australia Bank (NAB.ASX). I was a bit confused by the performance of my dealing loop so I took out the spread movement from rqHistoricData 1 minute bars using the close and plotted it and also the spread derived from the tick data from reqMktData which is being used to drive my dealing algorithm. They are in the same ballpark but really rather different. The graph shows the position best and can be viewed at this url: http://www.organicfoodmarkets.com.au/bar-n-tick-plots.pdf
The 1-minute close price is a (potentially very small) sample of all the price changes that occur in a given minute interval. The fact that they're similar is likely because the price wasn't moving much during the hours in your plot. If prices were moving a lot, I wouldn't expect them to be very similar at all. If you look at the tick data versus the high-low range, you should see that all the tick prices fall within that range for every aggregate interval.
I am not experienced with this so I wondered if this sort of discrepancy is typical or am I just making a mess of it. If they are typical so it makes setting trigger levels a bit difficult as mine are derived from bar data but implemented by tick data movement. I'm surprised the tick data doesn't fall within the one minute bar so any comments would be of great interest. Am I better to only work with tick data for example? Stephen Choularton PhD, FIoD
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com R/Finance 2016 | www.rinfinance.com
Hi Joshua
Just trying to follow that comment 'If you look at the tick data versus
the high-low range, you should see that all the tick prices fall within
that range for every aggregate interval.'
The summary of the two datasets is:
summary(bars)
Index CBA.Close
Min. :2016-03-03 10:06:00 Min. :48.31
1st Qu.:2016-03-03 11:37:00 1st Qu.:48.38
Median :2016-03-03 13:08:00 Median :48.45
Mean :2016-03-03 13:08:00 Mean :48.46
3rd Qu.:2016-03-03 14:39:00 3rd Qu.:48.53
Max. :2016-03-03 16:10:00 Max. :48.73
and
summary(ticks)
Min. 1st Qu. Median Mean 3rd Qu. Max.
47.82 48.41 48.44 48.47 48.49 49.00
Now that min figure is the result of some market closing phenomena and
it really never went much below 48.3 so yes its true that they have a
similar range and min and max but ticks gets up into the just under 49.0
level around 10:15 and bars only gets to that level around 11:30 and
again at noon while ticks is under 48.6 at that point.
Sounds like you don't think there is anything that unusual in the two
datasets so I guess I had better take that on board and keep on trying
to make this work.
Thanks for looking at it
Stephen Choularton PhD, FIoD
On 4/03/2016 2:50 PM, Joshua Ulrich wrote:
On Thu, Mar 3, 2016 at 9:38 PM, Stephen Choularton <stephen at organicfoodmarkets.com.au> wrote:
Hi I have been working on the spread between Commonwealth Bank (CBA.ASX) and National Australia Bank (NAB.ASX). I was a bit confused by the performance of my dealing loop so I took out the spread movement from rqHistoricData 1 minute bars using the close and plotted it and also the spread derived from the tick data from reqMktData which is being used to drive my dealing algorithm. They are in the same ballpark but really rather different. The graph shows the position best and can be viewed at this url: http://www.organicfoodmarkets.com.au/bar-n-tick-plots.pdf
The 1-minute close price is a (potentially very small) sample of all the price changes that occur in a given minute interval. The fact that they're similar is likely because the price wasn't moving much during the hours in your plot. If prices were moving a lot, I wouldn't expect them to be very similar at all. If you look at the tick data versus the high-low range, you should see that all the tick prices fall within that range for every aggregate interval.
I am not experienced with this so I wondered if this sort of discrepancy is typical or am I just making a mess of it. If they are typical so it makes setting trigger levels a bit difficult as mine are derived from bar data but implemented by tick data movement. I'm surprised the tick data doesn't fall within the one minute bar so any comments would be of great interest. Am I better to only work with tick data for example? Stephen Choularton PhD, FIoD
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
3 days later
On Thu, Mar 3, 2016 at 11:47 PM, Stephen Choularton
<stephen at organicfoodmarkets.com.au> wrote:
Hi Joshua
Just trying to follow that comment 'If you look at the tick data versus the
high-low range, you should see that all the tick prices fall within that
range for every aggregate interval.'
The summary of the two datasets is:
summary(bars)
Index CBA.Close
Min. :2016-03-03 10:06:00 Min. :48.31
1st Qu.:2016-03-03 11:37:00 1st Qu.:48.38
Median :2016-03-03 13:08:00 Median :48.45
Mean :2016-03-03 13:08:00 Mean :48.46
3rd Qu.:2016-03-03 14:39:00 3rd Qu.:48.53
Max. :2016-03-03 16:10:00 Max. :48.73
and
summary(ticks)
Min. 1st Qu. Median Mean 3rd Qu. Max.
47.82 48.41 48.44 48.47 48.49 49.00
Now that min figure is the result of some market closing phenomena and it
really never went much below 48.3 so yes its true that they have a similar
range and min and max but ticks gets up into the just under 49.0 level
around 10:15 and bars only gets to that level around 11:30 and again at noon
while ticks is under 48.6 at that point.
Sounds like you don't think there is anything that unusual in the two
datasets so I guess I had better take that on board and keep on trying to
make this work.
I don't think there's anything unusual, unless the close prices are outside the high-low range. I think the piece you're missing is that "high-low range" means the high and low prices (ticks) for a 1-minute interval; not the max/min of the close price.
Thanks for looking at it Stephen Choularton PhD, FIoD On 4/03/2016 2:50 PM, Joshua Ulrich wrote:
On Thu, Mar 3, 2016 at 9:38 PM, Stephen Choularton <stephen at organicfoodmarkets.com.au> wrote:
Hi I have been working on the spread between Commonwealth Bank (CBA.ASX) and National Australia Bank (NAB.ASX). I was a bit confused by the performance of my dealing loop so I took out the spread movement from rqHistoricData 1 minute bars using the close and plotted it and also the spread derived from the tick data from reqMktData which is being used to drive my dealing algorithm. They are in the same ballpark but really rather different. The graph shows the position best and can be viewed at this url: http://www.organicfoodmarkets.com.au/bar-n-tick-plots.pdf
The 1-minute close price is a (potentially very small) sample of all the price changes that occur in a given minute interval. The fact that they're similar is likely because the price wasn't moving much during the hours in your plot. If prices were moving a lot, I wouldn't expect them to be very similar at all. If you look at the tick data versus the high-low range, you should see that all the tick prices fall within that range for every aggregate interval.
I am not experienced with this so I wondered if this sort of discrepancy is typical or am I just making a mess of it. If they are typical so it makes setting trigger levels a bit difficult as mine are derived from bar data but implemented by tick data movement. I'm surprised the tick data doesn't fall within the one minute bar so any comments would be of great interest. Am I better to only work with tick data for example? Stephen Choularton PhD, FIoD
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com R/Finance 2016 | www.rinfinance.com