aj[`time`sym;trade;quote]
is joining each trade with the previous value of quote.
I'd like to do the same join, but on the next value of quote instead of the previous one.
How can I achieve this?
Define the following function:
k)ajr: {.Q.ft[{d:x_z;$[&/j:-1<i:(x#z)binr x#y;y,'d i;+.[+.Q.ff[y]d;(!+d;j);:;.+d i j:&j]]}[x,();;0!z]]y}
which is just the definition of aj in k, with binr instead of bin.
Then it can be used exactly like aj, but it will return the next quote instead of the previous one.
Source: https://groups.google.com/d/topic/personal-kdbplus/F-5zVzkvc6c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With