auquan / auquan-toolbox-python Goto Github PK
View Code? Open in Web Editor NEWBacktesting toolbox for trading strategies - DEPRECATED
License: MIT License
Backtesting toolbox for trading strategies - DEPRECATED
License: MIT License
after I already Install the pip install auquan-toolbox and it's successfully done
but I still can't import any lib of the toolbox
please check
ModuleNotFoundError: No module named 'auquantoolbox'
File "", line 1
import auquan-toolbox
^
SyntaxError: invalid syntax
On doing a simple pip install -U aquanToolbox on my Ubuntu 16.04 I get the following error. I have all requirements up to date.
Collecting aquanToolbox
Using cached aquanToolbox-1.1.0.tar.gz
Requirement already up-to-date: pandas in /usr/local/lib/python2.7/dist-packages (from aquanToolbox)
Requirement already up-to-date: numpy in /home/pranshu/.local/lib/python2.7/site-packages (from aquanToolbox)
Requirement already up-to-date: matplotlib in /usr/local/lib/python2.7/dist-packages (from aquanToolbox)
Requirement already up-to-date: pytz>=2011k in /usr/local/lib/python2.7/dist-packages (from pandas->aquanToolbox)
Requirement already up-to-date: python-dateutil in /usr/local/lib/python2.7/dist-packages (from pandas->aquanToolbox)
Requirement already up-to-date: cycler>=0.10 in /usr/local/lib/python2.7/dist-packages (from matplotlib->aquanToolbox)
Requirement already up-to-date: functools32 in /usr/local/lib/python2.7/dist-packages (from matplotlib->aquanToolbox)
Requirement already up-to-date: six>=1.10 in /usr/lib/python2.7/dist-packages (from matplotlib->aquanToolbox)
Requirement already up-to-date: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/local/lib/python2.7/dist-packages (from matplotlib->aquanToolbox)
Requirement already up-to-date: subprocess32 in /usr/local/lib/python2.7/dist-packages (from matplotlib->aquanToolbox)
Building wheels for collected packages: aquanToolbox
Running setup.py bdist_wheel for aquanToolbox ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-yMxIQu/aquanToolbox/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpvyOWFppip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/version.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/dataloader.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/toolbox.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/init.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/resultviewer.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/metrics.py -> build/lib.linux-x86_64-2.7/pythonToolbox
running egg_info
writing requirements to aquanToolbox.egg-info/requires.txt
writing aquanToolbox.egg-info/PKG-INFO
writing top-level names to aquanToolbox.egg-info/top_level.txt
writing dependency_links to aquanToolbox.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'aquanToolbox.egg-info/SOURCES.txt'
writing manifest file 'aquanToolbox.egg-info/SOURCES.txt'
running build_scripts
creating build/scripts-2.7
error: file '/tmp/pip-build-yMxIQu/aquanToolbox/TradingStrategyTemplate' does not exist
Failed building wheel for aquanToolbox
Running setup.py clean for aquanToolbox
Failed to build aquanToolbox
Installing collected packages: aquanToolbox
Running setup.py install for aquanToolbox ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-yMxIQu/aquanToolbox/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-cwW7Y9-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/version.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/dataloader.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/toolbox.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/__init__.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/resultviewer.py -> build/lib.linux-x86_64-2.7/pythonToolbox
copying pythonToolbox/metrics.py -> build/lib.linux-x86_64-2.7/pythonToolbox
running egg_info
writing requirements to aquanToolbox.egg-info/requires.txt
writing aquanToolbox.egg-info/PKG-INFO
writing top-level names to aquanToolbox.egg-info/top_level.txt
writing dependency_links to aquanToolbox.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'aquanToolbox.egg-info/SOURCES.txt'
writing manifest file 'aquanToolbox.egg-info/SOURCES.txt'
running build_scripts
creating build/scripts-2.7
error: file '/tmp/pip-build-yMxIQu/aquanToolbox/TradingStrategyTemplate' does not exist
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-yMxIQu/aquanToolbox/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-cwW7Y9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yMxIQu/aquanToolbox/
Aquan toolbox is good for linear instruments(stocks/indices). But this is not sufficient to backtest options/futures strategies. Are there any plans to provide support for derivatives?
Processing data for stock: BANKBEES
if not self.downloadAndAdjustData(instrumentId, fileName):
File "/Users/chiju/auquantoolbox/backtester/dataSource/nse_data_source.py", line 236, in downloadAndAdjustData
if not self.downloadFile(instrumentId, fileName):
File "/Users/chiju/auquantoolbox/backtester/dataSource/nse_data_source.py", line 230, in downloadFile
self.parseNSEUrl(instrumentId, datetime.strftime(tempStart, '%d-%m-%Y'), datetime.strftime(tempEnd, '%d-%m-%Y'), fileName)
File "/Users/chiju/auquantoolbox/backtester/dataSource/nse_data_source.py", line 223, in parseNSEUrl
self.parseHtmlToCSV(soup, outputCsvFile)
File "/Users/chiju/auquantoolbox/backtester/dataSource/nse_data_source.py", line 209, in parseHtmlToCSV
f = open(outputCsvFile, 'wb')
FileNotFoundError: [Errno 2] No such file or directory: 'nseDataAuquanTrainingTest/BANKBEES_2010-01-01to2010-01-01.csv'
Is it competed or historical data is not avaialable for NSE, please reply
is it supposed to behave this way?(may becoz of incomplete template)
BTW this is about the new version (on bitbucket), couldn't find thwe issue tracker there...
File "C:\Users\danil\auquan-toolbox-python\auquanToolbox\resultviewer.py", line 6, in
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
ImportError: cannot import name 'NavigationToolbar2TkAgg' from 'matplotlib.backends.backend_tkagg' (C:\Users\danil\Anaconda\envs\py27\lib\site-packages\matplotlib\backends\backend_tkagg.py)
from auquanToolbox import dataloader as dl
from __future__ import division
start = "2014-01-01"
end = "2016-12-31"
data = dl.load_data_nologs('nasdaq',['AAPL'],start,end)
prices = data['ADJ CLOSE']['AAPL']
tried in python2.7 on Ubuntu 18.04
The line of code referenced here seems to be the problem as lookback=2 *1.1 +10 gives a floating point number while BDay expects an int. Typecasting it to int should solve the problem.
Got error "File "my_trading_params copy.py", line 40, in getDataParser
event='history')
TypeError: init() got an unexpected keyword argument 'event'"
when I changed yahoo to nse, so I think historical data is not available free for NSE, please confirm
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.