Skip to contents

Calculate the Sortino ratio, which only considers downside deviation.

Usage

calc_sortino(returns, rf_rate = 0, target_return = 0, periods = 252)

Arguments

returns

Numeric vector of returns

rf_rate

Risk-free rate (default: 0)

target_return

Target return (default: 0)

periods

Number of periods per year (default: 252 for daily data)

Value

Numeric value representing the Sortino ratio

Examples

if (FALSE) { # \dontrun{
returns <- c(0.01, 0.02, -0.01, 0.03)
calc_sortino(returns, rf_rate = 0.02/252, periods = 252)
} # }