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
I believe a more accurate calculation for calculating compounded returns would be something like (1 + ret).cumprod() - 1
or [ x - 1 for x in np.cumprod[ x + 1 for x in strat ] ]
The text was updated successfully, but these errors were encountered:
@guil-lambert I've only looked at this briefly so I could be totally off base, but it appears as if you are trying to sum up simple returns.
Returns:
" strat.append((endX*currentsqrtPrice**2+endY - startX*startPrice - startY)/2/positionSize)\n",
Compounding via
cumsum
:research/_research-bites/20230112/ResearchBites-20230112-Autoroll.ipynb
Line 184 in 4e463cd
I believe a more accurate calculation for calculating compounded returns would be something like
(1 + ret).cumprod() - 1
or
[ x - 1 for x in np.cumprod[ x + 1 for x in strat ] ]
The text was updated successfully, but these errors were encountered: