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
From .updatePosPL function inside the updatePortf function
Where there are two transactions on the same day, TmpPeriods will have two rows with duplicate dates.
Line 214 (below) will make CcyMult consistent with Tmp Periods, e.g. two rows with duplicate date
Line 215 (below) indexes into CcyMult using TmpPeriods, which has duplicate dates, and duplicates ONCE MORE so that there are now four entries with the same date in CcyMult rather than just the two in TmpPeriods, the number of rows no longer match
Line 176 TmpPeriods <- Portfolio$symbols[[Symbol]]$posPL[dateRange]
Line 213 CcyMult <- FXrate[dateRange]
Line 214 CcyMult <- na.locf(merge(CcyMult, index(TmpPeriods)))
Line 215 CcyMult <- CcyMult[index(TmpPeriods)]
This leads to an error in line 209
Line 233 TmpPeriods[, "Ccy.Mult"] <- CcyMult
Where the number of rows do not match
What is the best fix? Do we just get rid of line 188? Seems redundant to Line 187
The text was updated successfully, but these errors were encountered:
From
.updatePosPL
function inside theupdatePortf
functionLine 176
TmpPeriods <- Portfolio$symbols[[Symbol]]$posPL[dateRange]
Line 213
CcyMult <- FXrate[dateRange]
Line 214
CcyMult <- na.locf(merge(CcyMult, index(TmpPeriods)))
Line 215
CcyMult <- CcyMult[index(TmpPeriods)]
This leads to an error in line 209
Line 233
TmpPeriods[, "Ccy.Mult"] <- CcyMult
Where the number of rows do not match
What is the best fix? Do we just get rid of line 188? Seems redundant to Line 187
The text was updated successfully, but these errors were encountered: