Skip to content

Review Collective2 Implemention#8773

Merged
Martin-Molinero merged 2 commits into
QuantConnect:masterfrom
AlexCatarino:collective2-review
Jun 5, 2025
Merged

Review Collective2 Implemention#8773
Martin-Molinero merged 2 commits into
QuantConnect:masterfrom
AlexCatarino:collective2-review

Conversation

@AlexCatarino

Copy link
Copy Markdown
Member

Description

According to SetDesiredPositions API, the quantity must be non-zero. To close a position, send a stop order to close the position.

The current for all assets, except FOREX, is the quote currency.
Stop sending null (e.g.: maturity for Equity) and remove priceMultiplier.

FOREX:

Unit tests:

  • Increase the initial cash to accommodate FOREX minilot
  • Additional message for minilot warning
  • Fix currencies

Motivation and Context

Fixes C2 implementation

Requires Documentation Change

Yes. We should mention the minilot for FOREX because it will surprise users.

How Has This Been Tested?

Unit tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@AlexCatarino AlexCatarino requested a review from jhonabreul May 15, 2025 21:55

@Martin-Molinero Martin-Molinero left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Minor requests shared

According to `SetDesiredPositions` [API](https://api-docs.collective2.com/apis/general/swagger/strategies/c2_api_strategies/setdesiredpositions_post#strategies/c2_api_strategies/setdesiredpositions_post/t=request&path=positions), the quantity must be non-zero. To close a position, send stop sending a position.

The current for all assets, except FOREX, is the quote currency.

FOREX:
- Observe the [C2 minilot](https://support.collective2.com/hc/en-us/articles/360038042774-Forex-minilots)
- Currency is always USD

Unit tests:
- Increase the initial cash to accomodate FOREX minilot
- Additional message for minilot warning
- Fix currencies
@Martin-Molinero Martin-Molinero merged commit 515606d into QuantConnect:master Jun 5, 2025
5 of 8 checks passed
@AlexCatarino AlexCatarino deleted the collective2-review branch April 20, 2026 21:00
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.

2 participants