Why do I get an error when I specify date as one of the override options in HISTORY function in Datafeed Toolbox 4.2(R2011b)?
6 ビュー (過去 30 日間)
古いコメントを表示
I am trying to use the blp/history function to define the override option 'BETA_OVERRIDE_START_DT'.
The date string that I have specified, '20120319', works with getdata.
For example,
d = getdata(c,'AC* MM Equity','BETA_ADJ_OVERRIDABLE',{'BETA_OVERRIDE_REL_INDEX','BETA_OVERRIDE_START_DT'},{'MEXBOL Index','20120319'});
However, when I use the same date string with the HISTORY function I get the error:
Cannot convert input into specified date string.
I am using the HISTORY function in the following manner:
d = history(c,'AC* MM Equity','BETA_ADJ_OVERRIDABLE',overrideOption2)
Where overrideOption2 is...
'BETA_OVERRIDE_REL_INDEX' 'MEXBOL Index'
'BETA_OVERRIDE_START_DT' '20120319'
Why do I get this particular error with HISTORY function?
採用された回答
MathWorks Support Team
2013 年 3 月 29 日
The error is thrown in MATLAB because the date format '20120319' is not a recognized format in MATLAB.
You can use the DATENUM function to specify the format of the date via the following code:
datenum('19.03.2012','dd.mm.yyyy')
Replace '20120319' with the above command.
MATLAB will accept the first argument as a date string represented in a format specified by the second argument.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Preprocessing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!