Discretizing tick prices

mohitsingh

New Member
Joined
Aug 5, 2011
Messages
1
Dear All,

I have historical prices of a FTSE 100 index.

There are two columns, Times and Price. The time is uneven and is in seconds

For instance:
Time Price
2011-04-01T07:12:35.412Z 5949.6
2011-04-01T07:12:35.412Z 5949.4
2011-04-01T07:12:35.412Z 5949.4
2011-04-01T07:12:35.571Z 5949.4
2011-04-01T07:12:35.571Z 5949.4
2011-04-01T07:12:39.974Z 5949.4
2011-04-01T07:12:39.974Z 5950.1
2011-04-01T07:12:39.974Z 5950.1
2011-04-01T07:12:39.974Z 5950.1
2011-04-01T07:12:39.974Z 5949.7
2011-04-01T07:12:39.974Z 5949.7
2011-04-01T07:12:42.887Z 5949.7
2011-04-01T07:12:43.378Z 5950.1
2011-04-01T07:12:43.378Z 5950.1




Now...this goes on for around 1.5 million entries. I want to ask, if I want to convert this into minute-minute rather than uneven second levels and the respective price at that time how can I do it?

So I would want it like

2011-04-01T07:12:35Z
2011-04-01T07:12:36Z
2011-04-01T07:12:37Z
2011-04-01T07:12:38Z with their respective prices when the minute starts.

If anybody could help I would appreciate it and I hope I have explained it well enough
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
What version of Excel have you managed to get your hands on (two columns around 1.5 million entries)?!

One way, use Text To Columns, with fixed width option to split the time column into two columns, but you're going to skip the second column. Split it to leave the likes of:
2011-04-01T07:12:35

Now add a formula in column C and copy down/up, leaves you with:
Excel Workbook
ABC
452011-04-01T07:12:355949.6 
462011-04-01T07:12:355949.4
472011-04-01T07:12:355949.4
482011-04-01T07:12:355949.4
492011-04-01T07:12:355949.45949.4
502011-04-01T07:12:395949.4
512011-04-01T07:12:395950.1
522011-04-01T07:12:395950.1
532011-04-01T07:12:395950.1
542011-04-01T07:12:395949.7
552011-04-01T07:12:395949.75949.7
562011-04-01T07:12:425949.75949.7
572011-04-01T07:12:435950.1
582011-04-01T07:12:435950.15950.1
Sheet


(This leaves prices at the end of each time slot - a small change to which cells the formula looks at could do the same for the start of each time slot:in C45: =IF(A45<>A44,B45,"")

Now filter on column C excluding blanks:
Excel Workbook
priceconsolidated price
2011-04-01T07:12:355949.45949.4
2011-04-01T07:12:395949.75949.7
2011-04-01T07:12:425949.75949.7
2011-04-01T07:12:435950.15950.1
Sheet


Now copy just columns A and B to another sheet.

Now I think your example is using seconds rather than minutes and I've followed your example - but I don't know what Z time is - so the only change you might need to make is where you split the date/time column when you Text-to-Columns it; split it leaving the likes of:
2011-04-01T07:12
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top