BaşlayınÜcretsiz Başlayın

Visualize results

Now that we have run the optimization, we would like to take a look at the output and results. Recall that the optimization output is in a variable named opt. In our case, for the portfolio optimization in the previous exercise, we are interested in the optimal weights and estimated objective value. The weights are considered optimal in the sense that the set of weights minimizes the objective value, portfolio standard deviation, and satisfies the full investment and long only constraints based on historical data.

Note that you won't recognize some of these functions right now. Don't worry! They will all be introduced throughout the course.

Bu egzersiz

Intermediate Portfolio Analysis in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Print the output of the optimization from the previous problem. The output is stored in a variable named opt.
  • Extract the optimal weights with extractWeights().
  • Chart the optimal weights with chart.Weights().

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Print the results of the optimization


# Extract the optimal weights


# Chart the optimal weights

Kodu Düzenle ve Çalıştır