Daily Losers strategy, uses py-alpaca-api for Alpaca Markets integration.
Project description
PY-ALPACA-DAILY-LOSERS
Unleashing strategic insights for daily market victories.
Table of Contents
Overview
The py-alpaca-daily-losers project integrates Alpaca Markets for a daily losers strategy, offering market data extraction, AI analysis, and Slack notifications. The core functionality centers on retrieving and analyzing daily stock market data using indicators like Bollinger Bands and RSI. It provides insights through news extraction, sentiment analysis, and chat functions via OpenAI integration. This project equips users with robust data analysis tools for informed decision-making in the stock market.
This project is in no way trading advice, or a vaild strategy. Any trading done using this package should only be on a paper account, until proven to work.
Visit PyAlpacaApi to learn more about the core of this project.
Visit AlpacaApiStrategies for an example app using this strategy.
Features
Feature | Description | |
---|---|---|
โ๏ธ | Architecture | The project has a modular architecture that integrates various components for market data extraction, AI analysis, and Slack notifications. It leverages external APIs effectively within its architecture. |
๐ฉ | Code Quality | The codebase maintains good practices and follows a consistent style throughout. It includes clear documentation and comments for better understanding. |
๐ | Documentation | The project provides extensive documentation explaining different modules and functionalities. It helps users understand the purpose and usage of each component clearly. |
๐ | Integrations | Key integrations include Alpaca API for market data, OpenAI for sentiment analysis, and Slack for notifications. External dependencies are managed efficiently. |
๐งฉ | Modularity | The codebase is structured in a modular manner, promoting reusability and easy maintenance. Each module serves a specific purpose, enhancing code organization. |
๐งช | Testing | Testing frameworks are not explicitly mentioned in the details provided. Additional information would be needed to assess the extent of testing in the project. |
โก๏ธ | Performance | The project efficiently processes market data and conducts analysis, ensuring timely insights for decision-making. Performance optimizations are likely implemented to handle data efficiently. |
๐ก๏ธ | Security | Measures for data protection and access control are not explicitly mentioned in the details provided. Additional information would be needed to assess the security practices in the project. |
๐ฆ | Dependencies | Key external libraries and dependencies include tqdm, openai, toml, requests, python-dotenv, and others. These dependencies are vital for various functionalities within the project. |
๐ | Scalability | The project's architecture and modular design suggest potential scalability to handle increased traffic and load. It can likely accommodate growth with minimal adjustments. |
Repository Structure
โโโ py-alpaca-daily-losers/
โโโ README.md
โโโ poetry.lock
โโโ py_alpaca_daily_losers
โ โโโ __init__.py
โ โโโ daily_losers.py
โ โโโ src
โ โโโ __init__.py
โ โโโ article_extractor.py
โ โโโ global_fuctions.py
โ โโโ marketaux.py
โ โโโ openai.py
โ โโโ slack.py
โโโ pyproject.toml
โโโ tests
โโโ __init__.py
Modules
.
File | Summary |
---|---|
pyproject.toml | Implements Alpaca Markets integration for Daily Losers strategy using py-alpaca-api. Incorporates critical features for market data extraction, AI integration, and Slack notifications within the repositorys architecture. |
py_alpaca_daily_losers
File | Summary |
---|---|
daily_losers.py | The daily_losers.py file in the py-alpaca-daily-losers repository serves as a crucial component for retrieving and analyzing daily stock market data. It leverages various modules such as Bollinger Bands and RSI Indicator to calculate key indicators. Additionally, it integrates external APIs for news extraction and open-source tools for effective data processing. The script pulls relevant market data and conducts in-depth analysis to provide valuable insights for decision-making within the parent repositorys architecture. |
py_alpaca_daily_losers.src
File | Summary |
---|---|
slack.py | Defines a class to send messages to a Slack channel based on provided parameters. Handles sending messages or printing if Slack token is missing. Implements error handling for message sending failures. |
openai.py | Implements OpenAI chat and sentiment analysis functions using API keys for financial news within the repositorys architecture. |
marketaux.py | Retrieves recent news links related to a given stock symbol using the MarketAux API. Parses the response to extract valid URLs for further processing within the repositorys architecture. |
global_fuctions.py | Sends messages to Slack based on production environment; utilizes environment variables for settings. |
article_extractor.py | Extracts article content from URLs using API key-Truncates long text if needed-Retrieves article title and content snippets-Handles API requests and response processing |
Getting Started
System Requirements:
- Python:
version x.y.z
Installation
From source
- Clone the py-alpaca-daily-losers repository:
$ git clone https://github.com/TexasCoding/py-alpaca-daily-losers
- Change to the project directory:
$ cd py-alpaca-daily-losers
- Install the dependencies:
$ pip install -r requirements.txt
Usage
From source
Run py-alpaca-daily-losers using the command below:
$ python main.py
Tests
Run the test suite using the command below:
$ pytest
Project Roadmap
-
โบ INSERT-TASK-1
-
โบ INSERT-TASK-2
-
โบ ...
Contributing
Contributions are welcome! Here are several ways you can contribute:
- Report Issues: Submit bugs found or log feature requests for the
py-alpaca-daily-losers
project. - Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/TexasCoding/py-alpaca-daily-losers
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
License
This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.
Acknowledgments
- List any resources, contributors, inspiration, etc. here.
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 py_alpaca_daily_losers-0.2.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ae5d1c1aeb59715dfd97d965f244914d2c35cf6ec6f91dfbdddbde9b66f9fdc |
|
MD5 | d51acd89bc31514c74ce19c2ab0a7982 |
|
BLAKE2b-256 | df89b11376c79f755b1b928fc68808dafce7226e7f25a221ec750d2bb84e5c6c |
Hashes for py_alpaca_daily_losers-0.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08374d131657d690bd1ab85079b83ad273e248d56c99336458a8d47c45f059b1 |
|
MD5 | 14043c9330e08a3f23720bf9d508b03e |
|
BLAKE2b-256 | ca14a919bd6f34f6ee1484c96c6d0d79fbdc860e04f2e2d4f85deaa06c5c7842 |