2 weeks ago
Hi,
Is the classifyTrades.quke correct? I get the error: abort in before block due to error "test.testTab" (FP.Functions.test/classifyTrades.quke:3). My classifyTrades function is ok when I run it against tradeContext table. When I replaced test.expTab and test.testTab to expTab testTab inside classifyTrades.quke, then the test is passed.
Wednesday
Hi @bl,
Sorry for the delay in response, it's because you didn't define your function as 'classifyTrades'.
I defined the function and the tests passed as seen attached.
Thanks,
Megan 🙂
2 weeks ago
Hi @bl !
To help me better assist you, can you send me your code for classifyTrades?
You can do this using the spoiler tag or you can dm me!
Thanks,
Megan 🙂
2 weeks ago
Hi Megan,
{[tab]
//Pseudocode:
//Performing an update will keep the original table
//When classifying, need to first check the side
//If side is Buy, then a good trade was bought for less than what the market was asking for
//If side is Sell, then a good trade sold for more than what the market was bidding for
//The vector conditional might prove useful
s: exec side from select side from tab;
b: exec bid from select bid from tab;
a: exec ask from select ask from tab;
p: exec price from select price from tab;
exQuality: ?[s=`B;?[p<a;1b;0b];?[p>b;1b;0b]];
new: update exQuality from tab
}
a week ago
Hi @bl,
The name of the tables should be irrelevant to the outcome of the test file.
Can you please send over your notebook so we can have a better look?
You can do this by downloading your project.md file. File --> Download
Can you send this to me via email (mmcparland@kx.com) or by dm here on the community.
Thanks,
Megan 🙂
Wednesday
Hi @bl,
Sorry for the delay in response, it's because you didn't define your function as 'classifyTrades'.
I defined the function and the tests passed as seen attached.
Thanks,
Megan 🙂
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.