Saturday, November 25, 2017

Analysis Of Rupee Exchange Rate Dynamics using a Neural Network

The article covers a neural network based model to predict the Rupee exchange rate over the short term. A linear regression based pre processing stage has been added to the neural network to improve the prediction accuracy. 

Here is a link to the full article on my analysis of Rupee Exchange Rate Dynamics:


Sunday, August 6, 2017

Banking Application Development in Software Project Management Course


I have setup the banking application developed in the Software Project Management course during my MBA at SICSR here: http://researchdiary.co.in/islamicbank/index.php
This was collaborative work by a team and not my individual effort. Other people who worked on the project are Sudha Edupuganti, Kiran Kendre, Prashant Khandagale, Khambor Malngiang, Arihant Jain, Bhagyashri Kadam and Pooja Toprani.
Software Testing, Object Oriented Analysis and Design, Database Design, PHP and web technologies were all covered in separate courses.
To check the dashboards with test data you can use these users:
Account Holder: Username: niravadesai Password: rorschach
Bank Manager: Username: admin Password: admin

Sunday, July 3, 2016

The Strength of ISIS

I did this exercise to try to see if it is possible to predict the ISIS attacks using time series analysis, like it is done in the stock markets. The increasingly distributed nature of ISIS attacks leads one to believe that the thinking behind a stock market move (which is a sum of large number of smaller moves) could be a close approximation of the model of the terrorist attacks by ISIS.

I found the timeline of ISIS growth from the Wilson Center: Link

This timeline was mapped to an Excel spreadsheet with a specific weight given to each event, 300 for a major attack by ISIS and -300 for the death of an ISIS leader. The time span between these events was modelled as growth of ISIS at a certain rate.

This data was used to predict ISIS attacks using neural networks and the analysis is presented here:
ANALYSIS OF ISIS ATTACKS USING NEURAL NETWORKS: REPORT

The cumulative score is plotted in chart below.


What is scary about this chart is that the size and power of ISIS today could be much more than what we feel from the size of the terror attacks it carries out.

The second chart below shows a time series of events that hit the ISIS. ISIS attacks are positive numbers and attacks on ISIS are negative number. If you zoom in to around 2014 - 2016 period, you will notice that every ISIS attack is followed by a corresponding attack on ISIS (or it could be vice versa - attacks on ISIS make ISIS attack back.)


Here is an interesting article from the Washington Post which talks of how the above process could be modeled as a Hawkes Process (Link). I found this article thanks to Jonathan Reichental, who I follow on Twitter. The article describes how the Hawkes Process was successfully able to describe the IED attacks of the Irish Republican Army in retaliation against attacks of the British Security Forces. The same could be applicable here as well.

The last major event on this timeline is the defeat of ISIS in Fallujah, Iraq on June 26, 2016, when the Iraqi forces regained control of Fallujah which fell in the hands of ISIS in 2014. I think we should expect a retaliation from ISIS soon.

ISIS timeline from the Wilson Center: Link

The analysis of the timeline in a spreadsheet: Link

Notice the peaks around Thursday, Friday and Sunday in the histogram below.

The Strength of ISIS

I did this exercise to try to see if it is possible to predict the ISIS attacks using time series analysis, like it is done in the stock markets. The increasingly distributed nature of ISIS attacks leads one to believe that the thinking behind a stock market move (which is a sum of large number of smaller moves) could be a close approximation of the model of the terrorist attacks by ISIS.

I found the timeline of ISIS growth from the Wilson Center: Link

This timeline was mapped to an Excel spreadsheet with a specific weight given to each event, 300 for a major attack by ISIS and -300 for the death of an ISIS leader. The time span between these events was modelled as growth of ISIS at a certain rate.

This data was used to predict ISIS attacks using neural networks and the analysis is presented here:
ANALYSIS OF ISIS ATTACKS USING NEURAL NETWORKS: REPORT

The cumulative score is plotted in chart below.


What is scary about this chart is that the size and power of ISIS today could be much more than what we feel from the size of the terror attacks it carries out.

The second chart below shows a time series of events that hit the ISIS. ISIS attacks are positive numbers and attacks on ISIS are negative number. If you zoom in to around 2014 - 2016 period, you will notice that every ISIS attack is followed by a corresponding attack on ISIS (or it could be vice versa - attacks on ISIS make ISIS attack back.)


Here is an interesting article from the Washington Post which talks of how the above process could be modeled as a Hawkes Process (Link).  The article describes how the Hawkes Process was successfully able to describe the IED attacks of the Irish Republican Army in retaliation against attacks of the British Security Forces. The same could be applicable here as well.

The last major event on this timeline is the defeat of ISIS in Fallujah, Iraq on June 26, 2016, when the Iraqi forces regained control of Fallujah which fell in the hands of ISIS in 2014. I think we should expect a retaliation from ISIS soon.

ISIS timeline from the Wilson Center: Link

The analysis of the timeline in a spreadsheet: Link

Wednesday, June 22, 2016

Trade Balance and Productivity

This is a discussion I had with a friend and decided to write about this here since I think it is relevant to the overall theme of the blog.

This blog is about trade imbalances and their reasons. The primary idea behind trade is absolute and relative competitive advantage. I make more of what I am good at and I trade for the rest with the surplus I generate.

What I am good at will be relative to what other's are good at, and this leads to the idea of absolute and comparative competitive advantage. If I have absolute competitive advantage, I will dominate trade. This is what happened in China over the last 20 years as the government followed protectionist policies, kept the currency pegged and subsidised the manufacturing sector. The Chinese manufacturing companies got an absolute competitive advantage in trade and thus they dominated global trade, generating record surpluses. Other manufacturing economies that did not enjoy such absolute competitive advantage, saw high trade deficits and high unemployment.

A good way to measure absolute and comparative competitive advantage would be productivity per capita. Productivity could be measured as the net output divided by the net resources consumed, the resources could be time, capital or energy. If we look at the productivity per capita in IT sector in India, it is pretty high, leading to high value of IT exports.

Productivity per capita in agriculture in India is low and so the sector needs a lot of government support. Rice exports have to be subsidised to be globally competitive. There are curbs on sugar exports during sugar scarcity. Some food imports are heavily taxed.

In light of this, I think the share of a global trade contributed by a specific country would be proportional to its absolute or comparative relative advantage vis-a-vis other countries. This correlation could be a useful means to study trade cartels and trade nexuses where trade shares of members are not proportional to their productivity. Absolute and comparative advantages could be measured using productivity per capita metrics for the specific industries.


Saturday, April 16, 2016

A Multi-Variable Regression Model for GDP Growth Rate Prediction in India

Abstract:  This paper attempts to build a multi variable regression model to predict the GDP growth rate in India using key macroeconomic indicators such as CPI inflation, manufacturing and services purchasing manager’s index, interest rates and the price of crude oil. The relationships between GDP and these parameters, as well as their inter-relationships are studied in this paper using linear regression models. An attempt is made to understand the relationships and understand the key driving factors for growth.

Keywords: GDP Growth Rate, Crude Oil Price, Inflation, CPI, Interest Rates, Rupee Exchange Rate,
Regression Model, Multi Variable Regression, Macroeconomics

Tuesday, April 12, 2016

Why India Needs The Presidential System

I came across this book recently and since the title sounded so interesting, I decided to buy it. In his book "Why India Needs The Presidential System" author Bhanu Dhamija writes about what's wrong with the present Parliamentary System of Democracy in India and how and why the Presidential System can solve this problem.

The Presidential System is the US Presidential System and the Parliamentary System is the British Parliamentary System . India's governance was modelled around the British Parliamentary System which is quite unlike the US Presidential System. The author believes that the US Presidential System can solve this country of some systemic problems and presents a fact based analysis of his arguments.

In this and subsequent blog posts I will try to analyse what the author presents in his book. He starts with the 4 laws of power:
1. Power tends to corrupt and absolute power corrupts absolutely.
2. Power consolidates when it is more than essential
3. Power dissipates when it is less than sufficient
4. Power co-operates only when it is encroached upon

-If powers are properly assigned, government serves the people, otherwise, it becomes their master.

-The author believes these laws are confirmed in the US Constitution. James Madison had found that governments failed to serve not only when they were too powerful, but also when they were too weak. Madison had also stated that "Unless these government departments be so far connected and blended as to give to each a constitutional control over the others, the degree of separation.. essential to a free government, can never in practise be duly maintained."

This is how the above 4 laws were addressed in the US Constitution:
1. To deal with powers tendency to corrupt, they separated the powers. They separated the powers in local governments, state governments and the central government - leading to a Federal System of Governance. In India, the GST Bill, which has been stalled in the Rajya Sabha, aims to give the states the power to levy a tax and collect a tax. The Constitutional Amendment required for passage of GST Bill requires a 2/3 majority and not a simple majority.

2. In order to ensure that the Federal Government did not become too strong and tyrannical, they set up a system of powerful state governments. Each government, national and state, was assigned only limited and essential powers.

3. To solve the problem of co-operation, they created a system of 'co-ordinated' departments through checks and balances. This gave each department certain constitutional rights over the others.

Indira Gandhi, who came to power with less than 44% of the votes, instituted a state of Emergency in this country in mid-1970s, giving her unfettered powers and converting the Parliamentary system into a dictatorship. She amended the Constitution with retroactive effect and replaced the Chief Justice of India. The forty-second amendment by Indira Gandhi still stands which states that "There shall be no limitation whatever on the constituent power of Parliament." In six months of the Emergency, Indira Gandhi drafted a massive amendment to the Constitution which was 20 pages long. It added 59 clauses and 9 new articles to the Constitution and amended 50. One of her amendments gave Directive Principles precedence over Fundamental Rights, providing the government the right to deny individual rights for state purposes. The courts could no longer handle election disputes. They were not allowed any jurisdiction over tribunals. The Supreme Court was barred from considering the constitutionality of a state law, the high courts from those of Central Laws.

There was now a complete lack of any oversight on the Government. Corruption became endemic in the system. Transparency International's Corruption Index dropped India 11 places in 2011, ranking her 59th in the world.  The practice of establishing commissions of inquiry to scrutinize specific government activities was also downright impractical. A government was expected to start an inquiry against itself, and then to reprimand itself.

[All facts in this blog post are quoted from the book "Why India Needs The Presidential System" by Bhanu Dhamija.]