Last active
May 21, 2025 23:39
-
-
Save quantra-go-algo/49a39734d0fb8272b305af0f48f913e3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Download the GBPUSD data from 2003 to 2013 | |
data = yf.download('GBPUSD=X', start='2003-12-01', end='2023-10-06', auto_adjust=True, group_by='ticker')['GBPUSD=X'] | |
# Compute the log returns | |
data['returns'] = np.log(data['Close']/data['Close'].shift(1)) | |
# Print the data | |
data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment