Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created February 4, 2025 09:46
# Predict the price using `predict_price_AR` function
data['predicted_price'] = data['Adj Close'].rolling(window=rolling_window).apply(predict_price_AR, raw=False)
# Shift the predicted price by 1 period
data['predicted_price'] = data['predicted_price'].shift(periods=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment