input: Below is an instruction that describes a task. Write a response that appropriately completes the request.
  
  ### Instruction:
  Create an AI-based system in Python for predicting stock market movements.
  
  ### Input:
  Not applicable
  
  ### Output:
  def predict_stock_movements(data: pd.DataFrame) -> float:
      """ The function predicts stock market movements using a deep learning model.
      It first splits the data into training and test sets, then builds a deep learning model 
      using TensorFlow, trains the model, and finally evaluates the model.
      The function returns the Mean Squared Error (MSE) of the test data.
      >>> data = pd.read_csv('sample_data.csv')
      >>> predict_stock_movements(data)
      0.038
      """
      #split data into train and test data
      X_train = data.iloc[:, 0]  # Choosing the independent variable 
      y_train = data.iloc[:, 1]  # Choosing the dependent variable
      X_test = data.iloc[:, 0]  # Choosing the independent variable 
      y_test = data.iloc[:, 1]  # Choosing the dependent variable
  
      # Build a deep learning model
      # import necessary libraries
      import tensorflow as tf
      from tensorflow.keras.layers import Dense
      from tensorflow.keras.models import Sequential
  
      # create a model and add layers
      model = Sequential()
      model.add(Dense(64, input_shape=(1,), activation='relu'))
      model.add(Dense(128, activation='relu'))
      model.add(Dense(64, activation='relu'))
      model.add(Dense(1))
  
      # compile the model
      model.compile(optimizer='adam', loss='mse', metrics=['mse'])
  
      # train the model
      model.fit(X_train, y_train, batch_size=64, epochs=20, validation_data=(X_test, y_test))
  
      # Evaluate the model
      score = model.evaluate(X_test, y_test, verbose=0)
      return score[0]
output:     # Normalize the data
      X_train = (X_train - X_train.mean()) / X_train.std()
      X_test = (X_test - X_test.mean()) / X_test.std()
  
      # Reshape the data to fit the model
      X_train = X_train.values.reshape(-1, 1)
      X_test = X_test.values.reshape(-1, 1)
  
      # Train the model again with normalized data
      model.fit(X_train, y_train, batch_size=64, epochs=20, validation_data=(X_test, y_test))
  
      # Predict the stock movements
      y_pred = model.predict(X_test)
  
      # Calculate the Mean Squared Error (MSE)
      mse = ((y_pred - y_test) ** 2).mean()
      return mse