Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting a backtester import error #18

Closed
mwiser opened this issue Mar 14, 2018 · 8 comments
Closed

getting a backtester import error #18

mwiser opened this issue Mar 14, 2018 · 8 comments

Comments

@mwiser
Copy link

mwiser commented Mar 14, 2018

see screenshot
screen shot 2018-03-13 at 9 19 05 pm

@mwiser
Copy link
Author

mwiser commented Mar 14, 2018

Worked around it - FYI

@mwiser mwiser closed this as completed Mar 14, 2018
@TeamAuquan
Copy link
Contributor

Saw that this is fixed. But mentioning it anyways: you need the auquan toolbox (pip install -U auquan_toolbox) in the same path where you are running your notebook from.

@yan365
Copy link

yan365 commented Apr 30, 2019

from backtester.dataSource.yahoo_data_source import YahooStockDataSource
from datetime import datetime

startDateStr = '2007/12/01'
endDateStr = '2017/12/01'
cachedFolderName = 'yahooData/'
dataSetId = 'testPairsTrading'
instrumentIds = ['SPY','AAPL','ADBE','SYMC','EBAY','MSFT','QCOM',
'HPQ','JNPR','AMD','IBM']
ds = YahooStockDataSource(cachedFolderName=cachedFolderName,
dataSetId=dataSetId,
instrumentIds=instrumentIds,
startDateStr=startDateStr,
endDateStr=endDateStr,
event='history')
data = ds.getBookDataByFeature()['Adj Close']

ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from backtester.dataSource.yahoo_data_source import YahooStockDataSource
2 from datetime import datetime
3
4 startDateStr = '2007/12/01'
5 endDateStr = '2017/12/01'

ModuleNotFoundError: No module named 'backtester'

@yan365
Copy link

yan365 commented Apr 30, 2019

ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from backtester.dataSource.yahoo_data_source import YahooStockDataSource
2 from datetime import datetime
3
4 startDateStr = '2007/12/01'
5 endDateStr = '2017/12/01'

ModuleNotFoundError: No module named 'backtester'

@caseyyangsissi
Copy link

Worked around it - FYI

Screenshot 2019-06-17 at 14 36 04

import error happened again, will appreciate that if you could help

@chandinijain
Copy link
Member

you need the auquan toolbox (pip install -U auquan_toolbox) in the same path where you are running your notebook from.

@caseyyangsissi
Copy link

caseyyangsissi commented Jun 17, 2019 via email

@chandinijain
Copy link
Member

@caseyyangsissi it seems that the toolbox might be installed in a different path compared to where you are running the notebook from. This sometimes happens if you have multiple versions of python installed. The path that the notebook is importing packages from is different from the path where the commandline is installing packages.

Please see a fix here: https://www.lucypark.kr/blog/2013/02/10/when-python-imports-and-ipython-does-not/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants