Header image  
Open Source Finance
 
 
    home
 
Portfolio Optimization

Portfolio optimization is a good demonstration of an optimization algorithm as it's easily visible, and the purpose and process is somewhat intuitive.

When optimizing weights of assets within a portfolio, the formulas can be arranged several ways; minimize variance for any return, maximize return for any variance, or maximize a utility function given a risk aversion coefficient. I have implemented the first and third methods for Active Set and Interior Points. Beyond the simple problem with no short selling and a contraint that the portfolio is fully invested, I also added logic to allow the user to speciy arbitrary constraints on the weights and in a separate algorithm added an entropy based diversification constraing using Interior Point methods.

Another new addition to the portfolio optimization suite is support for what is known as State/Preference Theory where the optimization process ranks assets by state and then optimizes over the mean state and covariance of the state, or some combination of this and the regular mean/covariance data. State based estimates are more robust and yield more diversified portfolios.

I picked up another stray paper on minmizing entropy for a given return and implemented that model using a constrained newton solver. This is sort of an interesting model to observe as the entropy function forces significant diversification and also very smooth curves when the weight to each asset is viewed versus the target return on a graph.

 

 

What is akutan?

General Optimization

Portfolio Optimization

Other Tools

Javadocs