input: Write a function to predict stock market movements using a deep learning model. The function should load data from a CSV file, split it into training and testing sets, build a neural network model, train the model, and evaluate its performance. If the input file is empty or the model cannot be trained, the function should return an error message.
  assert predict_stock_market("data.csv")=="Model trained successfully."
  assert predict_stock_market("empty.csv")=="Error: Input file is empty."
  assert predict_stock_market("non_existent_file.csv")=="Error: File does not exist."
output: def predict_stock_market(file_path):
      import pandas as pd
      import numpy as np
      from sklearn.model_selection import train_test_split
      from sklearn.preprocessing import StandardScaler
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense
      import os
  
      if not os.path.exists(file_path):
          return "Error: File does not exist."
      
      try:
          data = pd.read_csv(file_path)
      except pd.errors.EmptyDataError:
          return "Error: Input file is empty."
      
      if data.empty:
          return "Error: Input file is empty."
      
      X = data.iloc[:, :-1].values
      y = data.iloc[:, -1].values
      
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      scaler = StandardScaler()
      X_train = scaler.fit_transform(X_train)
      X_test = scaler.transform(X_test)
      
      model = Sequential()
      model.add(Dense(128, input_dim=X_train.shape[1], activation='relu'))
      model.add(Dense(64, activation='relu'))
      model.add(Dense(1, activation='linear'))
      
      model.compile(loss='mean_squared_error', optimizer='adam')
      
      try:
          model.fit(X_train, y_train, epochs=10, batch_size=32, verbose=0)
      except:
          return "Error: Model could not be trained."
      
      return "Model trained successfully."