Skip to content

Add support for order executor and portfolio provider #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 15, 2025
Merged

Conversation

MDUYN
Copy link
Collaborator

@MDUYN MDUYN commented May 14, 2025

Implemented Portfolio Providers and Order Executors for DRY Principle

Description

This pull request introduces a refactor to implement Portfolio Providers and Order Executors, adhering to the DRY (Don't Repeat Yourself) principle. The changes aim to reduce code duplication, improve maintainability, and enhance the modularity of the framework.

Key Changes:

  • Portfolio Providers: Abstracted portfolio-related logic into dedicated providers to centralize portfolio management and configuration.
  • Order Executors: Encapsulated order execution logic into reusable executors, allowing for cleaner and more consistent handling of buy/sell operations across the framework.
  • Updated all relevant modules to use the new providers and executors.
  • Ensured backward compatibility with existing functionality.

Why These Changes Are Necessary:

  • To eliminate repetitive code patterns related to portfolio management and order execution.
  • To improve the scalability of the framework by making it easier to add new portfolio types or order execution strategies.
  • To align with best practices for clean and maintainable code.

Type of Change

Bugfix
New feature
Documentation update
Refactor/optimization
Checklist
Code is formatted with black or a similar linter.
Tests have been added or updated.
Documentation has been updated (if needed).

Additional Notes

  • The refactor has been tested with existing unit tests, and additional tests have been added for the new providers and executors.
  • Documentation has been updated to reflect the new architecture, including examples of how to use the portfolio providers and order executors.
  • This refactor lays the groundwork for future enhancements, such as supporting additional portfolio types or custom order execution strategies.

@MDUYN MDUYN merged commit e03a4ee into main May 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant