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
am trying to build my own portfolio performance dashboard. Therefore I changed the Portfolio and Details Classes in a way that they return a dataframe instead of printing it to the cmd.
My idea was to loop through all of my portfolio positions to receive all details for the positions in my portfolio.
It looks like this:
for pos in list(df["isin"]):
instrument = Details(tr=self.tr, isin=pos).get()
My idea was to store all results to a list and then create a new concat df with all details.
But somehow this is not working.
The results I get from Details.get() are not in the correct order. Some of the details do not match the ISIN. Everything seems to be shifted.
I am assuming that I can not loop through this kind of async functions because there is no control over how the results are returned.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
am trying to build my own portfolio performance dashboard. Therefore I changed the Portfolio and Details Classes in a way that they return a dataframe instead of printing it to the cmd.
My idea was to loop through all of my portfolio positions to receive all details for the positions in my portfolio.
It looks like this:
My idea was to store all results to a list and then create a new concat df with all details.
But somehow this is not working.
The results I get from Details.get() are not in the correct order. Some of the details do not match the ISIN. Everything seems to be shifted.
I am assuming that I can not loop through this kind of async functions because there is no control over how the results are returned.
Does someone has an idea how to solve this?
Beta Was this translation helpful? Give feedback.
All reactions