auquan / quant-quest-2 Goto Github PK
View Code? Open in Web Editor NEWQuant Quest 2
Quant Quest 2
I'm a participant for Quant Quest, and had installed the auquan_toolbox
in a python3 environment, as well as the trainingTest_params.py file. By python trainingTest_params.py
, the call trace is as follows:-
Traceback (most recent call last):
File "trainingTest_params.py", line 320, in <module>
tradingSystem = TradingSystem(tsParams)
File "/home/parth/Codes/auquan/venv/lib/python3.5/site-packages/backtester/trading_system.py", line 35, in __init__
self.dataParser = self.tsParams.getDataParser()
File "trainingTest_params.py", line 202, in getDataParser
event='history')
File "/home/parth/Codes/auquan/venv/lib/python3.5/site-packages/backtester/dataSource/yahoo_data_source.py", line 125, in __init__
self.__groupedInstrumentUpdates = self.getGroupedInstrumentUpdates()
File "/home/parth/Codes/auquan/venv/lib/python3.5/site-packages/backtester/dataSource/yahoo_data_source.py", line 145, in getGroupedInstrumentUpdates
if not downloadFileFromYahoo(self.startDate, self.endDate, instrumentId, fileName):
File "/home/parth/Codes/auquan/venv/lib/python3.5/site-packages/backtester/dataSource/data_source_utils.py", line 37, in downloadFileFromYahoo
f.write(data.content)
TypeError: write() argument must be str, not bytes
This should have been mentioned here.
Thanks ๐
KeyError Traceback (most recent call last)
in ()
1 tf = MyTradingFunctions()
2 tsParams = MyTradingParams(tf)
----> 3 tradingSystem = TradingSystem(tsParams)
4 results = tradingSystem.startTrading()
8 frames
/usr/local/lib/python3.7/dist-packages/requests/cookies.py in _find_no_duplicates(self, name, domain, path)
397 if toReturn:
398 return toReturn
--> 399 raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
400
401 def getstate(self):
KeyError: "name='B', domain=None, path=None"
on running python my_trading_params.py
getting this error:
File "my_trading_params.py", line 1, in
from backtester.trading_system_parameters import TradingSystemParameters
File "/Users/ishikasingh/Library/Python/2.7/lib/python/site-packages/backtester/init.py", line 1, in
from backtester.dataSource import *
File "/Users/ishikasingh/Library/Python/2.7/lib/python/site-packages/backtester/dataSource/google_data_source.py", line 9, in
import pandas as pd
File "/Users/ishikasingh/Library/Python/2.7/lib/python/site-packages/pandas/init.py", line 23, in
from pandas.compat.numpy import *
File "/Users/ishikasingh/Library/Python/2.7/lib/python/site-packages/pandas/compat/numpy/init.py", line 24, in
'this pandas version'.format(_np_version))
ImportError: this version of pandas is incompatible with numpy < 1.9.0
your numpy version is 1.8.0rc1.
Please upgrade numpy to >= 1.9.0 to use this pandas version
The on running pip install --upgrade numpy
getting this:
Collecting numpy
Using cached numpy-1.13.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: numpy
Found existing installation: numpy 1.8.0rc1
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling numpy-1.8.0rc1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/init.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/4f/yf6tpj4956718hzz4jfcv8zw0000gn/T/pip-c9LB0L-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'
Kindly guide me with this.
Hi, please review this error:
Traceback (most recent call last):
File "problem1.py", line 142, in <module>
tradingSystem.startTrading(onlyAnalyze=False, shouldPlot=False)
File "C:\Temp\Anaconda\lib\site-packages\backtester\trading_system.py", line 131, in startTrading
self.initialize()
File "C:\Temp\Anaconda\lib\site-packages\backtester\trading_system.py", line 123, in initialize
self.dataParser = self.tsParams.getDataParser()
File "C:\Temp\Anaconda\lib\site-packages\backtester\sample_scripts\fair_value_params.py", line 29, in getDataParser
instrumentIds=instrumentIds)
File "C:\Temp\Anaconda\lib\site-packages\backtester\dataSource\quant_quest_data_source.py", line 27, in __init__
self.ensureAllInstrumentsFile(dataSetId)
File "C:\Temp\Anaconda\lib\site-packages\backtester\dataSource\quant_quest_data_source.py", line 50, in ensureAllInstrumentsFile
response = urlopen(url)
File "C:\Temp\Anaconda\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Temp\Anaconda\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "C:\Temp\Anaconda\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Temp\Anaconda\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "C:\Temp\Anaconda\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Temp\Anaconda\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.