Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinovsky committed Dec 9, 2024
1 parent a5b0aae commit 5d930ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected bool GetPortfolioTargets(out PortfolioTarget[] targets)
var security = _algorithm.Securities[holding.Symbol];

// Skip non-tradeable securities
if (!security.IsTradable) continue;
if (!security.IsTradable && !security.Symbol.IsCanonical()) continue;

var marginParameters = MaintenanceMarginParameters.ForQuantityAtCurrentPrice(security, holding.Quantity);
var adjustedPercent = security.BuyingPowerModel.GetMaintenanceMargin(marginParameters) / totalPortfolioValue;
Expand Down

0 comments on commit 5d930ec

Please sign in to comment.