Diversification
If you want to diversify more or less your portfolio, there are 2 ways to do it with Empyrial:
By using
min_weights
andmax_weights
:
Let's take this example:
Output
[0.0, 0.0, 0.02258, 0.97742, 0.0]
As you can see the allocation is very clustered around AMD and this is a problem. To solve that, we can do:
Output
[0.05, 0.05, 0.2, 0.35, 0.35]
So, we can tune these two parameters (min_weights
and max_weights
) in order to get a better allocation.
The second way is by using
diversification
(works with every optimizer except the Efficient Frontier, "EF"):
diversification
's default value is 1.
The higher is this value, the more it diversifies the portfolio and gets closer to equal weighting.
The lower is this value, the less it diversifies the portfolio.
Example:
Last updated