Supplementary matlab code for the paper Modeling asset allocations and a new portfolio performance score, Digital Finance, Springer 2021.
- Installation
To install the dependencies, set the working space to the root of this repository and run
install- Execution of the code
To run the code, the main function is compute_scores. The inputs of the function are:
sigma: The estimation of the covariance matrix of the distribution of the assets' returns.mu: The estimation of the mean of the distribution of the assets' returns.asset_returns: The vector of the assets' returns to evaluate the performance of the portfolio.Ptf: The portfolio to evaluate its performance.num_risk_levels: The number of levels of risk of the allocation strategies in the stock market.num_dispersion_levels: The number of levels of dispersion for each level of risk of the allocation strategies in the stock market.risk_behavioral_function: The behavioral function for the risk of the allocation strategies.dispersion_behavioral_function: The behavioral function for the dispersion of each risk level.
The outputs of the function are:
parametric_score: The parametric score of the input portfolio.Ws: The sequence of weight vectors corresponding to each score in the vector of parametric score.bias_vector: The bias vector computed by the input behavioral functions.mean_score: The mean score.a_sequence: The sequence of the parameters that control the level of dispersion for each risk level.q_sequence: The sequence of the parameters that control the level of risk of the allocation strategies.volatility_sequence: The sequence of portfolio volatilities corresponding to theq_sequence.
You can also see the code in the script example.