Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 14:33
    amor71 unlabeled #331
  • 14:33
    amor71 labeled #331
  • 14:32
    amor71 commented #331
  • 14:25
    amor71 commented #331
  • May 17 17:01
    angrycarrots commented #331
  • May 16 14:07
    sonarcloud[bot] commented #335
  • May 16 14:07

    amor71 on scheduled-update-2022-05-09

    (compare)

  • May 16 14:07
    pyup-bot closed #334
  • May 16 14:07
    pyup-bot commented #334
  • May 16 14:06
    pyup-bot assigned #335
  • May 16 14:06
    pyup-bot labeled #335
  • May 16 14:06
    pyup-bot opened #335
  • May 16 14:06

    amor71 on scheduled-update-2022-05-16

    Update nest_asyncio from 1.5.4 … (compare)

  • May 16 14:06

    amor71 on scheduled-update-2022-05-16

    Update zipp from 3.7.0 to 3.8.0 (compare)

  • May 16 14:06

    amor71 on scheduled-update-2022-05-16

    Update wrapt from 1.13.3 to 1.1… (compare)

  • May 16 14:06

    amor71 on scheduled-update-2022-05-16

    Update widgetsnbextension from … (compare)

  • May 16 14:06

    amor71 on scheduled-update-2022-05-16

    Update websockets from 9.1 to 1… (compare)

  • May 16 14:06

    amor71 on scheduled-update-2022-05-16

    Update websocket-client from 1.… (compare)

  • May 16 14:06

    amor71 on scheduled-update-2022-05-16

    Update virtualenv from 20.13.1 … (compare)

  • May 16 14:06

    amor71 on scheduled-update-2022-05-16

    Update validators from 0.18.2 t… (compare)

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
@amor71
@amor71
@jbrass you shouldnt do that. Its a seperate repo - you should have cloned it ..
in fact you dont need clone the framrwork at all. Just pip install it.
@amor71
@amor71
@/all LiuAlgoTrader v. 0.3.22 released. Thanks much to @riven314 for driving this version.
@amor71
@amor71
@/all v.0.3.25 will be released in a week, includes several performance improvements and new tools. Pull Request open if anyone wants to take a look. It uses OpenTelemetry for tracing and app-monitoring
@amor71
@amor71
NOTE: pull-request merged. master is now latest, I will be running several tests over the next few days and release next week. New Medium article to follow w/ details on how to monitor and trace thruput for day-trading purposes.
@amor71
@amor71
@/all As part of the new release, which focuses on performance improvements, monitoring, tracing, and tuning, I'm sharing here a draft of an accompanying Medium article that I will be publishing later this week / early next week. https://medium.com/@amor71/liualgotrader-internals-performance-tuning-4cbb24fb7eba
Happy for any comments or questions. Have a nice evening (or morning, wherever you are...)