![]() ![]() So instead of having $101m exposure to the equity index on day two and $95m of exposure to the hedge fund, we will instead rebalance (at zero cost) so that we have $96m of exposure to each. 100% to each of the two strategies.Īs these are just notional exposures with ample cash collateral, we can just adjust the amounts. For the purpose of attribution, however, I believe it makes total sense to rebalance daily, i.e. Each is a separate portfolio that drifts on forever. Our fund is now at $96m.ĭay two, how do we rebalance? Your calculations imply that we never do. The uncorrelated hedge fund, however, delivered an excess return of -5%. On day one, the stock index is up just over 1% (an excess return of exactly 1.00% after deducting the cash expense for the day). We will conveniently assume that both swap transactions are collateralized by the cash account, and that there are no transaction costs (if only.!). Now you can think of your portfolio as three transactions, one cash and two derivative transactions:Ī) Invest your $100m in a cash account, conveniently earning the offer rate.ī) Enter into an equity swap for $100m notionalĬ) Enter into a swap transaction with a zero beta hedge fund, again for $100m notional. daily, monthly, etc.).Īssume you have a rich uncle who lends you $100m to start your fund. subtract the appropriate cash return for the respective period (e.g. If you are looking at cumulative returns as is the case above, then one way you perform your analysis is as follows:Įnsure the portfolio returns and the benchmark returns are both excess returns, i.e. Part of the issue lies in the goal of the analysis, i.e. Mixing single period and multi-period attribution is always always a challenge. This is always a troubling situation, as it indicates that some sort of leakage may be occurring in your model. You may have noticed that your individual components do not equal the whole, either in an additive or geometric manner: > cum.tail(1) Mdd, sd, ed = max_draw_down_relative(p, b)į, a = plt.subplots(2, 1, figsize=)Ĭum].plot(title='Cumulative Absolute', ax=a)Ī.axvspan(sd, ed, alpha=0.1, color='r')Ĭum].plot(title='Cumulative Active', ax=a) The drawdown caclulation can now be made analogously using the formula above: dd = (p * b0 - b * p0) / (p0 * b0) p0 = pd.Series(p.ix.values, index=p.index)ī0 = pd.Series(b.ix.values, index=b.index) So, we generate a series of ' whens' captured in cam ( cumulative arg max) and subsequent series of portfolio and benchmark values at those ' whens'. The difference is that we want to keep track of what the p and b were at this time and not the difference itself. We get this series of cumulative active returns with p - b. Similar to the absolute case, at each point in time, we want to know what the maximum cumulative active return has been up to that point. P0 = pd.Series(p.iloc.values, index=p.index)ī0 = pd.Series(b.iloc.values, index=b.index) This is how we can extend the absolute solution: def max_draw_down_relative(p, b):Ĭam = pmb.expanding(min_periods=1).apply(lambda x: x.argmax()) The active return from period j to period i is: the variables below are assumed to already be in cumulative return space. Starting with a series of portfolio returns and benchmark returns, we build cumulative returns for both. I wanted to follow up by asking how others are calculating maximumĪssumes that the solution will extend on the solution above. The max drawdown is then just the minimum of all the calculated drawdowns. ![]() r = returns.add(1).cumprod()Īt each point in time, the current drawdown is calcualted by comparing the current level of the return index with the maximum return index for all periods prior. We start by generating a series of cumulative returns to act as a return index. It takes a return series and gives back the max_drawdown along with the indices for which the drawdown occured. This is what I implemented for max drawdown based on Alexander's answer to question linked above: def max_drawdown_absolute(returns): I wanted to follow up by asking how others are calculating maximum active drawdown? This calculates Max Drawdown. I recently asked a question about calculating maximum drawdown where Alexander gave a very succinct and efficient way of calculating it with DataFrame methods in pandas. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |