# TWR calculation

Analytics+ calculates performance using the time-weighted return (TWR) approach - this article describes the TWR calculation logic in Analytics+.

These calculation logics as described below are available from FA 3.8 onward - if you are interested in how TWR was calculated prior to version FA 3.8, see How is performance calculated in FA's reports?

## Time-weighted return (TWR) calculation logic

Time weighted return (TWR) calculation logic main features:

• The return is calculated based on daily profits and losses.

• The TWR can be either market value- or exposure-based. The choice can be made on security type level (for more information about the TWR settings, see the Preference - Securities section). By default, futures are exposure-based and other security types are market value-based.

• Supports both long and short position.

### Columns to view the TWR calculation details

You can use Analytics+ to see, how a daily TWR was calculated on the selected position, on the selected date. To do this, choose the date to analyse (both starts and end dates should be equal) and the following columns in Analytics+:

• TWR

• Unrealized profits

• Realized profits

• Other costs

• Other profits

• Daily profit and losses (sum of unrealized profits, realized profits, other costs and other profits)

• Market value (base)

• Absolute exposure (base)

Calculation based on Market value (base):

Equation 3.
$dailyTWR-\frac{urealizedProfits+realizedProfits+otherProfits-otherCosts}{marketValueBase}$

### Calculation details

The daily time weighted return is calculated based on daily profits and losses relative to the base, which is either market value or exposure.

#### Daily time weighted return

$dp{l}_{n}$ – Daily profit and loss on the given day. For more information, see Daily profits and losses .

$mv{b}_{n}$ – Market value base on the given day. For more information, see Market value (base).

${r}_{mvb,n}$ – Daily TWR based on market value.

${r}_{eb,n}$ – Daily TWR based on exposure value

$e{b}_{n}$ – Exposure based on the given day. For more information, see Absolute exposure (base).

${r}_{mvb,n=\frac{dp{l}_{n}}{mv{b}_{n}}-1OR{r}_{eb,n}=\frac{dp{l}_{n}}{e{b}_{n}}-1}$

#### Daily profits and losses

$dp{l}_{n}$ – Daily profit and loss on the given day. For more information, see Daily profits and losses .

$r{p}_{n}$ – Realized profits on the given day.

$ur{p}_{n}$ – Unrealized profits on the given day.

$o{p}_{n}$ – Other profits on the given day (such as dividends, coupons, … ). For more information, see Carried cost - effect of costs and profits on cash positions.

$o{c}_{n}$ – Other costs on the given day (costs from separate cost transactions). For more information, see Carried cost - effect of costs and profits on cash positions.

$dp{l}_{n}=r{p}_{n}+ur{p}_{n}+o{p}_{n}+o{c}_{n}$

#### Market value (base)

Market value (base) is an optional base value, that the daily profit and losses are compared against to get the daily return. The market value (base) is market value in the morning (ie. the end of the previous day’s market value) adjusted by net cash-flows during the date. The net cash-flows affects the market value (base) as follows:

• If the start market value of the day is zero (i.e. position does not exist in the morning):

• If there is positive net cash-flow (no negative net cash-flow) during the day, the positive net cash-flow is added to the market value (base).

• If there is negative net cash-flow (no positive net cash-flow) during the day, the negative net cash-flow pushes the market value (base) to be negative.

• If the start market value of the day is positive (i.e. there is a long position in the morning),

• Any positive net cash-flow during the day is added to the market value (base).

• Any negative net cash-flow during the day is automatically included in the end of the day’s market value and therefore considered in the market value (base) for the next day.

• If the start market value of the day is negative (i.e. there is a short position in the morning), any negative net cash-flow during the day is pushing to the market value (base) further negative.

### Note

On top and portfolio levels, portfolio level net cash-flows are used instead of position level (internal) net cash-flows

#### Absolute exposure (base)

Absolute exposure (base) is an optional base value, that the daily profit and losses are compared against to get the daily return. The absolute exposure (base) is exposure in the morning (ie. the end of the previous day’s market value) adjusted by positive or negative exposure changes during the date. The exposure changes affects the market value (base) as follows:

• If the start exposure of the day is zero (i.e. position does not exist in the morning):

• If there is positive change in exposure during the day, the positive exposure is added to the exposure (base).

• If there is negative change in exposure during the day, the negative change in exposure pushes the exposure (base) to be negative.

• If the start exposure of the day is positive (i.e. there is a long position in the morning), any positive change in exposure during the day is added to the exposure (base)

• If the start exposure of the day is negative (i.e. there is a short position in the morning), any negative change in exposure during the day is pushing to the exposure (base) further negative

Absolute exposure (base) is then absolute (i.e. non-negative) exposure (base).

#### Carried cost - effect of costs and profits on cash positions

FA treats positions from cash accounts by default differently from others - the cost and profit transactions on cash accounts do not affect the cash positions TWR, but instead, the costs and profits are carried to the portfolio level and affects the TWR on that level. The reason for this is, that e.g. management fees are linked to an account but does not make sense on the account level TWR. It is also possible to remove this logic (controlled under security type Cash) and/or apply it to other security types in Preferences - Securities - Security types.

## TWR contribution calculation logic

TWR Contribution is, simply put, the contribution a position (or group) has to the overall TWR this specific position (or group) is part of. The sum of all individual TWR contributions, should sum to the total TWR of the aggregate (for example a portfolio).

TWR Contribution is defined as the contribution a single constituent (e.g. position) has to the total group of constituents (e.g. portfolio). Interpreted as how much a single factor is contributing to a total, and can as such be done on any level or breakdown. E.g. positions can contribute to the total TWR of sector groups, which in turn can contribute to the total portfolio TWR, when split up into such parts. Also known as absolute return attribution. Contribution itself is not done against a benchmark.

Position-level formula:

$cont{r}_{p}$ – Total contribution of a position.

${w}_{p,n}$ – Start weight of a position on a given day.

$cont{r}_{p}={\Sigma }_{n=0}^{N}\left({W}_{p,n}\cdot va{r}_{p,n}\right)$