-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in updatePortf() when using multiple currencies #117
Comments
Thanks for the report! Can you give a small, reproducible example that triggers the issue? |
It looks like the problem is in intraday deals.
|
hi @evgeniavolkova did you find a way around this please ? I am facing the same issue on intraday trades |
I can't replicate the issue, so I suspect maybe a timezone problem creating duplicate entries on different timestamps or dates. I always run R in 'UTC' timezone, and all of our local data is 'UTC', and 'Date' indexed data is UTC. The Currency multiplier from the last observation should be applied until there is a new observation.
Also, we routinely use intraday trade and FX quote data with currency quotes that are not aligned to transaction timestamps, so at least at that level, we don't experience this problem either. |
Sometimes updatePortf() throws
After searching for the source of the error, found that it's caused by the line
CcyMult <- CcyMult[index(TmpPeriods)]
.It produces duplicate redundant dates in
CcyMult
when dates (and a number of rows in CcyMult) are already aligned with TmpPeriods. After executing this line the number of rows in CcyMult becomes greater than in TmpPeriods, which causes the error mentioned above.A possible and ugly fix:
It helps to avoid the error, but there should be a better solution.
The text was updated successfully, but these errors were encountered: