陈无忌
陈无忌

性别: 注册于 2023-04-17

向TA求助
26金币数
130 经验值
0个粉丝
主页被访问 261 次

最近动态

2023-12-23 16:05 回答问题

您好,DolphinDB 通过提供 context by 的 SQL 语句的方式,为时序数据高效便捷加工提供了方便的工具。通过 context by tradeDate + rank 函数的方式,我们可以快捷地计算个股在当日涨幅强度的排行榜。 实现代码如下: update t set rps = rank(pct_ret) context by tradeDate 完整代码如下: def genDayKData(startDate, endDate, securityId){    tradeDat

2023-12-23 15:40 回答问题

您好,方案二查询性能下降的问题可以通过设置 sortKeyMappingFunction 解决。 当使用 TSDB 引擎对 sortColumn 设置多列时,除最后一列外的其余列称为 sort key,未优化的 sortColumn 设置会导致 sort key 过多,引发压缩比降低、查询性能不佳等负面效果。例如 sortColumn 为 id, quarter, info_date, fields 时,sort key 数量为 id * quarter * info_date 这三列字段的可枚举值,可能

2023-08-09 10:22 回答问题

// https://ask.dolphindb.net/question/3432 // python 日期字符串与 dolphinDB 日期的转换 // For one date string testDate = "2019-01-01" temporalParse(testDate, "yyyy-MM-dd") // For a list of date strings testDateList = ["2019-01-01", "2019-01-02", "2019-01-03"] tempor

2023-06-01 09:19 回答问题

wantedDbName = 'YOUR WANTED DATABASE NAME' select * from table(getDFSDatabases() as `dbName) where dbName = wantedDbName // 查询以 dfs://WIND 作为开头的所有数据库 select * from table(getDFSDatabases() as `dbName) where dbName like "dfs://WIND%" 提供了两种情况的示例,希望能对您的问题有所帮助

2023-06-01 08:57 回答问题

date = 2023.01.01..2023.01.08; price=2.1 2.2 2.3 2.5 2.6 2.8 2.7 2.5; volume=10 20 10 40 10 40 10 20; a = table(date,price,volume) // 等同于 df.sort_values(by='date', ascending=True) a.sortBy!(`date, sortDirections=1)   // 使用move计算收益率 a['ret'] = a.price /

2023-05-31 17:58 回答问题

实现方式: price=2.1 2.2 2.3 2.5 2.6 2.8 2.7 2.5; volume=10 20 10 40 10 40 10 20; a = table(price,volume) windowLength = 3 select *, mwavg(iif(price>mlast(price, windowLength), price, 0), volume, windowLength, 1) from a     输出结果: 对窗口聚合计算,DolphinDB提供了形如

2023-05-16 10:59 回答问题

可参考:// 先将vol列转换为double类型normalPanelData.replaceColumn!(`vol, double(normalPanelData.vol))