Hi, what is the earliest data point when using interactive brokers with Trading Toolbox of MATLAB
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I wrote the code:
%% Interactive Brokers Historical Data Workflow Example
StartDateSimStr='01/01/1995';
formatIn='dd/mm/yyyy';
StartDateSimNum=datenum(StartDateSimStr,formatIn);
% Connect to Interactive Brokers Trader Workstation
ib = ibtws('',7496);
% Create contract and request historical data:
ibContract = ib.Handle.createContract;
ibContract.symbol = 'SPX' ;
ibContract.secType = 'IND';
ibContract.exchange = 'CBOE';
ibContract.currency = 'USD';
d = ib.history(ibContract,StartDateSimNum,floor(now));
close(ib)
But I got the historical Data only from 04/03/2004 Why ??
0 Kommentare
Antworten (1)
Yair Altman
am 6 Dez. 2017
IB imposes historical data limitations based on various aspects, including the requested bar size and your specific account subscription and parameters.
These limitations are imposed by the IB server, so asking for an earlier date will not work unless you also specify an end-date that is earlier than today. It will also not matter if you try to switch to another connector that uses IB's API (for example, my IB-Matlab connector).
Yair Altman
0 Kommentare
Siehe auch
Kategorien
Mehr zu Financial Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!