input: Write a python function to predict stock prices using linear regression.
  assert predict_stock_prices("stock_data.csv") > 0.7  # Ensure the accuracy is greater than 0.7
  assert type(predict_stock_prices("stock_data.csv")) == float  # Ensure the function returns a float
output: def predict_stock_prices(file_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.linear_model import LinearRegression
      from sklearn.metrics import r2_score
  
      # Load the dataset
      data = pd.read_csv(file_path)
  
      # Assuming the data has columns 'Date' and 'Price'
      data['Date'] = pd.to_datetime(data['Date'])
      data['Date'] = data['Date'].map(pd.Timestamp.toordinal)
  
      X = data[['Date']]
      y = data['Price']
  
      # Split the data into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)
  
      # Create a linear regression model
      model = LinearRegression()
  
      # Train the model
      model.fit(X_train, y_train)
  
      # Make predictions
      y_pred = model.predict(X_test)
  
      # Calculate the accuracy of the model
      accuracy = r2_score(y_test, y_pred)
  
      return accuracy