qlib icon indicating copy to clipboard operation
qlib copied to clipboard

how to convert 3-seconds market data to qlib bin?

Open DanielKui opened this issue 2 years ago • 1 comments

I have my own 3-seconds market data in local mysql and want to conver these 3-sec data to qlib bin, How do I convert?

I used to convert csv (3 seconds data) to qlib bin by using dump_bin.py, the result of bin files like this:

image

with postfix day.bin, actually my csv files like this, interval 3 seconds per row. image

Can QLib recognize this format?

I used the below command to do conversion python scripts\dump_bin.py dump_all --freq 3sec --csv_path F:\CB\csv --qlib_dir F:\CB\ckdata_qlib --symbol_field_name stock_code --date_field_name date --include_fields open,high,low,close,volume,money,factor,vwap,change

I know dump_bin.py can specify --freq 1min or 1d as input. How should I handle 3-seconds interval data format?

If I use XXX.3sec.bin as local dataset, then run workflow_by_code.py, it reported "ValueError: freq format is not supported, the freq should be like (n)month/mon, (n)week/w, (n)day/d, (n)minute/min"

I really want to analyse 3-seconds interval marketdata. who can help me ?

DanielKui avatar Dec 20 '23 03:12 DanielKui

same question

kk19990709 avatar Jan 09 '24 05:01 kk19990709