Weekly maintenance every saturday 03:00 - 06:00 UTC

Quickstart:

1.

Register on website and click this link to download the data example for portfolio optimization.

2.

Unzip the downloaded zip archive. There will be three folders - all_stock_data folder which contains the example files with all the stock prices, etc... to optimize portfolio not using the website's stock data, the universe_data folder which contains the file with list of tickers - tickers.csv to optimize portfolio using the website's stock data, and two files - viewdict.csv with view data and confidences.csv with confidence data for the Black - Litterman model, and the portfolio_setting folder which contains the preconfigured portfolio settings files. Now go to the Optimize portfolio page (the link is located at the left sidebar).

3.

Go to the Optimize page. Now you can either click on the button "Read settings..." to load the portfolio settings from a preconfigured settings file (these are in the folder portfolio_settings/mean_variance_optimization of the unzipped archive), then set the desired number of years, number of months for the time horizon, and choose the tickers.csv file from the uploaded earlier universe_data folder, then click the Optimize button.

Alternatively you can follow the instructions below to set the portfolio settings manually.

Example of the portfolio settings using the internal data source:
  1. Ensure that Upload the stock data from my computer (use intrinsic stock data source if unchecked) checkbox is unchecked.
  2. Ensure that Upload the stock data from my computer (use intrinsic stock data source if unchecked) checkbox is unchecked.
  3. Ensure that Use close prices for statistics calculation (use the adjusted close prices if unchecked) checkbox is checked. You can leave this checkbox checked if you like, but in this case you will use the adjusted close prices instead of close prices.
  4. Click button Choose File right under caption Choose stock universe file, choose the tickers.csv file from the uploaded earlier universe_data folder.
  5. Set the desired number of years, number of months for the time horizon.
  6. Ensure that value of Choose type of calculation of mean returns and covariance matrix control value set to Independent.
  7. Ensure that value of Choose type of mean historical return calculation control set to Mean historical return.
  8. Ensure that value of Choose type of covariance matrix calculation control set to Sample covariance.
  9. Ensure that value of Choose optimization method control set to Mean - variance optimization.
  10. Ensure that value of Choose optimization type for Mean - variance optimization control set to Minimize volatility.
  11. Click the button Optimize at the bottom of the page.
  12. After you see the message Now you can take a look at your optimization result at the log window, check if there were warnings.
  13. Click the Optimization result... button to view you optimization results. Note that you can sort or search your optimization result tables. To search table enter your search sequence in the Search field, to sort the table by column values mouse-click the corresponding column header.
  14. To save your portflio settings to a file, click the button Save settings.
    To load your portfolio settings from a saved file, click the button Read settings... and choose a portfolio settings file saved earlier.
  15. To export the portfolio optimization results to XLSX file, click the button Export report to XLSX .
  16. If you see the error message Error: 0 - after you clicked button Optimize, just reload the page.

Example of calculation using own data files:
It's basically the same procedure, with one difference - you have to check the checkbox Upload the stock data from my computer (use intrinsic stock data source if unchecked), click the button Choose file under the Choose stock data folder caption and choose the all_stock_data folder from the unzipped archive you uploaded earlier.
File description.
Folder all_stock_data:

- adj_clos.csv is a csv file with historical prices for stocks.
- close.csv is a csv file with close prices for stocks for previous day.
- index_prices.csv is a csv file with index prices for some index used for Black - Litterman model calculation.
- viewdict.csv is a csv file with expected return views data for Black - Litterman model calculations.
- confidences.csv is a csv file with view confidences data for Idzorek model calculations.
- mcaps.csv is a csv file with market caps data for Black - Litterman model calculations.
- sector.csv is a csv file with sector data for stocks.
- data_info.csv is a json file with version data and index symbol.

Folder universe_data:

- tickers.csv is a csv file which contains a list of tickers to use in the portfolio optimization.
- viewdict.csv and confidences.csv files have the same meaning and format as the ones for all_stock_data folder.

Folder portfolio_settings/mean_variance_optimization:

There are the portfolio settings examples for the different types of mean-variance optimization;
All of the setting examples can be loaded by clicking on the button Read settings... on the optimize webpage and choosing the corresponding file.

maximize_quadratic_utility.json - this is a settings file for maximizing quadratic utility for a given value of the risk aversion.

maximize_return.json - this is a settings file for maximizing portfolio return for a given value of the target volatility.

maximize_sharpe.json - this is a settings file for maximizing Sharpe ratio.

minimize_risk.json - this is a settings file for minimizing portfolio volatility for a given value of the target return.

minimize_risk.json - this is a settings file for minimizing portfolio volatility for a given value of the target return.

minimize_volatility.json - this is a settings file for minimizing the portfolio volatility.

See also:
Optimizing Sharpe ratio article.