Вы находитесь на странице: 1из 17

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/331899034

Momentum in the Indian Equity Markets: Positive Convexity and Positive


Alpha

Article  in  SSRN Electronic Journal · January 2019


DOI: 10.2139/ssrn.3345280

CITATIONS READS

0 138

3 authors:

Gaurav Chakravorty Sonam Srivastava


Qplum Qplum
13 PUBLICATIONS   22 CITATIONS    9 PUBLICATIONS   10 CITATIONS   

SEE PROFILE SEE PROFILE

Mansi Singhal

8 PUBLICATIONS   0 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Dynamic Currency Hedging View project

Online learning in finance View project

All content following this page was uploaded by Sonam Srivastava on 23 April 2019.

The user has requested enhancement of the downloaded file.


Momentum in the Indian Equity Markets: Positive
Convexity and Positive Alpha
∗1 †1 ‡1
Sonam Srivastava , Gaurav Chakravorty and Mansi Singhal
1
Qplum

February 2019

Abstract
We present effective momentum strategies over the liquid equity futures mar-
ket in India. We evaluate and determine the persistence of the returns at various
look-backs ranging from quarterly and weekly to more granular look-backs. We
look at a universe of the liquid equity instruments traded across the Indian markets
to evaluate this anomaly. We evaluate momentum across the two datasets based
on frequency - daily data and intraday bar data. On the daily scale we compare
momentum with other style factors. In the intraday scale we evaluate time se-
ries momentum or absolute momentum and cross-sectional momentum or relative
momentum. We demonstrate that at the optimal horizon, momentum strategies
on securities in India can be a source of uncorrelated alpha. We use active risk-
budgeting at a given target risk for portfolio construction. We will show in a
separate publication how it outperforms mean-variance optimization.

Keywords— tactical asset allocation, time series momentum, quantitative


portfolio management, asset pricing, futures pricing, international financial mar-
kets, market efficiency

1
Qplum is a global investment management firm, which may or may not apply
similar investment techniques or methods of analysis as described herein. The views
expressed here are those of the authors and not necessarily those of Qplum. We would
like to thank Dr Michael Steele for his valuable comments and research assistance. Please
refer to important disclosures at the end of this document.
2
We would like to thank Gaurav Raizada, CIO iRage MarterTrust Investement
Managers LLC for his valuable review and encouragement of the research.
∗ sonam@qplum.co
† gchak@qplum.co
‡ msinghal@qplum.co

1
1 Introduction
Momentum is one the most debated yet the most popular factor influencing equity mar-
ket returns. Momentum is defined as the strong predictive power of past returns in
influencing future returns. In its simplest form one looks at the past returns of the
instrument as the signal influencing future returns. A momentum-based investing ap-
proach can be confusing to investors who are often told that chasing performance is a
mistake and it is impossible to time the markets. Yet as a systematic strategy, mo-
mentum sits upon nearly a quarter century of positive academic evidence and a century
of successful empirical results, with the most notable research on the phenomenon by
Jegadeesh and Titman in their seminal paper Returns to Buying Winners and Selling
Losers: Implications for Stock Market Efficiency [JT].
The momentum anomaly is difficult to explain with the efficient market hypothe-
sis, where price change is warranted only by changes in demand and supply or new
information. Momentum finds a basis in behavioral finance attributing it to various
cognitive biases in irrational investors like herding behavior, confirmation bias, initial
under-reaction and delayed overreaction. This is wonderfully explained with historical
context by Corey Hoffstein in Two Centuries of Momentum [Cor18].

Figure 1: Stylized Plot of the life cycle of a trend. Source: Qplum (for illustrative
purposes only)

We suspect that the convex returns of this anomaly along with a positive skew are not
just a function of the style premia but largely dependent on the rebalancing frequency or
the turnover. Increasing the rebalancing frequency increases the returns of this strategy
but the added costs related to turnover limit the scope.
In our approach, we investigate the trend signal based on previous returns to model
the anomaly. We look at a universe of around 100 liquid equity futures instrument across
sectors to demonstrate the strategy returns. We start with the long term horizon of one
year and move on to shorter horizons of 3 months, one month to see the transaction cost
adjusted returns and the effect on turnover. We further look at much shorter horizons,

2
where we use intraday bar data to get the signal at 10 days, 5 days and 3 days look-
backs. The exercise demonstrates the optimal rebalancing frequency for this strategy
given the cost constraints.
In the cross sectional framework we look at sector wise long-short strategies where
we keep the net exposure within a controlled limit. We also present a multi-strategy
framework with one strategy per sector which we combine in a equal weighted fashion.
We evaluate the returns of the final strategy in an unbiased walk-forward fashion.
For position sizing we use a risk budgeting framework that targets a given portfolio
risk while trying to keep the allocations proportional to the indicator values looking the
risks and correlation of individual assets.

2 Literature review
The paper titled Time series Momentum by Moskowitz et al [MOP12] was the ground
breaking paper on the topic where the authors document significant “time series momen-
tum” in equity index, currency, commodity, and bond futures for each of the 58 liquid
instruments. The authors find persistence in returns for 1 to 12 months that partially
reverses over longer horizons, consistent with sentiment theories of initial under-reaction
and delayed over-reaction.
Clifford Asness et al in [AFIM14] do myth busting of various confusing theories
around the momentum anomaly. They bust myths like - momentum returns are small
and sporadic, momentum cannot be captured by long-only investors, momentum is only
present in smaller stocks, momentum is limited by trading cost among others in this
fairly digestive read.
Korowski et al in [BK17] examine the effect of key components of time-series momen-
tum strategies on their turnover and performance from 1984 until 2013 motivated by
studies of the impact of frictions on asset prices. They show that more efficient volatility
estimation and price trend detection can significantly reduce portfolio turnover by more
than one third, without causing a statistically significant performance penalty.
Benjamin Bruder et al in [BDR11] review the different econometric estimators to
extract a trend of a time series. They distinguish between linear and non-linear models
as well as univariate and multivariate filtering. For each approach, they provide a
comprehensive presentation, an overview of its advantages and disadvantages and an
application to the SP 500 index.
In the Indian context S K Agarwalla et al in [AJV14] compute the Fama-French and
momentum factor returns for the Indian equity market. They do a comprehensive study
including an extensive set of firms in the Indian markets and show that the average
annual return of the momentum factor was 21.9% in the period studied (1993-2013).
Tariq Aziz et al in [AA13] study the momentum and illiquidity premia in the Indian
equity markets. They show that illiquidity premium is more pronounced among winners.
Illiquid winners outperform liquid winners by an average 2.7% per month. We report
that the performance of momentum strategy could be enhanced by conditioning on past
illiquidity.This remains robust after adjusting for size and value effect.
Sahil Jain et al in [JMGK13] examine three important propositions in Indian context
(1) Do momentum profits persist for long time periods?, (2) Can these momentum
profits be absorbed by risk models?, and (3) Is stock momentum an outcome of sector
momentum?. They develop 6-6 and 12-12 investment strategies based on past returns as
well as company characteristics. They find momentum profits in Indian context for our
prior return portfolios which are stronger for 6-6 compared to 12-12 strategies. These
momentum profits are larger for some characteristic sorted portfolios.

3
3 Portfolio Construction Methodology
We create 2 types of momentum strategies on the liquid equity securities on the Indian
markets - using end of day data as well as intraday data. The strategy using daily data
models the momentum style factor, while the intraday momentum strategies are on the
theme of time series momentum and relative sector momentum.
The broader methodology used is as summarized in Fig. 2. In the following sections,
we describe of each of these steps in more detail.

Figure 2: Portfolio Construction Methodology : First we create strategies that are


based on individual indicators through indicator construction, normalization, and posi-
tion sizing. Then we combine individual strategies together to get the final portfolio.

3.1 Momentum Factor - based on daily data


We model the momentum style factor based on the time series momentum implementa-
tion.

3.1.1 Time Series Momentum


In the time series momentum or absolute momentum or trend following strategies in-
vestors compare a security against its own historical performance. The system buys
positive returning securities and sells short, negative returning securities.
We use the n-day risk-adjusted returns as our indicators in these strategies, this n-
day period is called the lookback. The portfolio is rebalanced at specific intervals, this
interval is called rebalancing frequency.
The strategy is evaluated from 2010 to 2019. We apply this strategy first on all
components of the Nifty 50 Index, which consists of the top 50 securities in the Indian
markets based on their market caps. We incrementally apply the strategy on top 100
and top 200 stocks ranked on market capitalization for comparison. We assume a round
trip cost of 5 bps on the transactions.

Position Sizing We get the sign normalized indicator values in the range and use risk
budgeting to come up with allocation for each indicator. The risk budgets are taken to
be proportional to the absolute value of normalized indicator values and total risk of
the allocation is set to 15% annualized for all indicators. A constant risk target is used
across all indicators to ensure that returns from each indicator are comparable when we
allocate across different indicators in the following section.

4
X
RBst = (|N Ist |/( |N Ist |)) ∗ τ
s

where, τ is the target risk of the allocation (10%)


RBst is the risk budget for security s at time t

However, as opposed to the common practice of having positive allocation for all
securities in risk budgeting allocation, we retain the sign of the normalized indicator
values and allow negative allocation. We solve the following modification of risk bud-
geting optimization to allow for negative weights. Dropping the index t over time below
for ease of notation.

Find weights ws that minimize


2
P
s (RCs − RB
P s)
RCs = ws ∗ (P · w)s
such that, wT · · w = τ ,
ws ∗ sign(N Is ) ≥ 0

where, RCs is the risk contribution due to security s


P
is the covariance matrix over the traded securities.
We additionally constraint the leverage to be in with the absolute limits of 150%.

Lookbacks and Rebalancing Frequencies The lookbacks and rebalancing frequen-


cies are detailed below.

Lookback (days) Rebalancing frequency (days)


252 10, 5
126 10, 5
63 10, 5
21 10, 5

Table 1: The lookbacks and rebalancing frequencies tried for timeseries momentum
using daily data

Comparison with other factors We implement the value factor as earnings by


price ratio, growth factor as short term earnings growth and the quality factor as return
on assets in a similar position sizing and rebalancing framework to compare the style
factors.

3.2 Intraday Momentum


The two strategies implemented here are based on the intraday (minute bar) data of the
securities.

3.2.1 Time Series Momentum


The implementation of this strategy is described in 3.1.1. The salient differentiating
points are given below.

5
Position Sizing We get the normalized indicator values in the range and use a sim-
plified version of risk budgeting to come up with allocation for each indicator. The risk
budgets are taken to be proportional to the absolute value of normalized indicator values
and total risk of the allocation is set to 15% annualized for all indicators.
X
RBst = (|N Ist |/( |N Ist |)) ∗ τ
s

where, τ is the target risk of the allocation (10%)


RBst is the risk budget for security s at time t

There is no optimization on weights, but they are scaled such that the risk is set to
15% and the sum of weights or exposure is of the scale of 100%.

Lookbacks and Rebalancing Frequencies The lookbacks and rebalancing frequen-


cies are detailed below.

Lookback (days) Rebalancing Frequency (minutes)


5 60
5 30
3 60
3 30

Table 2: The lookbacks and rebalancing frequencies tried for timeseries momentum
using intraday data

3.2.2 Cross Sectional Momentum


In the cross sectional momentum or relative momentum or relative strength strategies
investors compare securities against each other’s performance. They favor buying out-
performing securities and avoiding – or short-selling – underperforming securities.
We use the n-day risk-adjusted returns as our indicators in these strategies, this n-
day period is called the lookback. The portfolio is rebalanced at specific intervals, this
interval is called rebalancing frequency.
We apply this strategy on baskets of futures contracts on 12 sectors on the Indian
equity markets. The definition of the sector and the components is explained in the
appendix. The strategy is evaluated from 2010 to 2019.

Position Sizing The position sizing is similar to the one explained above in section
3.2.1. We construct a strategy per sector and allocate equally to each of the 12 strategies
to get the final portfolio.

Lookbacks and Rebalancing Frequencies The lookbacks and rebalancing frequen-


cies are detailed below.

Lookback (days) Rebalancing Frequency (minutes)


5 60
5 30
3 60
3 30

Table 3: The lookbacks and rebalancing frequencies tried for relative momentum using
intraday data

6
1
4 Results
The risk and return statistics for the strategies implemented using the above method-
ologies are detailed below.

4.1 Momentum Factor - based on daily data


This analysis is done using futures instruments.

4.1.1 Comparison across lookbacks and rebalancing frequencies

Annualized Returns (%) Annualized Risk (%) Sharpe Ratio Worst Drawdown (%)
126 days/ 10 days 7.08 16.41 0.40 22.84
126 days/ 5 days 5.64 16.44 0.31 22.96
21 days/ 10 days 6.62 16.21 0.38 31.55
21 days/ 5 days 5.39 16.24 0.30 32.54
252 days/ 10 days 7.58 15.48 0.46 25.40
252 days/ 5 days 7.12 15.62 0.42 23.66
63 days/ 10 days 3.35 16.30 0.18 26.87
63 days/ 5 days 5.46 16.48 0.30 27.80

Figure 3: We see that the returns of the momentum style factor based strategies are
high for long term lookback of one year after which it starts decreasing. It again recovers
at a smaller lookback of one month. This gives an idea about the long term and short
trend formation and trend persistence patterns.

2 The description of the descriptive statistics quoted is given in the appendix

7
4.1.2 Comparison with other style factors
This analysis is done using equity instruments.
For the Nifty 50 universe

Annualized Returns (%) Annualized Risk (%) Sharpe Ratio Worst Drawdown (%)
Long term momentum 7.58 15.48 0.46 25.40
Short term momentum 6.62 16.21 0.38 31.55
Value 1.96 16.07 0.09 34.76
Growth 6.81 15.93 0.40 32.14
Quality 7.15 15.63 0.43 24.67

Figure 4: We see that the returns of the long term momentum style factors outperform
other style factors followed by quality, growth and short term momentum.

For the Nifty 100 universe

Annualized Returns (%) Annualized Risk (%) Sharpe Ratio Worst Drawdown (%)
Long term momentum 16.02 15.10 1.03 16.24
Short term momentum 12.80 16.20 0.76 24.78
Value 2.43 15.52 0.13 32.17
Growth 19.97 15.81 1.23 20.93
Quality 17.94 15.96 1.09 20.57

Figure 5: We see that the momentum style factors lag the growth and quality factors
as we increase the universe to include the top 100 stocks

For the Nifty 200 universe

8
Annualized Returns (%) Annualized Risk (%) Sharpe Ratio Worst Drawdown (%)
Long term momentum 8.56 16.08 0.50 29.92
Short term momentum 9.53 16.40 0.55 35.76
Value 1.27 15.85 0.05 36.19
Growth 12.06 16.32 0.71 33.32
Quality 17.81 15.88 1.09 22.15

Figure 6: Upon using a even larger dataset the momentum strategies greatly under-
perform the quality and growth factors.

4.2 Intraday Momentum


4.2.1 Time Series Momentum
The results for the time series momentum strategy on intraday data are presented below
using the strategy return charts, descriptive statistics and a graphical representation of
key statistics.

9
Annualized Returns (%) Annualized Risk (%) Sharpe Ratio Worst Drawdown (%)
3 days/ 30 mins 12.83 12.95 0.95 13.89
3 days/ 60 mins 12.36 12.81 0.93 13.44
5 days/ 30 mins 8.29 13.00 0.60 16.42
5 days/ 60 mins 6.37 13.07 0.45 18.89

Figure 7: We see that the returns of the intraday momentum strategies are higher at
lower lookbacks as well as lower rebalancing frequencies.

4.2.2 Cross Sectional Momentum


The results for the cross sectional momentum strategy on intraday data are presented
below using the strategy return charts, descriptive statistics and a graphical represen-
tation of key statistics.

10
Annualized Returns (%) Annualized Risk (%) Sharpe Ratio Worst Drawdown (%)
3 days/ 30 mins 27.46 17.48 1.54 16.40
3 days/ 60 mins 26.95 17.44 1.51 16.04
5 days/ 30 mins 19.91 17.99 1.08 17.60
5 days/ 60 mins 17.93 17.95 0.97 21.01

Figure 8: We see that the returns of the intraday relative sector momentum strategies
are higher at lower lookbacks as well as lower rebalancing frequencies.

5 Conclusion
We demonstrate the momentum factor on the daily data and the intraday momentum
strategies on the themes of aggregate time series momentum and relative sector momen-
tum on the liquid equity data for the Indian markets.
As for the momentum factor based on daily data we conclude that one year is the
optimal horizon to look at long term momentum and 1 month is the optimal horizon
to look at short term momentum. We see that the while momentum is an effective
strategy for liquid stocks, as we start including stocks of lower liquidity, the quality and
growth factor take over in terms of performance. This hints at unique play of the size
or illiquidity factor unique to the Indian markets that merits a separate study.
The intraday momentum strategies bring a significant conclusion - that the efficacy
of momentum strategies increase as we lower the lookback and rebalancing frequencies.
In other words, the efficacy of intraday momentum strategies increases on increasing
turnover.
3 Results for the last 2 years 2017-2019 in the appendix

11
6 Further work
While the returns of equity momentum strategies across international markets are widely
documented, the comparison of our strategies on the Indian markets to the International
markets would make more sense if we showed the returns of an exactly similar set of
strategies on international markets here. We intend to do that as an addendum to this
research.
We look at the momentum as a significant factor to trade on the Indian equity
markets and we compare the return of this style factor to other style factors on the Indian
markets, like Value, Growth, Quality, Size. But we use a very basic understanding of
the style factors, further research is needed to capture the nuances of each of the factors
that best represent them for the Indian markets.
The timeseries momentum and cross sectional momentum are relatively simplified
and easy to understand implementations of the momentum signal. There are many
other entry exit signals based on technical indicators that come under the momentum
bucket. For example, moving average crossovers, bollinger bands, relative strength etc.
The strength of each of these signals or a combination of them can be explored further
to evaluate their efficacy.
Another important addition to this research could be the comparison of the corre-
lation of the strategies to similar strategies applied on other markets as well as to the
returns of other widely traded factors and themes across international factors. This
would establish if this strategy can provide an uncorrelated source of alpha to a diver-
sified international portfolio.
We speculated that the reason for momentum anomaly are certain behavioral biases
like initial underreaction and delayed overreaction. We can theoretically find the trend
formation and decay periods for the Indian markets and see how they differ from other
markets and what could be the underlying cause for them.
We used the same signal across all market conditions. It is expected that the strategy
might have very different returns across different market regimes. A look at the returns
of this strategy in various market regimes can help us enhance and demystify the returns
further.
Again, the signals used were relatively simple. Usage of advanced signal processing
techniques and machine learning and deep learning methods can make this strategy
more rich, and they can be explored as a follow up to this research.

12
References
[AA13] Tariq Aziz and Valeed Ansari. Momentum and illiquidity premium in indian
stock market. SSRN Electronic Journal, 12 2013.
[AFIM14] Clifford Asness, Andrea Frazzini, Ronen Israel, and Tobias Moskowitz. Fact,
fiction, and momentum investing. The Journal of Portfolio Management,
40(5):75–92, 2014.
[AJV14] Sobhesh Kumar Agarwalla, Joshy Jacob, and Jayanth Rama Varma. Four
factor model in indian equities market . 2014.
[BDR11] Benjamin Bruder, Tung-Lam Dao, and J. Richard. Trend filtering methods
for momentum strategies . 2011.
[BK17] Nick Baltas and Robert Kosowski. Demystifying time-series momentum
strategies: Volatility estimators, trading rules and pairwise correlations.
SSRN Electronic Journal, 05 2017.
[Cor18] Hoffstein Corey. Two centuries of momentum. New Found Research, (1),
2018.
[JMGK13] Sahil Jain, Saurabh Mathur, Abhishek Goyal, and Abhishek Kumar. Mo-
mentum in stock market: Indian perspective. SSRN Electronic Journal, 11
2013.

[JT] Narasimhan Jegadeesh and Sheridan Titman. Returns to buying winners


and selling losers: Implications for stock market efficiency. The Journal of
Finance, 48(1):65–91.
[MOP12] Tobias J. Moskowitz, Yao Hua Ooi, and Lasse Heje Pedersen. Time series
momentum. Journal of Financial Economics, 104(2):228 – 250, 2012. Special
Issue on Investor Sentiment.

13
Appendix
Descriptive Statistics Definitions

Annualized Return (%) An annualized total return is the geometric average amount of money earned by an investment
each year over a given time period.
Annualized Stdev (%) Annualized standard deviation if the standard deviation of the daily returns annualized
Worst Drawdown (%) A drawdown is usually quoted as the percentage between the peak and the subsequent trough.
The worst drawdown is the maximum drawdown for the series.
Annual Sharpe Ratio The ratio measures the excess return per unit of deviation in an investment asset or a trading
strategy, typically referred to as risk.
Sortino Ratio The Sortino ratio measures the risk-adjusted return of an investment asset, portfolio, or strategy. It
is a modification of the Sharpe ratio but penalizes only those returns falling below a user-specified
target or required rate of return, while the Sharpe ratio penalizes both upside and downside
volatility equally.
Information Ratio The information ratio (IR) is a measurement of portfolio returns beyond the returns of a bench-
mark, usually an index, compared to the volatility of those returns.
Turnover (%) Turnover, in a trading strategy, refers to the percentage value of the portfolio traded during a
specific period of time
Gross Exposure (%) Gross exposure refers to the absolute level of a fund’s investments. Gross exposure equals the value
of both a fund’s long positions and short positions and can be expressed either in dollar terms or
percentage terms.
Net Exposure (%) Gross exposure refers to the net level of a fund’s investments. Net exposure equals the value of
a fund’s long positions minus the short positions and can be expressed either in dollar terms or
percentage terms.

Sector definition
The various sectors and their components are detailed below -

Auto ASHOKLEY, BAJAJ-AUTO, EICHERMOT, HEROMOTOCO, M&M, MARUTI, TVSMOTOR,


TATAMTRDVR, TATAMOTORS
Ancillaries AMARAJABAT, APOLLOTYRE, BHARATFORG, BOSCHLTD, EXIDEIND, MRF, MOTHER-
SUMI, ESCORTS, AMTEKAUTO
Energy BPCL, GAIL, HINDPETRO, IOC, NTPC, ONGC, POWERGRID, RELIANCE, TATAPOWER,
RPOWER, CAIRN
FMCG RITANNIA, COLPAL, DABUR, GSKCONS, GODREJCP, GODREJIND, HINDUNILVR, ITC,
JUBLFOOD, MARICO, TATAGLOBAL, UBL, MCDOWELL-N, MCLEODRUSS
Finance BAJFINANCE, RECLTD, M&MFIN, PFC, SRTRANSFIN, BAJAJFINSV, HDFC, IBULHS-
GFIN, BAJAJHLDNG, BHARATFIN, EDELWEISS, ICICIPRULI, IDFC, RELCAPITAL,
LICHSGFIN
Infra LT, BHEL, SIEMENS, BEML, ENGINERSIN, RELINFRA, ADANIPORTS, IRB, JPASSOCIAT,
GMRINFRA, NBCC, ABB
IT INFY, HCLTECH, TCS,TECHM, WIPRO, MINDTREE, KPIT, OFSS, TATAELXSI, FSL,
MOSERBAER, 3IINFOTECH, GTL, PATNI, HCL-INSYS, ONMOBILE, TULIP, EDUCOMP,
POLARIS,CMC, HEXAWARE, MPHASIS, NIITTECH, ROLTA, NAUKRI, JUSTDIAL
Metal COALINDIA, HINDALCO, HINDZINC, JSWSTEEL, JINDALSTEL, NMDC, NATIONALUM,
SAIL, TATASTEEL, VEDL, WELCORP, JINDALSAW, STER, MONNETISPA, JSWISPAT,
MAHSEAMLES, BHUSANSTL
Pharma AUROPHARMA, BIOCON, DRREDDY, LUPIN, SUNPHARMA, GLENMARK, CIPLA, CADI-
LAHC, PEL, DIVISLAB, RANBAXY, GLAXO
PSU Banks ALBK, ANDHRABANK, BANKBARODA, BANKINDIA, CANBK, IDBI, INDIANB, ORIENT-
BANK, PNB, SBIN, SYNDIBANK, UNIONBANK, IOB
Private Banks AXISBANK, FEDERALBNK, HDFCBANK, ICICIBANK, IDFCBANK, INDUSINDBK, KO-
TAKBANK, RBLBANK, SOUTHBANK, YESBANK, KTKBANK
Nifty ACC, ADANIPORTS, AMBUJACEM, ASIANPAINT, AUROPHARMA, AXISBANK, BAJAJ-
AUTO, BANKBARODA, BHARTIARTL, BHEL, BPCL, CIPLA, COALINDIA, DLF,
DRREDDY, GAIL, GRASIM, HCLTECH, HDFC, HDFCBANK, HEROMOTOCO, HINDALCO,
HINDUNILVR, ICICIBANK, IDEA, IDFC, INDUSINDBK, INFY, ITC, JINDALSTEL, JPAS-
SOCIAT, KOTAKBANK, LT, LUPIN, MARUTI, NMDC, NTPC, ONGC, PNB, POWERGRID,
RELCAPITAL, RELIANCE, RELINFRA, RPOWER, SAIL, SBIN, SIEMENS, SUNPHARMA,
TATAMOTORS, TATAPOWER, TATASTEEL, TCS, TECHM, ULTRACEMCO, WIPRO, YES-
BANK, ZEEL

6.1 Python implementation of risk budgeting


LEVERAGE LIMIT = 1 , 5

# r i s k budgeting optimization

14
d e f c a l c u l a t e p o r t f o l i o v a r (w,V) :
# function that c a l c u l a t e s p o r t f o l i o r i s k
w = np . m a t r i x (w)
r e t u r n (w∗V∗w . T) [ 0 , 0 ]

d e f c a l c u l a t e r i s k c o n t r i b u t i o n (w,V) :
# function that c a l c u l a t e s a s s e t c o n t r i b u t i o n to t o t a l r i s k
w = np . m a t r i x (w)
sigma = np . s q r t ( c a l c u l a t e p o r t f o l i o v a r (w,V) )
# M a r g i n a l Risk C o n t r i b u t i o n
MRC = V∗w . T
# Risk C o n t r i b u t i o n
RC = np . m u l t i p l y (MRC, w . T) / sigma
r e t u r n RC

d e f r i s k b u d g e t o b j e c t i v e ( x , pars , t a r g e t r i s k =0. 1 0) :
# calculate portfolio risk
V = p a r s [ 0 ]# c o v a r i a n c e t a b l e
x t = pars [ 1 ] # r i s k target in percent of p o r t f o l i o r i s k
s i g p = t a r g e t r i s k /np . s q r t ( 2 5 2 )#np . s q r t ( c a l c u l a t e p o r t f o l i o v a r ( x ,V)
) # p o r t f o l i o sigma
r i s k t a r g e t = np . a s m a t r i x ( np . m u l t i p l y ( s i g p , x t ) )
a s s e t R C = c a l c u l a t e r i s k c o n t r i b u t i o n ( x ,V)
J = sum ( np . s q u a r e ( asset RC−r i s k t a r g e t . T) ) [ 0 , 0 ] # sum o f s q u a r e d e r r o r
return J

def t o t a l l e v e r a g e c o n s t r a i n t (x) :
r e t u r n LEVERAGE LIMIT−np . sum ( np . abs ( x ) )

def min leverage constraint (x) :


r e t u r n np . sum ( np . abs ( x ) ) − 0 . 5

d e f r i s k b u d g e t i n g o n d a y ( x t , V) :
w0 = [ 1 / l e n ( x t ) ] ∗ l e n ( x t ) # your r i s k budget p e r c e n t o f t o t a l
p o r t f o l i o r i s k ( equal r i s k )
cons = ({ ’ type ’ : ’ ineq ’ , ’ fun ’ : t o t a l l e v e r a g e c o n s t r a i n t } ,{ ’ type ’ : ’
ineq ’ , ’ fun ’ : m i n l e v e r a g e c o n s t r a i n t })
r e s= m i n i m i z e ( r i s k b u d g e t o b j e c t i v e , w0 , a r g s =[V, x t ] , method= ’SLSQP ’ ,
c o n s t r a i n t s=cons , o p t i o n s ={ ’ d i s p ’ : F a l s e } )
w rb = np . a s m a t r i x ( r e s . x )
r e t u r n w rb

def get rba weights ( indicators , covariance , dates ) :


w e i g h t s = pd . DataFrame ( i n d e x=d a t e s , columns=i n d i c a t o r s . columns )
f o r date in dates :
V = covariance [ date ]
x t = i n d i c a t o r s . l o c [ date , : ] . t o l i s t ( )
w rb = r i s k b u d g e t i n g o n d a y ( x t , V)
w e i g h t s . l o c [ date , : ] = w rb
return weights

rba.py

15
Disclosures
All investments carry risk. This material is intended only for institutional investors, investment professionals,
market counterparts or intermediate customers and may not be reproduced or otherwise disseminated in whole
or in part without prior written consent.
This document has been provided to you solely for information purposes and does not constitute an offer
or solicitation of an offer or any advice or recommendation to purchase any securities or other financial
instruments and may not be construed as such. It is not an offer or a solicitation for the sale of a security nor
shall there be any sale of a security in any jurisdiction where such offer, solicitation or sale would be unlawful.
The factual information set forth herein has been obtained or derived from sources believed to be reliable
but it is not necessarily all-inclusive and is not guaranteed as to its accuracy and is not to be regarded as a
representation or warranty, express or implied, as to the information, accuracy or completeness, nor should
the attached information serve as the basis of any investment decision. Past performance is not indicative of
future performance.
This presentation may contain hypothetical performance results. Hypothetical performance results, while
imminently useful in understanding the merit of the methodology, have many inherent limitations, some of
which are described below. No representation is being made that any account will or is likely to achieve
profits or losses similar to those shown. In fact, there are frequently sharp differences between hypothetical
performance results and the actual results subsequently achieved by any particular trading program.
One of the limitations of hypothetical performance results is that they are generally prepared with the benefit
of hindsight. In addition, hypothetical trading does not involve financial risk, and no hypothetical trading
record can completely account for the impact of financial risk in actual trading. For example, the ability to
withstand losses or adhere to a particular trading program in spite of trading losses are material points which
can also adversely affect actual trading results. There are numerous other factors related to the markets in
general or to the implementation of any specific trading program which cannot be fully accounted for in the
preparation of hypothetical performance results and all of which can adversely affect actual trading results.
Investing in futures, derivatives or foreign exchange markets is highly speculative and involves substantial
investment, liquidity and other risks. CTA managed accounts and hedge funds can be leveraged and their
performance results can be volatile. Past performance of issuers, financial instruments and markets may not
be indicative of future results, and there is no guarantee that targeted performance will be achieved.
Please visit our website for full disclaimer and terms of use.

16

View publication stats

Вам также может понравиться