input: Write a function to construct a decision tree algorithm for predicting the value of a stock using stock data from the last 3 months. The function should load the stock data from a CSV file, split the data into training and testing sets, train a decision tree classifier, and print the model's accuracy.
  
  assert predict_stock_value("stockdata.csv")=='Model accuracy: 0.75'
  assert predict_stock_value("anotherstockdata.csv")=='Model accuracy: 0.82'
  assert predict_stock_value("emptystockdata.csv")=='Model accuracy: 0.0'
  assert predict_stock_value("imbalanceddata.csv")=='Model accuracy: 0.55'
  assert predict_stock_value("corruptdata.csv")=='Error: Data loading failed'
output: def predict_stock_value(filename):
      try:
          import pandas as pd
          from sklearn.model_selection import train_test_split
          from sklearn.tree import DecisionTreeClassifier
          from sklearn.metrics import accuracy_score
          
          data = pd.read_csv(filename)
          if data.empty:
              return 'Model accuracy: 0.0'
          
          X = data.drop('target', axis=1)
          y = data['target']
          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}'
      except Exception:
          return 'Error: Data loading failed'