Hi all,I would like to sample inhomogenous tick time series over 1 sec (forexample). Have someone done this?I have done this in java, but in q it seems quite tricky for me rightnow.Thanks and regards.
charset=us-ascii
X-Mailer: iPhone Mail (8F190)
In-Reply-To: <21bf8f06-0964-4b24-a703-dc6cf734feb3@k40g2000pro.googlegroups.com>
Message-Id: <6CC0F3B5-9662-4E3E-9E0C-5B83E1AA66A8@gmail.com>
Date: Tue, 26 Apr 2011 06:38:30 -0400
To: “personal-kdbplus@googlegroups.com”
Mime-Version: 1.0 (iPhone Mail 8F190)
Can you elaborate a little more? What data do you have to work with (schema)=
?
are you subscribing a tick series (.u.sub) or collecting data by (1-sec) timer (.z.ts)?
I would like to sample FX rate when I subscribed to tick series using .u.sub and as well I would like sampling ticks to different periods from historical data.
My prefered way right now is process all incoming ticks row by row:
1. Have Two tables for raw(unmodified) ticks and for sampled rates
2. Have a sampled period (for example 1sec, 10 secs,30 secs,…)
3. separate all incoming ticks by sym
3.1.keep last sampled record (milliseconds = 000)
3.2.keep previous tick
3.3 get new tick
3.3 calculate sampled period for new tick
3.3.check whether new tick’s sampled period is in current sampled period
3.3.1 If yes : save new tick as last tick and continue from 3.3
3.3.2 If not : check how many sampled periods are between new tick and last sampled period
3.3.3 Fill all missing sampled period with previous tick’s rate and properly modified timestamp (milliseconds = 000)
Thanks and regards,
AB
Unless otherwise stated, this email is confidential. If received in error, please delete and inform the sender by return email. Unauthorised use, copying or distribution is prohibited. Westpac Banking Corporation (ABN 33 007 457 141) is not responsible for viruses, or for delays, errors or interception in transmission. Unless stated or apparent from its terms, any opinion is not the opinion of Westpac Banking Corporation. This message also includes information on Westpac Institutional Bank available at westpac.com.au/wibinfo