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

Drawdowns due to buying high, selling low

The volatility, semi-deviation, value-at-risk, and expected shortfall are all measures that describe risk over one period. These metrics do not do a great job at describing the worst-case risk of buying at a peak and selling at a trough. This sort of risk can be quantified by analyzing the portfolio's drawdowns, or peak-to-trough decline in cumulative returns.

The function table.Drawdowns() in PerformanceAnalytics reports the five largest drawdown episodes over a sample period. The package also has another function chart.Drawdown() to visualize the evolution of the drawdowns from each peak over time.

You will now explore the historic drawdown episodes of the monthly returns of the S&P 500. The returns are loaded into your workspace as sp500_monthly.

Bu egzersiz

Introduction to Portfolio Analysis in R

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

Egzersiz talimatları

  • Calculate the five largest drawdowns using table.Drawdowns().
  • Visualize the drawdowns of the monthly returns using chart.Drawdown().

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Table of drawdowns


# Plot of drawdowns
Kodu Düzenle ve Çalıştır