Portfolio end of day statistics

It is a profit or lose of a strategy computed at the end of a day i. To compute this statistics we treat all quotes from one day as a one big quote and on this base we compute the open, close, highest and lowest price of an instrument for a particular day.

Definitions

CLOSED.PL_i
The sum of profit/loss of all trades up to day i. Concerns only already closed position at last at day i.
ESTIMATED.PL_i
The estimated value of all open positions at the end of the day i.
PL_i
Profit/Loss: PL_i = CLOSED.PL_i + ESTIMATED.PL_i.
PV_i
Portfolio value at the end of day i: PV_i = IC + PL_i.
R_i
The return of the portfolio at the end of the day: R_i = \begin{cases} 0 & \text{if } i = 1 \text{ or } PV_{i - 1} = 0 \\ \frac{PV_{i} - PV_{i - 1}}{PV_{i - 1}} & \text{if } PV_{i - 1} \neq 0 \end{cases}.
C.R_{i}
The cumulative portfolio return at the end of the day: C.R_{i} = \begin{cases} (1 + R_{i})*(1 + C.R_{i - 1}) - 1&  \text{if } i \neq 1 \\ R_{1}& \text{if } i = 1 \end{cases}.
A.R_{i}
The annualized portfolio return: A.R_{i} = \begin{cases} 252 * \frac{C.R_{i}}{i} & \text{if } i \neq 1 \\ 0 & \text{if } i = 1 \end{cases}.
A.R.ST.DEV

The annualized portfolio standard deviation estimator: A.R.ST.DEV = \sqrt{252} * \sqrt{\frac{\sum_{i = 1}^{N^{EOD}} (R_i - \bar{R})}{N^{EOD} - 1}}

where \bar{R} = \frac{\sum_{i = 1}^{N^{EOD}} R_i}{N^{EOD}}.

D.R_{i}
The daily return of a portfolio at the end of a day i: D.R_{i} = \begin{cases} \frac{C.R_{i}}{i} & \text{if } i \neq 1 \\ 0 & \text{if } i = 1 \end{cases}.
DD_{i}
The downside difference between a portfolio return at the end of a day i and the daily return for a day i: DD_{i} = \begin{cases} R_{i} - D.R_{i} & \text{if } R_{i} < 0 \\ 0 & \text{if } R_{i} \geq 0 \end{cases}.
N^{DD}
The number of DD_i which has a value smaller then zero: N^{DD} = \sum_{i = 1}^{N^{EOD}} [\![ DD_{i} < 0 ]\!].
OMEGA.UP
The Omega upside ratio for portfolio at the end of the day: OMEGA.UP = \sum\limits_{i = 1}^{N^{EOD}} (R_{fr} - R_{i}) [\![ R_{fr} - R_{i} > 0 ]\!].
OMEGA.DOWN
The Omega downside ratio for portfolio at the end of the day: OMEGA.DOWN = \sum\limits_{i = 1}^{N^{EOD}} (R_{i} - R_{fr}) [\![ R_{fr} - R_{i} < 0 ]\!].

Simple statistics

Number of portfolio end of day values
It is a number of the days in which strategy was executed. It symbol is N^{EOD}.
Portfolio EOD Sum
It is a sum of a values of the portfolio. It is computed when the strategy is done and it takes to the account all days in which the strategy was active. It defined as follows:

SUM_{EOD} = \sum\limits_{i=1}^{N^{EOD}} PV_{i}

Portfolio EOD Mean
It is average value of a portfolio during the execution of a strategy. Its is defined as follows:

MEAN_{EOD} = \frac{SUM}{N^{EOD}}

Portfolio EOD Variance
It is an estimator of a variance of all portfolio values achieved at the end of the days in which strategy was active. Its is defined as follows, the denominator of the below fractional is N^{EOD} - 1 because this estimator is unbiased.

VAR_{EOD} = \frac{\sum_{i = 1}^{N^{EOD}} (PV_i - MEAN_{EOD})^2}{N^{EOD} - 1}

Portfolio EOD Stddev
It is a standard deviation estimator of all portfolio values achieved at the end of the days in which strategy was active. It is defined as follows

STDDEV_{EOD} = \sqrt{VAR_{EOD}}

Portfolio EOD Skewness
It is a measure of a asymmetry of the distribution of all portfolio values at the end of the days in which strategy was active. It shows in which direction this distribution is moved. Its estimator is defined as follows

SKEW_{EOD} = \frac{\frac{\sum_{i = 1}^{N^{EOD}} (PV_i - MEAN_{EOD})^3}{N^{EOD}}}
                     {[\frac{\sum_{i = 1}^{N^{EOD}} (PV_i - MEAN_{EOD})^2}{N^{EOD} - 1}]^{3/2}}

Portfolio EOD Kurtosis
It is a measure of a “tailedness” of the distribution of all portfolio values at the end of the days in which strategy was active. Its estimator is defined as follows

KURT_{EOD} = \frac{\frac{\sum_{i = 1}^{N^{EOD}} (PV_i - MEAN_{EOD})^4}{N^{EOD}}}
                     {[\frac{\sum_{i = 1}^{N^{EOD}} (PV_i - MEAN_{EOD})^2}{N^{EOD}}]^{2}}

Sharpe ratios

Sharpe ratio
This standard statistic is computed in the following way

SHARPE_{EOD} = \frac{A.R_{N^{EOD}} - R_{fr}}{A.R.ST.DEV}

Sharpe ratio Israelsen modification
It the sharpe ratio is negative then it is reasonable to use its modified variant, the Israelsen modification.

SHARPE_{EOD}^{ISR} =
\begin{cases}
SHARPE_{EOD} & \text{if } A.R_{N^{EOD}} - R_{fr} \geq 0 \\
SHARPE_{EOD} * A.R.ST.DEV^2 & \text{if }A.R_{N^{EOD}} - R_{fr} < 0
\end{cases}

Sortino ratios

Annualized downside risk
Annualized downside risk is computed in the following way, where \bar{DD} = \frac{\sum_{i = 1}^{N^{EOD}} DD_i}{N^{DD}}

DOWN.RISK = \sqrt{252 * \frac{\sum_{i = 1}^{N^{DD}} (DD_i - \bar{DD})}{N^{DD} - 1}}

Sortino ratio

SORTINO_{EOD} = \frac{A.R_{{N}^{EOD}} - R_{fr}}{DOWN.RISK}

Other ratios

Omega ratio
The Omega ratio for the portfolio at the end of the day. It is computed in the following way.

OMEGA =
\begin{cases}
\frac{OMEGA.UP}{OMEGA.DOWN} & \text{if } OMEGA.DOWN \neq 0 \\
NULL & \text{if } OMEGA.DOWN = 0
\end{cases}