Portfolio Modelling Explained

The “In Sample” and “Out of Sample” walk forward testing 

We update our model every year and we backtest its performance in the following years

The Algebra

Rn= (S1n* α1n) + (S2n * α2n) + (S3n * α3n) + (S4n * α4n) + …… + (Sxn * αxn)

S = returns on security

α = % capital allocation

x= security number

n= condition number

Sxn= Returns on security “x” when condition “n” is satisfied, i.e. S32= returns on security 3 when condition 2 is satisfied

Rn = Portfolio Returns when “n” condition is satisfied ( i.e. R1 =Portfolio returns when under condition 1)

αsn = takes values between 0 and 1 for long only positions (% capital allocation), per each security “x”  when “n” condition is satisfied (i.e. α21 = (% capital allocation applied to security 2 when condition 1 is satisfied)

Rp= Portfolio Returns = Sum(R1 to Rn)

Our code looks like:

R1= S11 * αs11+ S21 * α21+ S31 * α31+ S31 * α31+ Sx1 * αx1
R2= S12 * α12+ S22 * α22+ S32 * α32+ S42 * α42+ Sx2 * αx2
Rn= S1n * α1n+ S2n * α2n+ S3n * α3n+ S4n * α4n+ Sxn * αxn

and we maximise  Rp  subject to:

(α11 + α21 +…..+α x1) = 1
…… = 1
(α1n + α2n +…..+α xn) = 1

Depending on the model we may want minimise the volatility, the max loss from the portfolio peak value, the number of transactions or maximise the trend, the probability to beat the benchmark etc.


The Risk Assesment

Value at Risk (VaR)

(coming soon)

Maximun DrawDown (MDD)

(coming soon)