Name | atradebot JSON |
Version |
0.1.0
JSON |
| download |
home_page | |
Summary | atradebot package |
upload_time | 2023-08-14 01:11:52 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | |
keywords |
algotrade
fintech
tutorial
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## Atradebot
![image](img/Atradebot.jpg)
Bot to help you choose what to invest using AI
[Documentation](https://atradebot.readthedocs.io/en/latest/index.html#)
### 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](https://www.geeksforgeeks.org/how-to-setup-cron-jobs-in-ubuntu/).
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](https://github.com/Superalgos/Superalgos/blob/master/LICENSE)
Raw data
{
"_id": null,
"home_page": "",
"name": "atradebot",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "algotrade,fintech,tutorial",
"author": "",
"author_email": "AndreChang <andrechang67@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/8e/f6/9df335f835ef57e17a58d7d2f359a1fc876d0276ac8f9b34e15d9dd04b7f/atradebot-0.1.0.tar.gz",
"platform": null,
"description": "## Atradebot\n\n![image](img/Atradebot.jpg)\n\nBot to help you choose what to invest using AI \n\n\n[Documentation](https://atradebot.readthedocs.io/en/latest/index.html#)\n\n### Install\n\nRequirement:\n\n```\npip install -r requirements.txt\n```\n\nInstall using pip\n\n```\npip install -e .\n```\n\nif errors do:\n```\npip install --upgrade pip\n```\n\n\n## Run \nGo to folder `src/atradebot`\n\nstart by setting your plan using .yaml file like in `default.yaml`: \n\n\nThen run `python3 main.py -c default.yaml -m run`\nThis will get news and suggest what stocks to buy during that time and update the profile `.xlsx` files\n\n## Test strategies\nGo to folder `src/atradebot`\n\nUse this to test different strategies using past historical data\n```\npython backtest.py\n```\nmore params:\n\n```\npython 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\"\n```\n\n## Set to run everyday\nGo to folder `src/atradebot`\n\nrun: `crontab -e`\n\nAnd add this line to run everyday 8am: \n`0 8 * * * python main.py -c default.yaml -m run`\n\n\n## Run App\n\nUse the following command to run this bot as an app\n\n```\nstreamlit run app.py\n```\n\n## Train model to predict news \nGo to folder `src/atradebot`\n\nUse this to create a hugginface dataset to train a model\n```\npython fin_data.py\n```\nThen run this to train a model\n```\npython fin_train.py\n```\n\n\n## Sentiment analysis and database\n\nTo setup a server to scrape news.\n\nTODO:\n\n- modify script to take in a list of stocks\n- main function to run as program\n- cron job info\n\n\nRun with:\n\n```\npython news2db.py\n```\n\nTo set up a cron job on a Unix server you can follow [these instructions](https://www.geeksforgeeks.org/how-to-setup-cron-jobs-in-ubuntu/). \n\nAdd cron job with: \n\n`\ncrontab -e\n`\n\nAdd line:\n`\n0 4 * * * cd /home/your_dir/Atradebot/src/atradebot/ && python news2db.py\n`\n\nThis will run the script on your server every day at 4 am. It will collect data every day and store it in the database.\n\n\n\n\n# License\n\nAtradebot is open-source software released under the [Apache 2.0 license](https://github.com/Superalgos/Superalgos/blob/master/LICENSE)\n",
"bugtrack_url": null,
"license": "",
"summary": "atradebot package",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"algotrade",
"fintech",
"tutorial"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8f03e830b2e92cd950305a8528411645188ac44486faf2ccffbe75f32e3639cf",
"md5": "b0ba353b93e3b359517082f0afbcbd76",
"sha256": "5cd913731ee1c4597efec48323649a16bce6a92c96bc46c2224e77c1d2de3f80"
},
"downloads": -1,
"filename": "atradebot-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b0ba353b93e3b359517082f0afbcbd76",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 138038,
"upload_time": "2023-08-14T01:11:50",
"upload_time_iso_8601": "2023-08-14T01:11:50.460604Z",
"url": "https://files.pythonhosted.org/packages/8f/03/e830b2e92cd950305a8528411645188ac44486faf2ccffbe75f32e3639cf/atradebot-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8ef69df335f835ef57e17a58d7d2f359a1fc876d0276ac8f9b34e15d9dd04b7f",
"md5": "b5255b096bf7bc4025ad1b70226e49b8",
"sha256": "0d52252a45715ab3981534aa45c9696419e158e99293a791201ae0af5d2277ad"
},
"downloads": -1,
"filename": "atradebot-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b5255b096bf7bc4025ad1b70226e49b8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 93252,
"upload_time": "2023-08-14T01:11:52",
"upload_time_iso_8601": "2023-08-14T01:11:52.495538Z",
"url": "https://files.pythonhosted.org/packages/8e/f6/9df335f835ef57e17a58d7d2f359a1fc876d0276ac8f9b34e15d9dd04b7f/atradebot-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-14 01:11:52",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "atradebot"
}