DolphinDB is a high performance time series database. It is written in C++ and optimized for fast injection, storage, retrieval and analysis of time series data in fields such as quantitative finance, Internet of Things, real-time analytics, etc. DolphinDB runs extremely fast. It is also easy to use as the syntax of the programming language of DolphinDB is similar to SQL and Python.
Questions tagged [dolphindb]
764 questions
7
votes
1 answer
Improve the implementation of worldquant 101 alpha factors using numpy
I was trying to implement 101 quant trading factors that were published by WorldQuant (https://arxiv.org/pdf/1601.00991.pdf).
A typical factor is about processing stocks' price and volume information along with both time dimension and stock…

DanielSmith
- 101
- 4
7
votes
1 answer
How to implement `pivot` in clickhouse just like in dolphindb
I want to do some pivot ops to some data. Just like following.
>>> df = pd.DataFrame({'foo': ['one', 'one', 'one', 'two', 'two',
... 'two'],
... 'bar': ['A', 'B', 'C', 'A', 'B', 'C'],
... …

yjhmelody
- 119
- 1
- 2
- 4
4
votes
1 answer
C++ API exception: std::length_error
I used VS2019 and the compilation passed, but when I call the conn.connect() function, the following error occurred:
unhandled exception: Microsoft C++ exception: std::length_error, located at memory 0x0000000B5DAFF340.
What’s going on here?

damie
- 412
- 2
- 7
4
votes
2 answers
How to remove the duplicated data in a dfs table?
How to remove the duplicated data in a dfs table?
I create a dfs table with some duplicated data with the following script:
login("admin", "123456")
if(existsDatabase("dfs://compoDB")){
dropDatabase("dfs://compoDB")
}
ID = `a`a`a`a`a`a`a
date =…
user15504166
4
votes
1 answer
HOW to SELECT data basing on both a period of date and a period of time in clickhouse
I want to filter some data by both yyyymmdd(date) and hhmmss(time), but clickhouse don't support time type. So I choose datetime to combine them. But how to do such things:
This is code of dolphindb(which supports second type to represent hhmmss.…

yjhmelody
- 119
- 1
- 2
- 4
3
votes
1 answer
Is the complexity of kdb's moving max function mmax O(n)?
I used function mmax to calculate moving max of a 10-million-length integer vector. I ran it 10 times to calculate the total execution time. The running time for window size 132 (15,025 milliseconds) is 6 times longer than for window size 22 (2,425…

DanielSmith
- 101
- 4
3
votes
1 answer
g++ compiling error message: /usr/bin/ld: cannot find -lssl
I followed the tutorial to connect to DolphinDB server with C++ and encounted this error message when compiling main.cpp:
$ g++ main.cpp -std=c++11 -DLINUX -DLOGGING_LEVEL_2 -O2 -I../include -lDolphinDBAPI -lssl -lpthread -luuid -L../bin -Wl,-rpath…

Irene97
- 50
- 5
2
votes
1 answer
How does the number of initialized partitions affect query speed?
Suppose a database is defined with 1 million value-based partitions, but data is only imported into 10 partitions. In DolphinDB, actual partitions are generated only when data is imported.
So if there are many more partitions defined than the actual…

molddd123
- 297
- 6
2
votes
2 answers
kdb matrix functions improvement
Did anyone come across using kdb’s matrix function? I found it quite slow compared to other tools.
For inverse matrix function inv on a 1000 by 1000 float matrix , It took kdb+ 166,682 milliseconds for 10 executions. For matrix multiplication, it…

Polly
- 603
- 3
- 13
2
votes
1 answer
Is there any efficient way to export data from remote DolphinDB server to local?
My DolphinDB GUI is connecting to a remote server and I want to export the data to my local computer. The function saveText can only save the file to the remote machine where the server is located. I have to transfer the file using scp command. Is…

damie
- 412
- 2
- 7
2
votes
1 answer
auto delete of records in a dolphindb stream table
Does DolphinDB support auto delete of records in a stream table? For example, I wanted to delete some records that exceed the given length or are outdated?
The real-time data are useless after a certain time but their storage takes up lots of…

Polly
- 603
- 3
- 13
2
votes
1 answer
Replace the extreme value with percentile with DolphinDB update statement?
I want to replace the value in the perform column that is less than the 5th percentile with 5th percentile. Can I use the following to achieve?
update ljdata set perform=percentile(perform, 5) where perform
I have sample…

FFF
- 147
- 1
- 8
2
votes
1 answer
The datanode stops abnormally during runtime. Is there a daemon to restart the datanode?
In a production environment, the datanode stops due to some reason. Is there a daemon which can restart the datanode and insure the business continuity?
user15518852
2
votes
1 answer
How tow create table with many columns(may be more than 300 columns) conveniently in dolphindb?
I want to create a table with a lot of columns in dolphidndb, but I can't find a convenient way?
If I use the t = table(size:capacity,names,types), when I have many many columns, it is not convenient to modify and add or delete some…

pengfei
- 61
- 2
1
vote
1 answer
An easier method to extract the last four elements of a vector in DolphinDB?
I want to extract the last four elements of a vector in DolphinDB. For example:
v=1..9
v[5:9]
Output:
I'd like to find an easier method to achieve this, so I tried the following method:
l=size(v)
v[l-4:l]
But the result is not as expected. Does…

molddd123
- 297
- 6