Portfolio intraday statistics

Definitions

CLOSED.PL_i^{INT}
The sum of profit/loss of all trades up to i-th quote. Concerns only already closed position at last at moment of i-th quote.
ESTIMATED.PL_i^{INT}
The estimated value of all open positions at the i-th moment.
PL_i^{INT}
Profit/Loss: PL_i = CLOSED.PL_i + ESTIMATED.PL_i.
PV_i^{INT}
Portfolio value at the end of day i: PV_i^{INT} = IC + PL_i^{INT}.
R_i
The return of the portfolio at the time when the i-th stock quote is received: R_{i}^{INT} = \begin{cases} 0 & \text{if } i = 1 \text{ or } PV_{i - 1}^{INT} = 0 \\ \frac{PV_{i}^{INT} - PV_{i - 1}^{INT}}{PV_{i - 1}^{INT}} & \text{if } PV_{i - 1}^{INT} \neq 0 \end{cases}.
N^{R+}
The number all of positive returns: N^{R+} = \sum\limits_{i = 1}^{N^{INT}} [\![ R_{i}^{INT} > 0 ]\!].
N^{R-}
The number all of negative returns: N^{R-} = \sum\limits_{i = 1}^{N^{INT}} [\![ R_{i}^{INT} < 0 ]\!].

Simple statistics

Number of Portfolio Intraday Values
The number of all intraday values (stock quotes) is denoted by N^{INT}.
Portfolio Intraday Sum
It is a sum of all intraday portfolio values.

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

Portfolio Intraday Mean
The mean of PV_i^{INT} values is computed as follows:

MEAN_{INT} = \frac{SUM_{INT}}{N^{INT}}

Portfolio Intraday Variance
The estimator of a variance of a portfolio values PV_i^{INT} is computed as follows, the denominator of the below fractional is N^{INT} - 1 because this estimator is unbiased.

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

Portfolio Intraday Standard Deviation
The standard deviation estimator of a portfolio values PV_i^{INT} is computed as follows:

STDDEV_{INT} = \sqrt{VAR_{INT}}

Portfolio Intraday Skewness
The estimator of a skewness of a portfolio values PV_i^{INT} is computed as follows:

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

Portfolio Intraday Kurtosis
The estimator of a kurtosis of a portfolio values PV_i^{INT} is computed as follows:

KURT_{INT} = \frac{\frac{1}{N^{INT}} \sum_{i = 1}^{N^{INT}} (PV^{INT}_{i} - MEAN_{INT})^4}
                     {[\frac{1}{N^{INT}} \sum_{i = 1}^{N^{INT}} (PV^{INT}_{i} - MEAN_{INT})^2]^{2}}

Returns statistics

Highest Period Return
It is the maximum of all portfolio returns. It is defined as follows:

HIGHEST.RETURN = MAX_{i \in \{1, ..., N^{INT}\}} R_{i}^{INT}

Lowest Period Return
It is the minimum of all portfolio returns. It is defined as follows:

LOWEST.RETURN = MIN_{i \in \{1, ..., N^{INT}\}} R_{i}^{INT}

Standard deviation negative returns
The estimator of a standard deviation of all negative returns is computed in the following way. Estimator is unbiased, so the denominator is N^{R-} - 1. Moreover, \bar{R}^{INT}_{-} = \frac{\sum_{i = 1}^{N^{INT}} R_i^{INT} [\![R_{i}^{INT} < 0]\!] }{N^{R+}}.

RETURNS^{-}.ST.DEV = \sqrt{\frac{\sum_{i = 1}^{N^{INT}} [\![R_{i}^{INT} < 0]\!] (R_i^{INT} - \bar{R}^{INT}_{-})^2}{N^{R-} - 1}}

Standard deviation positive returns
The estimator of a standard deviation of all positive returns is computed in the following way. Moreover, \bar{R}^{INT}_{+} = \frac{\sum_{i = 1}^{N^{INT}} R_i^{INT} [\![R_{i}^{INT} > 0]\!] }{N^{R+}}.

RETURNS^{+}.ST.DEV = \sqrt{\frac{\sum_{i = 1}^{N^{INT}} [\![R_{i}^{INT} > 0]\!] (R_i^{INT} - \bar{R}^{INT}_{+})^2}{N^{R+} - 1}}

Max Drawdown Portfolio Return
The maximum drawdown of a portfolio return is computed in the following way:

RETURNS.DRAWDOWN = MAX_{j \in \{1, ..., N^{INT}\}}(MAX_{i \in \{1, ..., j\}} R_{i} - R_{j})

Other statistics

Max Drawdown Portfolio
The maximum drawdown of a portfolio value is computed in the following way:

PV.DRAWDOWN = MAX_{j \in \{1, ..., N^{INT}\}} (MAX_{i \in \{1, ..., j\}} PV_{i} - PV_{j})

Calmar Ratio
The Calmar ratio of a portfolio is a risk index which presents a relation between a mean return and an absolute value of a return drawdown.

CALMAR =
\begin{cases}
\frac{RETURNS.MEAN}{|RETURNS.DRAWDOWN|} & \text{if } RETURNS.DRAWDOWN \neq 0\\
NULL & \text{if } RETURNS.DRAWDOWN = 0
\end{cases}