【发布时间】:2019-04-12 03:59:44
【问题描述】:
我对excel一无所知,我想知道是否有一种方法可以将q-coding中的asof join语句转换为使用excel公式的方法
:update string issueSeries from aj[`sym`issueSeries`stockExchange`time;update `$issueSeries from table;update `g#sym from `time xasc select time+maxinterval,sym,`$issueSeries,stockExchange,refprice,refpricetime,prevpricetime,prevprice from reftable];
Table 1
Time Exc sym price
2:40:29 PM 25001 AMX 14.47
2:40:48 PM 25001 AMX 14.48
2:40:53 PM 25001 AMX 14.45
2:41:21 PM 25001 AMX 14.44
2:41:29 PM 25001 AMX 14.49
Table 2
Exc Sym Refprice ref-time
25001 AMX 14.47 2:39:54 PM
25001 AMX 14.46 2:40:36 PM
25001 AMX 14.46 2:41:19 PM
25001 AMX 14.46 2:41:20 PM
25001 AMX 14.46 2:41:31 PM
Table 3 (result)
Time ref-time sym exc price refprice
2:40:29 PM 2:39:54 PM AMX 25001 14.47 14.47
2:40:48 PM 2:40:36 PM AMX 25001 14.48 14.46
2:40:53 PM 2:40:36 PM AMX 25001 14.45 14.46
2:41:21 PM 2:41:20 PM AMX 25001 14.44 14.46
2:41:29 PM 2:41:20 PM AMX 25001 14.49 14.46
Simplified example where exchange and sym are held constant.
table3 的 ref-time 列与 table2 的 ref-time 列不同,因为 asof join 是代码中的 (aj)。
【问题讨论】:
-
请提供您在 Excel 文件中列出的示例数据和预期结果。
-
@tigeravatar 我刚刚添加了一个示例