#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include "wu.h"
Go to the source code of this file.
|
| #define | SORTINO_MIN_OBSERVATIONS 30 |
| | The Sortino Ratio is a variation of the Sharpe Ratio that differentiates between harmful volatility (downside) and total volatility.
|
◆ SORTINO_MIN_OBSERVATIONS
| #define SORTINO_MIN_OBSERVATIONS 30 |
The Sortino Ratio is a variation of the Sharpe Ratio that differentiates between harmful volatility (downside) and total volatility.
It uses only the standard deviation of negative returns (downside deviation) in the denominator.
Formula: Sortino = (R_p - R_f) / σ_d where:
R_p = mean portfolio return (annualized) R_f = risk-free rate (annualized) σ_d = downside deviation (annualized) Minimum number of observations required for statistically meaningful Sortino ratio calculation. Below this threshold, the ratio is unreliable.
Definition at line 24 of file sortino.c.
◆ wu_sortino_ratio_free()
| void wu_sortino_ratio_free |
( |
WU_SortinoRatio | self | ) |
|
|
static |
Frees resources allocated by the Sortino Ratio object.
Definition at line 95 of file sortino.c.
◆ wu_sortino_ratio_new()
| WU_SortinoRatio wu_sortino_ratio_new |
( |
double | initial_value, |
|
|
double | risk_free_rate ) |
Creates a new Sortino Ratio calculator.
Definition at line 105 of file sortino.c.
◆ wu_sortino_ratio_update()
Updates the Sortino Ratio calculation with a new portfolio value.
Definition at line 29 of file sortino.c.