pythonpyalgotrade

no module named rsi2 in python? cannot import through pip


I'm new to python, and trying to get a simple backtest to work using these examples pyalgotrade examples however when I try to run the line:

import rsi2

in an IPython Notebook I get:

ModuleNotFoundError: No module named 'rsi2'

Since every other import line works I'm not sure what I am missing. I tried:


Solution

  • The pyalgotrade examples you linked to include a block of code with the heading "Save this code as rsi2.py:". This file is the rsi2 that import rsi2 is trying to import. You need to save the given code as rsi2.py and store it in your working directory, next to any other files that contain "import rsi2".