-
-
Save lvnilesh/3390934 to your computer and use it in GitHub Desktop.
Trouble getting QSTK example to run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I tried this on a freshly installed Ubuntu Precise 64 bit Desktop inside virtualbox | |
sudo apt-get -y install subversion | |
sudo apt-get -y install python-numpy | |
sudo apt-get -y install python-scipy | |
sudo apt-get -y install python-matplotlib | |
sudo apt-get -y install python-dev | |
sudo apt-get -y install python-setuptools | |
sudo easy_install -U scikits.statsmodels | |
sudo easy_install --upgrade pytz | |
sudo apt-get -y install python-dateutil | |
sudo easy_install pandas | |
sudo apt-get -y install python-qt4 | |
sudo apt-get -y build-dep python-cvxopt | |
sudo apt-get -y install python-cvxopt | |
cd ~ | |
mkdir QSTK | |
cd QSTK | |
svn checkout http://svn.quantsoftware.org/openquantsoftware/trunk . | |
wget http://www.quantsoftware.org/QSData.zip | |
unzip QSData.zip | |
cp config.sh local.sh | |
vi local.sh # edit the $QSDATA env var to point to $QS/QSData/ | |
source local.sh | |
echo $QS # shows /home/nilesh/QSTK | |
echo $QSDATA # shows /home/nilesh/QSTK/QSData | |
cd $QS/Examples/DataAccess/ | |
python setupexample.py | |
All symbols: ['AA+', 'AAU', 'ABL', 'ACU', 'ACY', 'ADGE', 'ADK', 'AE', 'AEN', 'AGX', 'AIM', 'AIP', 'AIS', 'ALN', 'ALR.B', 'AMS', 'ANO', 'ANV', 'ANX', 'API', 'APP', 'APT', 'APTS', 'AQQ', 'ASM', 'ATC', 'ATSC', 'AUMN', 'AVL', 'AWX', 'AXK', 'AXN', 'AXU', 'AZC', 'AZK', 'BAA', 'BCV', 'BDL', 'BDR', 'BFY', 'BHB', 'BHO', 'BHV', 'BIR+A', 'BKJ', 'BKR', 'BLD', 'BLE', 'BLJ', 'BMJ', 'BNX', 'BONE', 'BPS', 'BQI', 'BQY', 'BRD', 'BRN', 'BTC', 'BTI', 'BTN', 'BTX', 'BVX', 'BWL.A', 'BZC', 'BZM', 'CAK', 'CAW', 'CBP', 'CCA', 'CCF', 'CDY', 'CEF', 'CEP', 'CET', 'CEV', | |
....snipped.... | |
, 'TPLM', 'TRT', 'TRX', 'TSH', 'TTTM', 'UEC', 'ULU', 'UMH', 'UPG', 'UQM', 'URG', 'URZ', 'UTG', 'UUU', 'UVE', 'UWN', 'VCF', 'VFL', 'VGZ', 'VHC', 'VII', 'VKI', 'VKL', 'VMM', 'VMV', 'VOG', 'VRNG', 'VSR', 'VTG', 'WAC', 'WEX', 'WGA', 'WIS+', 'WMCO', 'WRN', 'WSO.B', 'WSR', 'WTT', 'WYY', 'WZE', 'XFN', 'XG', 'XPL', 'XPO', 'XRA', 'YMI', 'ZBB'] | |
Traceback (most recent call last): | |
File "setexample.py", line 76, in <module> | |
main() | |
File "setexample.py", line 65, in main | |
data_matrix = da.get_data(ts_list, symbol_list, DA.DataItem.OPEN) | |
File "/home/nilesh/QSTK/qstkutil/DataAccess.py", line 455, in get_data | |
symbol_list, data_item, verbose, bIncDelist) | |
File "/home/nilesh/QSTK/qstkutil/DataAccess.py", line 362, in get_data_hardread | |
ldmReturn.append( pa.DataFrame( naDataLabel, ts_list, symbol_list) ) | |
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/core/frame.py", line 392, in __init__ | |
copy=copy) | |
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/core/frame.py", line 497, in _init_ndarray | |
index = _ensure_index(index) | |
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/core/index.py", line 2389, in _ensure_index | |
return Index(index_like) | |
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/core/index.py", line 111, in __new__ | |
return DatetimeIndex(subarr, copy=copy, name=name) | |
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/tseries/index.py", line 216, in __new__ | |
subarr = tools.to_datetime(data) | |
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/tseries/tools.py", line 99, in to_datetime | |
dayfirst=dayfirst) | |
File "datetime.pyx", line 674, in pandas.lib.array_to_datetime (pandas/src/tseries.c:33989) | |
File "datetime.pyx", line 573, in pandas.lib._check_dts_bounds (pandas/src/tseries.c:32848) | |
ValueError: Out of bounds nanosecond timestamp: 1610-11-21 16:00:00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment