Skip to main content

Daily Losers strategy, uses py-alpaca-api for Alpaca Markets integration.

Project description

project-logo

PY-ALPACA-DAILY-LOSERS

Unleashing strategic insights for daily market victories.

license last-commit repo-top-language repo-language-count


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

  1. Clone the py-alpaca-daily-losers repository:
$ git clone https://github.com/TexasCoding/py-alpaca-daily-losers
  1. Change to the project directory:
$ cd py-alpaca-daily-losers
  1. 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:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/TexasCoding/py-alpaca-daily-losers
    
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
    
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
    
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
    
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


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.

Return


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

py_alpaca_daily_losers-0.3.4.tar.gz (17.3 kB view hashes)

Uploaded Source

Built Distribution

py_alpaca_daily_losers-0.3.4-py3-none-any.whl (16.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