按弹头使用bin二进制

发布于 2025-01-22 22:55:23 字数 267 浏览 0 评论 0原文

对于每个具有DateTime和Ticker符号列的两个表格,我们如何在每个股票组中实现二进制函数bin的功能。也就是说,对于给定的右桌行之前,与其在每个右桌行的时间之前返回整个左桌的最新索引与右桌行相同的股票符号。

我的第一个想法是在左桌上添加一个每个组索引,在每个股票组上应用bin 的组索引,然后使用unique(tricker,group-index)对在完整的左桌上找到索引。但是,我不确定如何实现此问题,或者这是实现所需功能的最佳方法。

For two tables each with datetime and ticker symbol columns, how can we achieve the functionality of the binary function bin within each ticker group. That is, instead of returning the latest index from the entire left-table prior to the time of each right-table row, for a given right-table row it should return the latest index from the left-table amongst only the rows of the same ticker symbol as the right-table row.

My first thought would be to add a per-group index in the left-table, apply bin on each ticker group for it’s group-index and then use the unique (ticker,group-index) pair to find the index on the full left-table. However, I am not sure how to implement this or if this is the best way to achieve the desired functionality.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你在看孤独的风景 2025-01-29 22:55:23

您能提供一些样本输入和所需的输出吗?

这听起来像您可以使用aj

检查 https://有关详细信息,code.kx.com/q/ref/aj/

Could you give some sample inputs and desired output?

This sounds like something you can solve with aj

Check https://code.kx.com/q/ref/aj/ for details

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文