input: Write a function to create a decision tree model for predicting the stock value based on a given csv file containing stock data from the last 3 months. The function should load the data, split it into training and testing sets, train the decision tree model, and then print the model's accuracy. The csv file is named 'stockdata.csv'.
  assert decision_tree("stockdata.csv") == 'Model accuracy: 0.92'
  assert decision_tree("otherdata.csv") == 'Model accuracy: 0.85'
  assert decision_tree("nodata.csv") == 'Error: File not found'
  assert decision_tree("wrongformat.csv") == 'Error: File format not supported'
output: def decision_tree(filename):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.tree import DecisionTreeClassifier
      from sklearn.metrics import accuracy_score
      
      try:
          data = pd.read_csv(filename)
      except FileNotFoundError:
          return 'Error: File not found'
      except pd.errors.ParserError:
          return 'Error: File format not supported'
      
      X = data.drop('stock_value', axis=1)
      y = data['stock_value']
      
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      model = DecisionTreeClassifier()
      model.fit(X_train, y_train)
      
      y_pred = model.predict(X_test)
      accuracy = accuracy_score(y_test, y_pred)
      
      return f'Model accuracy: {accuracy:.2f}'