Skip to content

[Futures] Allow reducing leveraged targets during delta buying-power liquidation#9412

Open
aiSynergy37 wants to merge 1 commit intoQuantConnect:masterfrom
aiSynergy37:bug-5604-future-delta-margincall
Open

[Futures] Allow reducing leveraged targets during delta buying-power liquidation#9412
aiSynergy37 wants to merge 1 commit intoQuantConnect:masterfrom
aiSynergy37:bug-5604-future-delta-margincall

Conversation

@aiSynergy37
Copy link
Copy Markdown
Contributor

Description

  • allows FutureMarginModel leveraged target requests (|target| > 1) only when they reduce existing exposure
  • keeps the existing exception behavior for leveraged requests that increase exposure
  • adds a regression test for the delta-buying-power path used by margin liquidation

Closes #5604.

Testing

  • dotnet build Tests/QuantConnect.Tests.csproj --no-restore -v minimal
  • dotnet test Tests/QuantConnect.Tests.csproj --filter FullyQualifiedName~FutureMarginBuyingPowerModelTests.GetMaximumOrderQuantityForDeltaBuyingPower_AllowsReducingLeveragedTarget --no-build -v normal -m:1 (test host crashes on this machine with Python.NET GIL finalizer error before test completion)

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.

[Futures] DefaultMarginCallModel GetMaximumLotsForDeltaBuyingPower

2 participants