https://github.com/stasonjatham/bearbot3
Find opportunities in Stocks I follow to see if I should "buy the dip"
https://github.com/stasonjatham/bearbot3
python python3 stock stock-market stock-prices
Last synced: 6 months ago
JSON representation
Find opportunities in Stocks I follow to see if I should "buy the dip"
- Host: GitHub
- URL: https://github.com/stasonjatham/bearbot3
- Owner: StasonJatham
- Created: 2022-09-12T20:38:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-06T23:34:49.000Z (about 2 years ago)
- Last Synced: 2023-10-07T00:26:41.343Z (about 2 years ago)
- Topics: python, python3, stock, stock-market, stock-prices
- Language: CSS
- Homepage: https://bearbot.io
- Size: 1.93 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/StasonJatham/bearbot3/actions/workflows/pages/pages-build-deployment) [](https://github.com/StasonJatham/bearbot3/actions/workflows/manup.yml) [](https://github.com/StasonJatham/bearbot3/actions/workflows/update.yml)
# Bearbot 3.0 - Finding Dips and making Tendies
## Installation
Pretty straight forward to get started.
```python3
mkdir data
pip install -r requirements.txt
python3 dl.py
```
This will then pull prices for Symbols in `symbols.lst`, calculate the biggest consecutive loss over the last 365 days and the save it to `data/YYYY-MM-DD_SYMBOL.json`. The JSON Files are more like of a "state" keeping mechanism (because this was originally running in AWS Batch with Spot EC2), where the can terminate your instance. The way I built it, it should be fault tolerant for these kind of interruptions, on restart it would just keep going.
### Adding & Removing Symbols
If you want to add or remove symbols you just edit the `symbols.lst`.## Infrastructure
Before I refactored Bearbot, it was running on a t4g.small in ca-central-1 (0,0184 USD/hour,2vCPU, 2 GiB RAM) and built with Django an SQLite. That`s about $14 a month. I chose their Gravitron instances, because I love their performance and evironmental impact, that is also why I host my compute in Canada 🇨🇦,
[the ca-centra-1 zone is apparently being powered 99.5% by Hydropower](http://news.hydroquebec.com/en/press-releases/960/green-electricity-attracts-amazon-web-services-to-montreal/). I am just assuming by that fact alone that it must be one of their most sustainable zones (sadly aws does not supply that sort of data per zone).You see the simplicity of this App. Would you pay $14 a month for it? Nope. I was looking for a cheaper way and started refactoring for AWS Batch + S3. I figured I cloud use some Spot EC2 for compute, run my script and save to S3 where I also planned on hosting. It worked so far as well, hence `dl.py` was built for interruptabillity.
I then thought, wait a minute GitHub is carbon neutral as well, and I could do this with GitHub Pages and GitHub Actions for absolutely free. Here we are.