Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 14:07
    sonarcloud[bot] commented #341
  • 14:06
    pyup-bot commented #340
  • 14:06

    amor71 on scheduled-update-2022-06-20

    (compare)

  • 14:06
    pyup-bot closed #340
  • 14:06
    pyup-bot labeled #341
  • 14:06
    pyup-bot assigned #341
  • 14:06
    pyup-bot opened #341
  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update pandas_market_calendars … (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update mnqueues from 0.0.38 to … (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Pin pandas_market_calendars to … (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update yfinance from 0.1.70 to … (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update widgetsnbextension from … (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update websocket-client from 1.… (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update virtualenv from 20.14.1 … (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update validators from 0.19.0 t… (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update types-tabulate from 0.8.… (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update types-requests from 2.27… (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update types-pytz from 2021.3.8… (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update twine from 4.0.0 to 4.0.1 (compare)

  • 14:06

    amor71 on scheduled-update-2022-06-27

    Update types-python-dateutil fr… (compare)

@amor71
@amor71
v2.0.3 pushed
@amor71
@amor71
v3.0 published, switch to python 3.9 + quite a few analytics improvements
@amor71
@amor71
v3.2 released, draft medium post created
Double your $$$ w/ Liu!
@amor71
@amor71
amor71/LiuAlgoTrader#192 -> Working on creating automatic hyper-parameters optimization, another steps towards ML. No other platforms support this .
Rup Red
@coupons1_gitlab
Hey Guys! First things first! Awesome project.. :clap:
so, followed your instructions to install the app and used one of your sample trader.toml config to start the trader app. I see this error:
Traceback (most recent call last): File "/usr/local/Cellar/python@3.9/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/liualgotrader/consumer.py", line 853, in queue_consumer if not await handle_data_queue_msg( File "/usr/local/Cellar/python@3.9/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/liualgotrader/consumer.py", line 804, in handle_data_queue_msg return await handle_transaction(symbol, data, trader, data_loader) File "/usr/local/Cellar/python@3.9/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/liualgotrader/consumer.py", line 459, in handle_transaction data["timestamp"].replace(second=0, microsecond=0, nanosecond=0) KeyError: 'timestamp' [queue_consumer()][36534]2021-06-23 20:45:26.380500:error: Traceback (most recent call last):
any assistance on fixing this issue?
apologies if this is not the right channel to ask this sort of question
@amor71
@amor71
@coupons1_gitlab which tradeplan.toml file / sample did you try? I will look into that
@coupons1_gitlab could you please open an issue (https://github.com/amor71/LiuAlgoTrader/issues) with the details and I'll look into it asap
@amor71
@amor71
@/all Liu v0.3.10 has been released aside various bug fixes, it includes a new tool for hyper-parameters optimization and analysis.
0.3.16 was released, added documentation for Windows users'
@amor71
@amor71
0.3.17 was released
@amor71
@amor71
0.3.19 released, in prep of a new article
Preview to next Liu article
Elliot V Pourmand
@ElliotVilhelm
image.png
Hi @amor71 , I am on the latest version of liu, I have tried set up on my mac and windows, in both cases I have successfully launched the app but I do not see the same options in the documentation. Notice there is no back-test a specific day, and I am unable to pull data from alpaca.
In your docs I see you have "back-test against the whole day" and a "Select Environment" drop down.
In neither setups did I see these options available, I have not been able to download any data.
Elliot V Pourmand
@ElliotVilhelm
@amor71
@amor71
@ElliotVilhelm thanks for reaching out. To view the sample data in your DB you should choose the analyzer.
Generally speaking, I'm gradually stepping away from streamlit and focusing on the Jupyter Notebooks. The reason is that streamlit was slow to adopt to 3.9 and I don't have the capacity to support both notebooks and streamlit, the community seems to prefer the notebooks anyhow.
It is still there, mostly to do end-to-end tests post-installation and see something visual.
if you want to backtest you should use the command-line tools. If you need instructions lmk. If you're having difficulties with it, we can do an online 1:1 session and I'll show you how to use it.
@ElliotVilhelm .
Elliot V Pourmand
@ElliotVilhelm
Awesome, thank you for being responsive. I had transitioned into working off the CLI tool as well. I just seem to have some trouble understanding how to get the backtester to pull data for a historical trade day. I would be very happy to pair with you as soon as you have some time. I am very excited over this project and hope to become a contributor in due time. @amor71
Elliot V Pourmand
@ElliotVilhelm

Based off these points in the docs

When the backtester application starts, it lists all the stocks picked by the scanners during the trading session. backtester re-runs each session, by loading per-minute candles for the stock trading session (up to one week back).

I am a bit confused on how to load intraday historical data for a session I did not trade. I did read a note on using the miners in the documentation as well but it seems as though this type of loading must be supported in some way? Essentially I am looking to backtest on a prior trade day for which I have no data for, no prior batch-id. Likely I am misunderstanding something here.

@amor71
@amor71
pushed version 0.3.20 -> includes fixes due to Alapca recent API changes.
@ElliotVilhelm I'll DM you
Joel Brass
@jbrass
@amor71 This project looks very cool. I have installed it with my PG connection string and alpaca credentials in the env file. This all seems to be working. I am not sure how to get any data into the system. When I run the market_miner I get the following error:
Traceback (most recent call last):
File "/root/miniconda3/envs/liua/bin/market_miner", line 101, in <module>
asyncio.run(main(conf_dict))
File "/root/miniconda3/envs/liua/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/root/miniconda3/envs/liua/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/root/miniconda3/envs/liua/bin/market_miner", line 36, in main
await asyncio.gather(task_list)
File "/root/miniconda3/envs/liua/lib/python3.9/site-packages/liualgotrader/common/decorators.py", line 18, in helper
result = await process(func,
args, params)
File "/root/miniconda3/envs/liua/lib/python3.9/site-packages/liualgotrader/common/decorators.py", line 11, in process
return await func(*args,
params)
File "/root/miniconda3/envs/liua/lib/python3.9/site-packages/liualgotrader/miners/stock_cluster.py", line 38, in run
count = self._get_count(session)
File "/root/miniconda3/envs/liua/lib/python3.9/site-packages/liualgotrader/miners/stock_cluster.py", line 75, in _get_count
"apiKey": get_polygon_credentials(config.prod_api_key_id),
AttributeError: module 'liualgotrader.common.config' has no attribute 'prod_api_key_id'
[<module>()][877405]2021-08-05 14:47:05.394177: market_miner completed
@amor71
@amor71
@jbrass welcome! you're missing your api keys (environment variables). If you want to play around and try to backtest I would suggest following this: https://amor71.medium.com/liualgotrader-part-ii-putting-it-all-together-1d447650808b
Joel Brass
@jbrass
I did specify my Alpaca keys in a file that looks like this https://github.com/amor71/LiuAlgoTrader/blob/master/examples/env_vars.sh and I can see them when I echo $APCA...
I will take another look at the post
@amor71
@amor71
@jbrass will DM you
Joshua Kang
@guppykang
Hey @amor71 any advice on this by any chance?
Traceback (most recent call last): File "/Users/joshuakang/.pyenv/versions/3.9.5/envs/py395/lib/python3.9/site-packages/liualgotrader/scanners_runner.py", line 29, in scanner_runner symbols = await scanner.run() File "/Users/joshuakang/git/trading_bot/liu/v1/../scanners/gold_digger.py", line 29, in run .close[back_time - timedelta(days=90) : back_time] # type: ignore TypeError: unsupported operand type(s) for -: 'NoneType' and 'datetime.timedelta' [scanner_runner()][88091]2021-08-19 10:46:43.546915:[ERROR]Exception in scanner_runner(GoldDigger): exception of type TypeError with args ("unsupported operand type(s) for -: 'NoneType' and 'datetime.timedelta'",)
Joshua Kang
@guppykang
I'm running trader on the gold digger scanner and momentum strategy. Just trying to get something working so that I understand how this library works.
@amor71
@amor71
@guppykang There were a couple of API changes by Alpaca, I'm pushing now v. 0.3.21v with fixes -> can u try to pull it lmk if you still experience the issue? If so we'll dig deeper. Thank you.
@guppykang Incidently, are you sure you wanted to run trader or backtester ... ?
@amor71
@amor71
v. 0.3.21 released. version includes performance improvements (primarily for day-trading)
Joshua Kang
@guppykang
ahh I just started using this today, so probably backtester :). thanks, i'll take a look tonight
@amor71
@amor71
@guppykang assuming you're referring to https://amor71.medium.com/liualgotrader-part-ii-putting-it-all-together-1d447650808b then it uses backtester not trader
@guppykang LMK if that helps
2 replies
@amor71
@amor71
@/all Guys - I appreciate everyone's time - and I understand it's not trivial to start using a platform like Liu and may the documentation is not "tutorial" enough or explains concept enough. I would love to hear your opinions on how you think we should improve the documentation to simplify the "onboarding" of new users. Thank you.
3 replies
Joel Brass
@jbrass
@amor71 I just reviewed the third article. I attempted to backtest the trendfollow strategy first. It looks like the trendfollow strategy is pointing to a library that is in another package. https://github.com/amor71/trading_strategies/blob/master/strats/trendfollow.py#L40 .
I was able to fix it by copying trading_strategies/common/trend.py to into liualgotrader/common/ and rebuilding the module