Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Guodong Xu
    @docularxu

    Does anybody notice this error in the 'main' branch, when running "examples/workflow_by_code.ipynb" using jupyter-notebook. The error message is: "---------------------------------------------------------------------------
    TypeError Traceback (most recent call last)

    <ipython-input-7-e6a7b5f4da00> in <module>
    26 # backtest and analysis
    27 with R.start(experiment_name="backtest_analysis"):
    ---> 28 recorder = R.get_recorder(rid, experiment_name="train_model")
    29 model = recorder.load_object("trained_model")
    30

    TypeError: get_recorder() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given"

    4 replies
    I didn't see such error on 29/May/2021. it happens only recently.
    w.z.
    @w.z.:matrix.org
    [m]
    does Qlib support quantitative analysis on cryptocurrencies ?
    you-n-g
    @you-n-g

    does Qlib support quantitative analysis on cryptocurrencies ?

    @w.z.:matrix.org You may be interested in this issue microsoft/qlib#387
    I guess you are interested in high-frequency trading.

    This PR in development may be helpful to you in the future
    microsoft/qlib#438

    panshuaiyin
    @panshuaiyin
    csv文件内的数据形如下图
    image.png
    dump时使用的代码如下
    python scripts/dump_bin.py dump_all --csv_path 我储存csv格式的数据的路径 --qlib_dir 我储存qlib格式的数据的路径 --symbol_field_name stock_code --date_field_name date --include_fields open,high,low,close,volume,money,factor,vwap,change
    Pengrong Zhu
    @zhupr
    @panshuaiyin
    Add the freq parameter: --freq month
    python scripts/dump_bin.py dump_all --csv_path 我储存csv格式的数据的路径 --qlib_dir 我储存qlib格式的数据的路径 --symbol_field_name stock_code --date_field_name date --include_fields open,high,low,close,volume,money,factor,vwap,change --freq month
    panshuaiyin
    @panshuaiyin
    截止到模型训练部分的代码都没问题了,但在回测时产生报错,代码和报错如下图
    image.png
    image.png
    image.png
    image.png
    请问我是不是应该在哪个地方增加一个参数“freq=‘month’”
    Pengrong Zhu
    @zhupr

    @panshuaiyin
    回测部分某些函数还不支持freq参数,之后会修复这个问题;
    这个问题可以通过下面的方法修复:

    • 在qlib数据calendars目录中,把month.txt 复制一份 重命名为 day.txt

    你可以先用上面的方法临时跑回测,等这个问题修复后再用正常方法。

    你有兴趣提PR修复这个问题吗

    panshuaiyin
    @panshuaiyin
    请问一下在哪提交PR
    Pengrong Zhu
    @zhupr
    fork qlib的代码到自己的github:https://github.com/microsoft/qlib
    然后基于这个代码进行修改,把改好的代码push到自己的github,然后从自己的仓库向https://github.com/microsoft/qlib提 PR
    panshuaiyin
    @panshuaiyin
    如果是让我修改代码的话,对我来说有点困难,我的工程能力还不太行,抱歉了
    panshuaiyin
    @panshuaiyin
    我把month.txt复制一份重命名为day.txt后,重新运行回测代码,但又出现下面这个报错了
    image.png
    看起来似乎是找不到benchmark,但我之前在日频数据上回测时没有这个问题
    而且把benchmark从hkhsi改成个股代码,比如hk0001,还是会出现报错
    Pengrong Zhu
    @zhupr
    那需要这样做了:
    重新dump一份数据, --freq day, 数据目录和原来的相同
    python scripts/dump_bin.py dump_all --csv_path 我储存csv格式的数据的路径 --qlib_dir 我储存qlib格式的数据的路径 --symbol_field_name stock_code --date_field_name date --include_fields open,high,low,close,volume,money,factor,vwap,change --freq day
    gxxuej
    @gxxuej
    Do you have a strategy code defined and written by yourself? Can you share? thank you!
    panshuaiyin
    @panshuaiyin
    虽然有这个打算,但目前还没有实现,暂时还只是想尝试一下qlib里的策略如果用在低频数据上表现如何
    Chica
    @ufosky
    image.png
    谁知道这里 start_time 和 fit_start_time什么区别,应该怎么设置吗
    Pengrong Zhu
    @zhupr

    @ufosky

    • start_time: the date when the whole process data acquisition started
    • fit_start_time: start date of the data used by the model

      start_time <= fit_start_time

    Pengrong Zhu
    @zhupr

    @ufosky
    If there are network problems, you can add the max_collector_count parameter for multiple failed retries: python collector.py xxxx --max_collector_count 5

    default is 2

    gongkui
    @gongkui
    请问qlib里有现成的测试代码和数据直接用吗
    Chica
    @ufosky
    qlib 分类 feature 要怎么处理
    Jacky
    @yesme
    Hey - anyone knows how to import the fund data into qlib, thus it can be processed among other stock data? Fund data only supports C in "OHLCV". Thanks!
    and - 申银万国 produces industry index since 2000 - those are not stock tickers but could be very informative to the data mining.
    Those industry indices support OHLC.
    rowkingrow
    @rowkingrow
    ops中的Rank(feature,N)只能rank某个feature的历史N天数据,有没有一个运算符可以rank某天所有股票的数据
    Pengrong Zhu
    @zhupr
    @gongkui Hi,
    Pengrong Zhu
    @zhupr

    @yesme Hi,
    The "fund data" or "industry indices" is in this format:

    datetime, fund_code/index_code, C, field1, field2
    2021-09-01, 161725, 1.2095, 111, 222

    The data can be dumped to a format supported by qlib via scripts/dump_bin.py: https://qlib.readthedocs.io/en/latest/component/data.html#converting-csv-format-into-qlib-format, which can be used in qlib.

    you-n-g
    @you-n-g

    qlib 分类 feature 要怎么处理

    Hi, Could you give more details about your requirements?

    ops中的Rank(feature,N)只能rank某个feature的历史N天数据,有没有一个运算符可以rank某天所有股票的数据

    It is not supported in the current version.

    Chica
    @ufosky

    qlib 分类 feature 要怎么处理

    Hi, Could you give more details about your requirements?

    @you-n-g 比如 怎么把股票所属的行业作为一个 feature,我看现在只能处理数值类型的 feature

    1 reply
    tangzhenjie25
    @tangzhenjie25
    ValueError: need at most 63 handles, got a sequence of length 64
    多核心cpu报这错,要怎么解决
    1 reply
    bbbzhai
    @bbbzhai
    Hi, is here a better place to ask questions or issue page in qlib repo?
    1 reply
    bbbzhai
    @bbbzhai
    I would like to implement some technical indicators. Instead of rewriting the whole formula using expression, I would like to use libraries such as ta-lib. Is there a module in qlib where I can do data-cleaning manually after querying the basic OHLC dataframe?
    2 replies
    Currently I have a separate process to handle my data and convert all the needed features to qlib bin file. And I would simply get all the needed feature directly. But sometimes I wish to do some data handling on the fly. Is it supported now?
    1 reply
    Noah Wöhler
    @NoahWoehler_twitter
    Hi, can I post a call for participants in an interview study on open source projects here? If any mod wants more details via DM first, then I'm happy to oblige :)
    Arthur Cui
    @b4thesunrise
    Hi, I am trying to add new datase of crypto, and I am trying to find some example of new dataset, is code in qlib/scripts/data_collector/fund/ enough to add a new dataset?
    2 replies
    Jeff
    @JeffQuantFin
    Hi. 有两个问题想请教:
    1,将dataframe格式直接存入bin.的接口是?
    2,qlib和Macbook(M1 Max芯片ARM架构系统)兼容性如何?我的新电脑快到了,有点担心