Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created January 31, 2024 18:42
Show Gist options
  • Save quantra-go-algo/dcc46faeecd0a24ad420e9f0792d3d1f to your computer and use it in GitHub Desktop.
Save quantra-go-algo/dcc46faeecd0a24ad420e9f0792d3d1f to your computer and use it in GitHub Desktop.
# Calculate cumulative returns
aapl_data['Cumulative_Strategy_Return'] = (1 + aapl_data['Strategy_Return']).cumprod()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment