Shena Mao
Shena Mao

性别: 注册于 2021-07-23

向TA求助
20金币数
640 经验值
1个粉丝
主页被访问 2574 次

46 个回答

0 赞同

报错:mstd(X, window, [minPeriods]). window must be at least...

原本的params里的数据类型是double类型,改成int类型就可以了 函数mstd里的参数是INT类型。 修改如下即可: def f1(tt, params){a = select Date, mstd(x,int(params[0])) as mstd1, mstd(x,int(params[1])) as mstd2, mstd(x,int(params[2])) as mstd3 from tt ; return a}

回答于 2021-12-14 16:58

0 赞同

每个股票第一行更新数据怎么操作?

使用 iif 连用 rowNo 可以达成需求。具体可以看以下的例子: pp = table(`a`a`a`b`b`c`c`c`c as id, 1..9 as price)update pp set price = iif(rowNo(price)==0,0,price) context by id

回答于 2021-12-13 15:28

0 赞同

对于每个时间步,想存储numpy矩阵(或者python list of list也行)...

您这边主要的需求和实际用途是什么呢?可以的话展开说一下,我们可以更好的去优化产品功能。:) 目前DolphinDB的table中可以存储arrayVector,具体可以参考:https://www.dolphindb.cn/cn/help/200/DataTypesandStructures/DataForms/Vector/arrayVector.html python api目前还没有支持这个功能,会在之后版本支持。

回答于 2021-12-05 19:14

0 赞同

在DolphinDB中如何在窗口内对一个字段排序取前几然后再对另一个...

感谢提问,这个目前没有特别高效的算法,但是可以用moving + 自定义函数来实现。未来DolphinDB会针对这种场景做一些优化。 1.30.15及以上版本可以用一行代码实现: //t是模拟的四列数据t = table(take(`IBM, 100) as code, 2020.01.01 + 1..100 as date, rand(100,100) + 20 as volume, rand(10,100) + 100.0 as close)//...

回答于 2021-12-02 15:54

0 赞同

如何空值插值查询?

//默认type = "prev" //type 有三个选项,"prev","next","linear" //默认search_range=1d //search_range 可以是 2d(几天), 7w(几周), 5M(几个月),1y(几年)等,不加引号 //用法:geInterpolatedDataPoint(dbName, tblName, 2019.01.02T02:00:01.042, ids, "linear",2d),geInterpolatedDataPoint(dbName, tblName, times...

回答于 2021-11-24 17:09

0 赞同

写入分布式表详细的过程是怎么样的?

详细写入分布式表的过程如下: 1.       API(DolphinDB GUI,Java API等)发送写入命令到当前数据节点的worker 2.       worker接收到指令之后,worker定位分布式表的各种信息(包括分区信息),并将要写入的数据根据分区方法进行分组 3.       分组之后会向控制节点master申请锁住这些分区 4.       如果都申请到了锁...

回答于 2021-11-15 15:17

0 赞同

delete all data from Reactive State Engine

For now, users could not delete state data directly from state engine. However, users can set "keyPurgeFilter" and "keyPurgeFreqInSecond" together in reactive state engine to trigger automatic cleanup.

回答于 2021-10-11 11:14

1 赞同

need code for ATR (Average True Range) to use with Reactive...

Sorry for late response. I want to confirm whether your ATR is always based on daily market price? Because if it's not based on a high-frequency market data, I don't think you need to use reactive State Engine to realize ATR. According to the formula you refered, it was difficult to deal with stre...

回答于 2021-09-18 13:56

0 赞同

Efficient code for current volume from cumulative volume

That case is used for snapshot market data. "limit -1 " is used to filter duplicate values. (1) since it is a pretreatment for data, this step is neccessary and efficient for this instance. (2)update t set prevVolume = dictVolume[Symbol] here we add a new column which equals to previous cumulative...

回答于 2021-09-14 15:58

2 赞同

Reactive State engine with TA module problem

Hi Vishvesh, glad to see you are using our ReactiveStateEngine. the function "bBands" should return 3 columns, however, here it is a tuple which contains 3 vectors. Actually, we want each vector to be a column in the result table,right? Simply rewrite like this: engine1 = createReactiveStateEngine...

回答于 2021-09-10 10:43