You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Portfolio.Values not shows holding quantities from the broker even though there are holdings.
In the example I give it is called from Initialize function but this can happen throughout the strategy.
I know its a hard bug to fix. Please instruct me on how to actually yes check for the current actual holdings through a quantconnect c# strat. maybe I am doing something wrong.
If Portfolio.Values are not reliable at any point during the strat runtime please also say it so I could implement a different mechanism for positions tracking.
Expected Behavior
In live mode with broker Portfolio.Values should return the actual portfolio values or indicate in some manner that we dont have the current holdings at the moment.
Actual Behavior
Portfolio.Values returns 0 from holding.Quantity even if holding.Quantity is not 0.
Potential Solution
Populate Portfolio.Values before any user code is running.
Reproducing the Problem
in live mode, AddEquity to the maximum amount of tickers (100) minute data and have one position at ONE of the tickers.
in Initialize() go through Portfolio.Values in order to find the one position with holding.Quantity not 0.
no such position is found although actually yes exists in the broker.
System Information
Checklist
I have completely filled out this template
I have confirmed that this issue exists on the current master branch
I have confirmed that this is not a duplicate issue by searching issues
I have provided detailed steps to reproduce the issue
The text was updated successfully, but these errors were encountered:
Portfolio.Values not shows holding quantities from the broker even though there are holdings.
In the example I give it is called from Initialize function but this can happen throughout the strategy.
I know its a hard bug to fix. Please instruct me on how to actually yes check for the current actual holdings through a quantconnect c# strat. maybe I am doing something wrong.
If Portfolio.Values are not reliable at any point during the strat runtime please also say it so I could implement a different mechanism for positions tracking.
Expected Behavior
In live mode with broker Portfolio.Values should return the actual portfolio values or indicate in some manner that we dont have the current holdings at the moment.
Actual Behavior
Portfolio.Values returns 0 from holding.Quantity even if holding.Quantity is not 0.
Potential Solution
Populate Portfolio.Values before any user code is running.
Reproducing the Problem
in live mode, AddEquity to the maximum amount of tickers (100) minute data and have one position at ONE of the tickers.
in Initialize() go through Portfolio.Values in order to find the one position with holding.Quantity not 0.
no such position is found although actually yes exists in the broker.
System Information
Checklist
master
branchThe text was updated successfully, but these errors were encountered: