amor71 / LiuAlgoTrader

Framework for algorithmic trading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'liualgotrader.trading.tradier' when running backtester

AleFestante opened this issue · comments

Hi! I think I might have found a bug (probably fell between versions)
liualgotrader.backtester tries to liualgotrader.trading.tradier import TradierTrader but that is currently missing from the package.

To Reproduce
Steps to reproduce the behavior:

  1. install liualgotrader
  2. download sample data

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Thank you for joining LiuAlgoTrader community and submitting your first issue. Feel free to check out Liu community: https://gitter.im/LiuAlgoTrader/community

@AleFestante thank you for bringing it to my attention and my apologies for the slow response. I will handle this and keep you posted. Sorry about that.

@AleFestante I am unable to re-produce the issue. Can you please explain how you installed the platform? Did you use pip or did you clone from GitHub? BTW, to run backtester you need to create a .toml file, but firstly I'd like to reproduce the issue.

@AleFestante I am unable to re-produce the issue. Can you please explain how you installed the platform? Did you use pip or did you clone from GitHub? BTW, to run backtester you need to create a .toml file, but firstly I'd like to reproduce the issue.

Sorry about the slow response.
I used pip, but after the error I downgraded to the previous version and it ran fine.
I will try to upgrade again to the current version and see what happens.

i have the same problem as @AleFestante - perhaps, you forgot to "git add" the tradier files?

@angrycarrots I tried both 3.9 and 3.10 (which is the version I'm using), and I can't reproduce the issue... happy if you can share additional details

@AleFestante I tried both on 3.9 and 3.10 using pip or clone directly and it worked fine. Happy to get details on what may not be working for you.

Hi @amor71 thanks for this platform, I'm really keen to test it out.

I've hit the same issue as the OP. The steps I took were:

(Platform Mac 11.6.5, Python 3.9, pip3 22.1.1, using venv: no)

  • pip3 install liualgotrader
  • liu quickstart
  • portfolio create 10000 1000 US_EQUITIES

image

Running v0.4.20:

image

When I look at the source of the error (trader_factory.py), it doesn't have a tradier.py definition:

image

I've looked in the master branch at this folder, and I can't see that file either:

image

On a side note I've set LIU_BROKER=alpaca, which I thought would bypass the factory building a TradierTrader, but I haven't looked into that much:

trader_factory.py

image

Any help would be appreciated here, I'm not sure what I'm doing wrong. Happy to provide any other details if I've missed something.

quick update - I removed the from liualgotrader.trading.tradier import TradierTrader line from trader_factory.py:8 and it worked for me

@adenhertog @angrycarrots @AleFestante I managed to reproduce and found the issue. I will be releasing a fixed version together with several upgrades in a couple of days. I appreciate your patience.

resolved. thanks.