掘金社区

掘金3 Matlab 数据下载问题Pinned highlighted

136223***081 发表在策略研究 2019-07-08 15:50:32

策略研究
365
6
0

最近由于掘金2停了所以开始转用掘金3下载数据, 根据matlab的SDK文档,在终端内新建了个空策略,然后再建立个数据下载m文件

function datadownload
connection_id = set_token('dd00382f-a151-11e9-a3ef-00fffdf17904');
data_bar_inc1 = history({'SHFE.au1906'}, 5, '2019-05-30 21:00:00', '2019-05-31 03:00:00');
end

然后运行Matlab调用此文件,跳转到history文件报错:

No method 'HistoryBars' with matching signature found for class 'GMSDK.GMApi'.

Error in history (line 49)
data_c = GMSDK.GMApi.HistoryBars(symbols_u, frequency,start_time, end_time,adjust, adjust_end_time ,
skip_suspended);%,fields,adjust, adjust_end_time, skip_suspended,fill_missing);

请问如何解决?由于是掘金2的老用户,掘金3相对于2变化很大,希望管理员帮忙解答,谢谢

评论: 6
  • 填写的参数不对, 看下文档的例子

    2019-07-08 16:30:19
  • @技术支持1

    您好,谢谢回复,我用文档上的例子测试了,没有报错,但是取的数据为空值。请问是否哪儿设置不对?

    [data] = history({'SZSE.000001','SHSE.600000'},'60s','2018-08-01','2018-09-01','ADJUST_NONE')

    data =

     []
    2019-07-08 17:46:25
  • 是否matlab和掘金3通信不成功?

    set_token('xxxxx')

    ans =

     0
    

    [data] = history({'SZSE.000001','SHSE.600000'},'60s','2018-08-01','2018-09-01','ADJUST_NONE')

    data =

     []
    
    2019-07-08 17:58:11
  • 已解决 token id设错了,多谢管理员

    2019-07-08 19:44:56
  • set_token('129532b9d6223f10636e36d38dac9ab3acfb97')
    get_fundamentals('trading_derivative_indicator',{ 'SHSE.600000','SZSE.000001'}, '2018-04-01', '2018-08-01', {'TCLOSE','NEGOTIABLEMV','TOTMKTCAP','TURNRATE'})
    [data] = history({'SZSE.000001','SHSE.600000'},'60s','2018-08-01','2018-09-01','ADJUST_NONE')
    [data] = history({'SHFE.au1906'}, '5s', '2019-05-30 21:00:00', '2019-05-31 03:00:00');

    2019-07-08 19:52:36
  • @136223-081 没有5s的频率,有tick频率
    0_1562667245535_0ae2d4cf-ce9e-476a-bd91-e3657297fa87-image.png

    2019-07-09 18:14:14

Looks like your connection to 掘金量化社区 - 量化交易者的策略交流学习社区 was lost, please wait while we try to reconnect.