-
-
Save quantra-go-algo/b17741a9a4246c8bb608c091e97caa83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Calculate daily returns based on signals | |
aapl_data['Daily_Return'] = aapl_data['Close'].pct_change() | |
aapl_data['Strategy_Return'] = aapl_data['Signal'].shift(1) * aapl_data['Daily_Return'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment