def process_inputs(data):
    """
    Process user inputs and apply default values if parameters not specified.

    Parameters
    ----------
    data : dict
        User input containing model parameters

    Returns
    -------
    out : dict
        Model data in format that allows construction of the Pyomo model
    """

    # Extract symbols for assets
    assets = list(data['initial_weights'].keys())

    # Number of intervals over multi-period optimisation horizon
    periods = [len(v.keys()) for k, v in data['estimated_returns'].items()][0]

    # Estimated return for each interval
    estimated_returns = {
        (i, int(k)): v for i, j in data['estimated_returns'].items() for k, v in j.items()
    }

    # Extract model parameters
    parameters = data.get('parameters', {})

    data = {
        'S_ASSETS': assets,
        'S_PERIODS': range(1, periods + 1),
        'S_TIME_INDEX': range(1, periods + 2),
        'P_RETURN': estimated_returns,
        'P_INITIAL_WEIGHT': data['initial_weights'],
        'P_MIN_WEIGHT': parameters.get('min_weight', -1),
        'P_MAX_WEIGHT': parameters.get('max_weight', 1),
        'P_MIN_CASH_BALANCE': parameters.get('min_cash_balance', 0),
        'P_MAX_LEVERAGE': parameters.get('max_leverage', 1),
        'P_MAX_TRADE_SIZE': parameters.get('max_trade_size', 1),
        'P_TRADE_AVERSION': parameters.get('trade_aversion', 1),
        'P_TRANSACTION_COST': parameters.get('transaction_cost', 0.001),
    }

    return data