Skip to main content
Blog home
Newsletter
News
Video
Podcast
Reading list
Wright Brief
Sign In

Macro Regime Prediction Model

In this post we use macro economic variables to model stock market risk and returns

Listen to this article
Audio · ~4 min
Add as a preferred source on Google
Macro Regime Prediction Model

Macro-economic factors such as GDP, trade balance and unemployment often move stock markets. Strong numbers for these factors usually signal economic growth which generally translates to more profits for companies, and more profits tend to grow the value of stocks. If you are investing in stocks, it is important to keep an eye on these numbers as they can often predict whether the market as a whole will go up or down. We have built our model based on machine learning to draw on this relationship and predict the monthly and quarterly Nifty index risk and return, on the basis of which to decide our portfolio allocations.

Economic Rationale

The relevance of a few of the selected macroeconomic variables and their effect on the stock market is discussed below.

Inflation - Inflation is measured by changes in the Consumer Price Index (CPI) and a high rate of inflation increases the cost of living. It exhibits a negative relationship with stock markets as consumer spending decreases, ruining corporate profits.

Industrial Production -Industrial production presents a measure of overall economic activity in the economy. An increase in IIP signifies an increase in production of the industrial sector, influencing expected future cash flows, that leads to increase in the profit of industries and corporations.

Dollar Price - The entire import and export process of any country depends upon the exchange rate of its currency. On average, export-oriented companies are adversely affected by a stronger domestic currency while import-oriented firms benefit from it.

Foreign Investment - FIIs plays an important role for an emerging economy such as India, as FII exerts a larger impact on the domestic financial markets in the short run and a real impact in the long run. It has been observed that Sensex increases when there are positive inflows of FIIs & vice versa.

Experiment

In this experiment we try to build an asset allocation using the macro economic model to predict future risk and returns. We start with a base case of standard 60/40 allocations and then try to better the model using prediction of market regimes using macroeconomic signals. We try a simple linear regression and a boosted tree based classification.

Base Case

As a base case, we consider a portfolio that invested 60% in equities and 40% in bonds at the beginning of the year 2000 and made no changes to the portfolio allocation thereafter. The compounded return and the maximum drawdown for the portfolio are shown below.

Macro Regime

Linear Regression

Having collected reliable data going back twenty plus years we initially explored the correlations between various features and ran a preliminary Linear Regression Analysis.

Using the values of coefficients obtained from the regression we forecasted the nifty risk and return for the next month and quarter. Based on our forecasted values for nifty return and risk, we found an optimal threshold value on the basis of which to divide our portfolio allocation between equities and bonds. 60% allocation of the portfolio was done to equities and the rest to bonds when the forecasted values showed high nifty return or low risk and vice versa.

Shown below is the performance of the portfolio that alternated between the allocation of equity and bond based on the predicted nifty risk. The strong numbers for the various features such as the Sharpe ratio and drawdown gave us confidence in the methodology and a basis to build on.

Macro Regime

In the graph below we see how and when the portfolio allocation interchanged between the two assets.

Macro Regime

Boosted Classification

For the next set of models, we converted the continuous returns of Nifty into categorical values on the basis of periods of high returns, moderate returns, and low returns.

We ran various classification models such as the Random Boost Classifier and the XGBoost classifier using Python and observed the accuracy of our model on test sets while improving its accuracy by tuning the parameter values for better results. We used the classifiers to forecast whether the next period will be one of high returns or low returns and used those forecasted values as a basis for the allocation of portfolio funds into equities and bonds in the same 60–40 ratio as stated earlier.

The performance of the portfolio that alternated assets allocation on the basis of predictions for nifty return by the XGBoost classifier model is illustrated below.

Macro Regime

In the graph below we see how and when the portfolio allocation interchanged between the two assets.

Macro Regime

Conclusion

The Sharpe ratio and the maximum drawdown for the three portfolios are displayed in the table below and we can see that the regime models offered better returns per unit of risk, with the gradient boosted tree model giving the best Sharpe ratio.

Macro Regime

This is a basic model of the regime model that we use to govern asset allocation in our portfolio construction at Wright Research — Multi Factor Tactical portfolio. The effectiveness of the model is specially seen in risk scenarios like March 2020, where it saves the portfolio from market risk by moving away from high equity allocation.

Disclaimer: Investment in securities market are subject to market risks. Read all the related documents carefully before investing. Registration granted by SEBI, membership of a SEBI recognized supervisory body (if any) and certification from NISM in no way guarantee performance of the intermediary or provide any assurance of returns to investors.

The content in these posts/articles is for informational and educational purposes only and should not be construed as professional financial advice and nor to be construed as an offer to buy/sell or the solicitation of an offer to buy/sell any security or financial products. Users must make their own investment decisions based on their specific investment objective and financial position and using such independent advisors as they believe necessary.

Wryght Research & Capital Pvt (Brand name: Wright Research) is a SEBI Registered Portfolio Manager Reg No: INP000007979 (Validity: Apr 03, 2023 – Perpetual) and a SEBI Registered Research Analyst No: INH000017295 (Validity: Jul 03, 2024 – Perpetual), with its registered office at 103, Shagun Vatika Prag Narayan Road, Lucknow, UP, 226001 India and CIN: U67100UP2019PTC123244. Past performance may or may not be sustained in future. Performance provided there in is not verified by SEBI. Investment in securities is subject to market and other risks, and there is no assurance or guarantee that the objectives of any of the strategies of the Portfolio Management Services will be achieved. Registration granted by SEBI, enlistment as RA with Exchange and certification from National Institute of Securities Markets (NISM) in no way guarantee performance of the intermediary or provide any assurance of returns to investors. Please read the Disclosure document carefully before investing. Securities quoted are for illustration only and are not recommendatory. Charts shown are for illustration only. For more information and disclosures, visit our disclosures page here.

Found this useful? Share it.
Explore related topics
About the author
Jasmeet Singh
Wright Research
Wright PMS · Portfolio Management Service

Put this research to work

The same 300+ factor research engine behind this article — applied to a professionally managed portfolio, end to end.

300+
Factors tracked
1.6L+
Investors
₹1,300+ Cr
Invested
SEBI
Registered PMS