Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Last active December 27, 2024 05:53
Show Gist options
  • Save quantra-go-algo/be4f31b18fcc6418643a12662daa2f54 to your computer and use it in GitHub Desktop.
Save quantra-go-algo/be4f31b18fcc6418643a12662daa2f54 to your computer and use it in GitHub Desktop.
df = AAPL_data[['Open', 'High', 'Low', 'Close']].pct_change().dropna().copy()
df['open']=AAPL_data['Open'].shift(1)
df['high']=AAPL_data['High'].shift(1)
df['low']=AAPL_data['Low'].shift(1)
df['close']=AAPL_data['Close'].shift(1)
df=df.dropna()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment