The Two-Fund Separation Theorem introduced by James Tobin, a Nobel Prize-winning economist, is a fundamental concept in investment theory. It addresses how investors can optimally allocate their assets. In an efficient market an optimal portfolio is a combination of a risk-free asset and a market portfolio.

## Asset Allocation

Let’s build a portfolio consisting of Tata Steel and a risk-free asset (which might be government bonds, treasury bills or cash).

Start by building a simple GARCH model for Tata Steel that will enable us to determine how volatility (or risk) changes with time.

```
specification <- ugarchspec(
distribution.model = "norm",
mean.model = list(armaOrder = c(0, 0)),
variance.model = list(model = "sGARCH")
)
fit <- ugarchfit(data = TATASTEEL, spec = specification)
```

Suppose that we want to target a portfolio with 20% annualised volatility. We’ll use the annualised volatility of Tata Steel to derive the proportion that this stock should form in the portfolio. First we need the annualised volatility.

```
annualised <- sqrt(252) * sigma(fit)
```

Now use the inverse of the annualised volatility to find the required proportion of Tata Steel in the portfolio. Since the portfolio will consist of just Tata Steel and a risk-free asset (which by definition has zero volatility), the portfolio volatility depends exclusively on Tata Steel.

```
weights <- 0.20 / annualised
```

Now we can compare the weighting of Tata Steel in the portfolio to its annualised volatility. Observe that as the volatility of the stock increases it should form a smaller proportion of the portfolio.