Skip to main content

atradebot package

Project description

Atradebot

image

Bot to help you choose what to invest using AI

Documentation

Install

Requirement:

pip install -r requirements.txt

Install using pip

pip install -e .

if errors do:

pip install --upgrade pip

Run

Go to folder src/atradebot

start by setting your plan using .yaml file like in default.yaml:

Then run python3 main.py -c default.yaml -m run This will get news and suggest what stocks to buy during that time and update the profile .xlsx files

Test strategies

Go to folder src/atradebot

Use this to test different strategies using past historical data

python backtest.py

more params:

python src/atradebot/backtest.py --mode simple --init_capital 10000 --start_date 2022-01-31 --end_date 2023-05-20 --stocks "AAPL ABBV AMZN MSFT NVDA TSLA"

Set to run everyday

Go to folder src/atradebot

run: crontab -e

And add this line to run everyday 8am: 0 8 * * * python main.py -c default.yaml -m run

Run App

Use the following command to run this bot as an app

streamlit run app.py

Train model to predict news

Go to folder src/atradebot

Use this to create a hugginface dataset to train a model

python fin_data.py

Then run this to train a model

python fin_train.py

Sentiment analysis and database

To setup a server to scrape news.

TODO:

  • modify script to take in a list of stocks
  • main function to run as program
  • cron job info

Run with:

python news2db.py

To set up a cron job on a Unix server you can follow these instructions.

Add cron job with:

crontab -e

Add line: 0 4 * * * cd /home/your_dir/Atradebot/src/atradebot/ && python news2db.py

This will run the script on your server every day at 4 am. It will collect data every day and store it in the database.

License

Atradebot is open-source software released under the Apache 2.0 license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atradebot-0.1.0.tar.gz (93.3 kB view hashes)

Uploaded Source

Built Distribution

atradebot-0.1.0-py3-none-any.whl (138.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page