atradebot package
Project description
Atradebot
Bot to help you choose what to invest using AI
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for atradebot-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd913731ee1c4597efec48323649a16bce6a92c96bc46c2224e77c1d2de3f80 |
|
MD5 | b0ba353b93e3b359517082f0afbcbd76 |
|
BLAKE2b-256 | 8f03e830b2e92cd950305a8528411645188ac44486faf2ccffbe75f32e3639cf |