optimal_weights.m
-CONTAINS AN HYBRID OPTIMIZATION ALGORITHM (optimizer()).
-series:T*N Matrix containing N asset's returns (T data point)
-u_func: utlity function to use(1 mean-variance, 2 exponential utility with I° and II° order moments, 3 exponential utility with I°,II°, III° e IV° order moments)
-select_sim: 0 (in sample simulation, 8 risk adversion level), 1(out of sample simulation with T data point, it uses the exponential smoothin to estimate comoments- SEE co_moments .m file)
OUTPUT:
-data: array containing optimal portfolio weights (depends on the type of simulation, if in sample: each columns contains optimal weights for a given level of risk adversion; if out of sample: each columns contains optimal weights for each time T, given a low and high level of absolute risk adversion, e.g. 2 and 20)
-mean_s: matrix containing portfolio's first order moment
-vcov_s: matrix containing portfolio's second order moment
-cosk_s: matrix containing portfolio's third order moment
-cok_s: matrix containing portfolio's fourth order moment
Cite As
Christopher (2024). optimal_weights.m (https://www.mathworks.com/matlabcentral/fileexchange/47841-optimal_weights-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |