Monday 24 August 2015

Bank's Assets and Liabilities a very simple and easy explanation

Being very new to the concepts of assets and liabilities in a balance sheet, I have always tried to explore more on this to make it easy. I have come up with a simple explanation of Assets and Liabilities of a commercial bank. It is a brief overview so that a layman can also understand the assets and liabilities that are included in balance sheet of a bank.

Commercial bank's balance sheet has two main sides i.e. the liabilities and the assets. From the study of the balance sheet of a bank we come to know about a system which a bank has followed for raising funds and allocation of these funds in different asset categories. Bank can have others money with it. It can be in terms of shareholders share per capita, or depositors deposits. This money is the bank's liabilities. On the other hand bank's own sources of income leads to generation of assets for bank.

Liabilities: 

a. Share Capital : the contribution which shareholders have contributed for starting the bank.

b. Reserve Funds : The money which bank has accumulated over the years from its undistributed                                        profits

c. Deposits : The money owned by customers
      i. Fixed Deposits
      ii. Saving Deposits
      iii.Current Deposits
      iv. Other Deposits

d. Borrowings : Bank can borrow from central and other commercial banks.

e. Other liabilities


Assets :

a. Cash
      i.  in Hand
      ii.  with the Central Bank (RBI)
      iii. with the other banks

b. Money at short : When a bank makes money available at short notice to other banks and                                financial institutions for a very short period of 1-14 days it is also treated                                 as bank's asset.

c. Bills and securities discounted

d. Investment of bank

e. Loans and Advances given

f. Other Assets

Saturday 22 August 2015

Clarke Vs Sangakara : contrasting carriers with similar numbers


Cricket is a game that has thrived on comparisons. If you call for comparison on numbers these two players will make their way through the top 5 greats of this century.
A total of 20,978 runs from 237 Tests* at an average of 78.15. In 649 ODIs, 22,215 runs at an average of 43.24. These are the combined numbers of Kumar Sangakkara and Michael Clarke. On August 20, 2015, both these players will play their final Test match. When the Tests in P Sara Oval in Colombo and The Oval in London end, the two legends of the game will leave the cricketing world poorer. If you look at the numbers from 2004, then Sanagakkara and Clarke are at the 2nd and 3rd position of highest run getters. 

If one has to look at the way how Sangakkara and Clarke started their cricketing careers, the contrast is evident. In the beginning, Sangakkara did not know whether he belonged to the Sri Lankan dressing room. It took one knock of 98 against South Africa in tough conditions in 2001, one year after he made his debut in 2000, to give him necessary assurance and confidence.
Clarke made a memorable start. On his Test debut against India in 2004, he played a knock that established him as a once in a generation cricketer. He tackled the likes of Anil Kumble and Harbhajan Singh in such spectacular fashion that his 151 put Australia on the path where they would conquer the final frontier after a gap of 35 years. Clarke’s display in Bangalore had made him the golden boy of Australia.
When it came to run-scoring, both batsmen outclassed each other several times. While Sangakkara amassed big scores, including a magnificent 287 in a record partnership of 624 against South Africa in 2006, Clarke was scoring centuries but they were not big hundreds. While Sangakkara’s big appetite for big runs eased, Clarke responded with four double-tons in one year. When Clarke scored 329 against India in Sydney, it took Sangakkara two years to respond with 319 against Bangladesh. Both players almost outdid each other when it came to guts and determination.
Both players are leaving at interesting times. For Clarke, the fire seems to have burned down due to a combination of injuries and due to the heartbreak surrounding the death of Phillip Hughes. For Sangakkara, he is leaving at a time when Sri Lanka cricket is in transition and when there are whispers that he prefers County over Country. Yet, greatness has come easily for Sangakkara but for Clarke, it has taken years of toil to make people acknowledge his ability.
In a nutshell, these two cricketers have given us cherished memories. One will miss Sangakkara’s trade-mark punch off the back foot and his bent knee cover drive. In the coming summer, one might not see Clarke’s shot-arm pull or his nimble footed advance down the wicket to the spinners. Sangakkara looked assured while Clarke was a nervous starter. One was smooth and classy while the other was determined, dogged and resolute.
The cricketing world will be poorer with the absence of Sangakkara and Clarke. However, for this generation of fans, it has been a treat to see a Sri Lankan and Australian, two contrasting cultures traversing their own diverse yet similar paths to greatness.

Wednesday 19 August 2015

Dark Data : an abnormal challenge.

It is no wonder that big data is big news. Organizations are keen to bring right things to right people at right time. It is a promise of speed and specificity.Stores like Wall-mart handle over a million transaction in an hour. Google processes tens of thousands of terabytes of data a day. Analysts work hard to find out the pattern of the digital clues we leave about our whereabouts and our desires.

But, India has a different challenge. Only 16% individuals leave digital footprint. What about the rest? The one billion others ? Their desires and whereabouts are still dark to the world. This is the problem of dark data. Even as we move towards big data for future, we cannot ignore dark data. It represents too enormous population to be ignored.

We can be effective if we are able to understand the dark data ecosystem. The main challenge for analyst to find dark data is to find any data at all. Addressing this issue will require entire different set of mechanisms.

For any organization serving this segment, every data point comes with a cost of time and accuracy.
every organization, before going for this type of data, should ask two questions about the relevance of this type of data. 1. What are the human behaviors that matter ? 2. Is it really worth ?
Dark data is about having to know ahead of time which object you want. This requires deeper perspective and different kind of exploration and research.

Even if you obtain the information about the people in dark zone,obtaining it with useful accuracy is not simple. Let's say you want know something simple as occupation. Establishing a consistent classification that is understood by major part of the population is difficult. Most people in informal economy have multiple occupations. They do daily wage labor by day and sell flowers at a bus stop in the evening. Some of them might work on the farmlands in the morning and sell Papads in the afternoon. Are they in Agriculture or retail ? Some people may check one box and some may check other.

Furthermore, there is the issue of reliability. In any organization, most of the times, filling of forms is often just statutory with no checks. This may be because of lack of sensitivity and little awareness. If there are no checks,people take shortcuts and tick any box.

Without relevance, consistency and accuracy the data cannot be analysed and it is of very little importance to the organizations. The challenge of large data is not trivial. But , its abnormality makes it a challenge. The dark data will soon play  a major role in analysis. Cleverness and technology aid can solve this problem of dark data. Organizations will soon be hunting for the candidates with these two qualities. 

Monday 17 August 2015

Being Left-Handed...


Recently, I heard the news that researchers have found out that left handed students are mostly the under performers in during schooling. Being a left handed, I wanted to comment on this research.

As a “lefty,” I have always felt a little different at times, I have struggled with trying to fit into a right-handed world.

In school, I had to contort myself so I could write on a right-handed desk. I struggled to keep my hand clean and often ended up with ink smudges on both the paper and my hand; writing in those spiral-bound notebooks is difficult, if not impossible, for lefties. From can openers to scissors,most household items are made for righties. And when eating with groups, I have to fight to sit on the far left side of the table so I don’t bump the person next to me the entire time I’m eating.

I have often wondered if I really am that unique,with an estimated 10 percent of the population being left-handed. it’s not as rare as it feels.

The custom of shaking hands comes from medieval times. When two people met, they would hold each other's right hand. I have always had the difficulty with to get accustomed.

It is takes longer for a left handed person to learn and play guitar. Moreover, in country like India the driving car is a problem too for a left-hander. Left Handed people are always bad at handwriting. It is because we have to write against our natural flow. I have suffered a great deal because of this.

Many power tools, when held with the left hand, can be very harmful. For example, a circular saw blows sawdust to the right, which is very convenient for a right-hander, but when held in the left hand, makes a mess.Many schools use desks with a chair attached. The desktop is shaped so that you get in on the left side and you can rest your right arm while writing. A lefty's left arm has to stick out off the edge of the desk. Left-handed desks, built the opposite way, can be very hard to find.  In a card game, when a lefty fans out his cards left-handed style, the numbers and suits cannot be seen. Lefties have to either read the cards upside-down, fan them out the opposite way, or buy left-handed cards with the number and suit in all corners.

This enmity toward lefties can be seen in many languages. For example, in Latin, the word for "left" is sinister, which has come into English meaning "evil." The French word for "left" is gauche, which in English means "awkward" or "tactless." The English word left comes from the Old English left, meaning "weak."

Nowadays, most societies, religions, and cultures no longer scorn left-handedness like they used to. It's something you should take pride in. I am left-handed (why else would I be writing this page?), and though it can be difficult, I like it. You and I are part of an elite 10 percent of the population, along with the ranks of many great personalities.

It's important to note here that no one is exactly sure how many lefties there are. Estimates range from 2% to 30%, but 10-12% is the most likely range. That puts the number at about 630 million to 750 million lefties worldwide. In addition, there are many advantages to being a left handed like creativity,adaptability,multitasking etc.

So, It's cool to be different.

Wednesday 12 August 2015

React vs Respond : A mindful difference

Let’s say you go to a crowded place (a concert, sporting event, a railway station etc.). As you are walking along, you bump into someone. That person looks at you, and before you can say anything, they push you.Why would they do this? They might have the perception that you bumped into them on purpose and that you wanted to start some sort of confrontation. They didn’t even give you a chance to apologize, or to consider that you bumped into them because you were pushed from behind.
They reacted. They pushed you without pausing to think why it happened. It was automatic and thoughtless. It was a reaction.Now, imagine if the other person paused before pushing you. If they had actually paused, they would have heard your apology and likely would have responded peacefully instead of reacting angrily. When we pause and think about our options, we are responding.
Most people always REACT .  It happens something like this:  I have had a day at work, I have a set of experiences and memories of other such days.  I have a lifetime of experiences with people. I have a lifetime of memories of happiness or unhappiness or a mixture of both.  A woman walks up to me and starts yelling at me because her appointment is late. Instantly, a part of my mind  is calling up all the memories of being yelled at.  It is reviewing a series of filing cabinet drawers with “Yelling women” and takes me back to a memory as a child when I was screamed at by my mother, it makes me want to cry.  Quickly then that crying impulse is researched in those filing cabinets and I find the last time I cried and how angry I was.. I vowed never to cry.  That’s it, Damn it!  I hate this woman!!!! A simplified example, but you get the idea.
We have to realize that it is not the shouting of that woman,your father,your boss or your wife that disturbs you, but it’s your inability to handle the disturbances caused by their shouting that disturbs you. It’s not the traffic jams on the road that disturb you, but your inability to handle the disturbance caused by the traffic jam that disturbs you. More than the problem, it’s your reaction to the problem that creates chaos in your life. 
To me, the fundamental difference between a reaction and a response is a conscious choice. A reaction is a reflex born out of habit. A response is a conscious choice born out of being present and aware in the moment.

Monday 10 August 2015

A Nation of "good Debaters"

Last month there was a sudden stir of pride among many Indians who watched the video of Sashi Tharoor in the hallowed debating hall of University of Oxford. Mr. Tharur in his own style addressed the Britishers as robbers and they were up to no good when they were here. Even our respected Prime minister showered compliments on that speech which was delivered.

Mr Tharoor has admirable debating skills and his mastery over the language(which British left with us) is an innate gift. Despite all this debate on were the British as black as he  made it look, Historians are more interested in what Indians were doing to each other before they were here.  Upper caste oppressed the lower case, Law and order was bad. Moreover, historians argue that though thousands of Indians died building the railways of the Raj, but countless more died building the Taj Mahal and other useless baubles for their earlier rulers.

The world is divided by man fault lines in history and so is India. So,who we are and what we want to be are more important questions for us to engage ourselves with than what British have done to us in the past.
What do tribal communities in India feel ? What are the feelings of North eastern states regarding our nation ? And What about women ? These vital matters are more important than "us versus you" debate at Oxford.

We as Indians have this peculiar habit of winning an argument by demolishing others. Indians are known to be argumentative. Debates are conducted like wars. Listening to a great debater we think "He demolished opponents position" or "He shot down opponent's arguments ". We criticize and that's all we do in debates. That is what we have been taught. A major problem with this approach of enquiring into issues is that when one side looses, it feels insulted and  it becomes very difficult to arrive at consensus between two advisories thereafter. After a debate one dispute ends but another will surely start because of no harmony restored.   
We as a nation have reached a point where we need other forms of dialogue in which objective is not to win by demolishing other's argument , but to understand each other and share our aspirations.A dialogue is fundamentally different from debate. At its core, it is about listening. It builds trust and and enables people to share their opinion without an stereotyping. 

We need courage to change what we are. The sooner we begin to change what we think, the sooner we will create a country which is good for all its citizens. A better India will be created if people learn the skills of listening and find shared insights and solutions.
 Let us learn to engage in dialogues to learn rather than debates to win. Let us listen deeply to our own aspirations, and build a nation that is good for everybody's children.  

Sunday 9 August 2015

Python - Airport Counting

Similar to our previous assignment of counting votes . Lets do one more quick assignment of Aiport counting. This is a real world data. You can download the dat file from : Aiport.dat.

Problem Statement : We have been given the Airport data of all the countries. We have to count the number of airports each country has.

Note : It is a CSV file. Open .dat file using notepad and you will be able to see the data.

Solution :

We have to follow the same design steps as mentioned in my previous blog.
Please refer below snippet for solving this problem.




Results :




In my next post we will study to draw an histogram.

Python - Assignment 1 (Charts)


In this blog we will try to focus on creating bar chart for our "Voting" assignment.
We will be using matplotlib because matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc, with just a few lines of code.

Let us tr a small example before drawing a char for our voting problem. Please refer to the below code snippet.



 pyplot is one way to plot graph data with MatPlotlib. Provides a MATLAB-like plotting framework.pylab combines pyplot with numpy into a single namespace. This is convenient for interactive work, but for programming it is recommended that the namespaces be kept separate.

If you want to use matplotlib directly from Python instead of via IPython Notebook, you just need to add one final line to each of your programs:
plt.show(). This will display a window with the chart you created, and pause the script until you close it.
The graph to the right is the output of above code. Now let us try to draw a bar chart for our voting example.



Please refer below code snippet to draw the bar chart to count number of votes of each category of radish.




                           

Adding comments has made our task easy.We're importing two modules - pyplot is one way to plot graph data with Matplotlib. It's modelled on the way charting works in another popular commercial program, MATLab.NumPy is a module providing lots of numeric functions for Python. This loop processes the dictionary into a format that's easy to send to matplotlib - a list of radish names (for the labels on the bars) and a list of vote counts (for the actual graph.)


We create a range of indexes for the X values in the graph, one entry for each entry in the "counts" dictionary, numbered 0,1,2,3,etc. This will spread out the graph bars evenly across the X axis on the plot.
np.arrange :  is a NumPy function like the range() function in Python, only the result it produces is a "NumPy array". 
plt.bar() : creates a bar graph, using the "x" values as the X axis positions and the values in the votes array (ie the vote counts) as the height of each bar.
plt.xticks() :  specifies a range of values to use as labels ("ticks") for the X axis.

To summarize, we have created bar chart using Matplot library. We will see different charts in Python in upcoming blogs.

Python - Assginment 1 (Voting Problem)


In my last couple of blogs about Python(details), I elaborated on different data types used in Python and also we designed a mode median and standard deviation calculator.
In this blog we I will take you through an assignment which will cover a great deal of basic part of Python.

Let us define our problem in a very simple way.

(Source : Open Tech School)

We have a survey result of what radish variety customer love the most. You can download the survey result text file here. We want to know couple of things.

a. What is the most popular Radish variety ?
b. Did anyone vote twice ?

Let us design our approach,

What are the things we need to do to answer those two questions.

1. First and most important thing, We have to read the data from the file.

2. Data contains two parts, one the name of the voter and second his vote (i.e. the raddish name)
    we have to split the data in two parts. to get the name and vote.

3. As you can see the data is not clean. It has duplicate entries and unintended space. So, we have to      clean the data.

4. After cleaning we will calculate Who has voted twice.

5. then we will calculate the number of votes for each raddish by eliminating the duplicate entries of people who have voted twice.

6. Finally, we will find the winner (i.e. the Raddish which has received maximum votes.).


Now let us structure our approach. We have defined he flow. In my last blog I have talked about functions. Let us design solution for this problem using functions. So we can understand the code flow easily and also it is a good practice.

Now what functions will we Include ?
The answer is simple. Every step that we have included in the design section will contribute as a function.

We will define functions for the following things :

 - Reading a file
 - Finding Duplicate voter
 - Counting votes
- Finding Winner

Please refer to the below snippet that defines these functions.



We have defined three functions in this snippet. To clean the data, count votes and get the duplicate voter. names[] is a list that will consist of all the customers that voted. So we can check the details about duplicate voter using this list. And Count is a dictionary that will take raddish Names as key and their count as the value.

Moreover, We have to write a separate function to clean the data because, we will have to clean the data for names as well as votes. So , this will avoid repetition of code.

Let us look at below code snippet to get hold of main function.






In the above snippet we are defining three more functions. One is for Finding the winner, second for pretty printing and the third is main.
In PrintResults() function we  are using  a Python functionality of Pretty Printing. As the name suggests our output will be well formatted which is shown later.

Main() reads the data from the file and makes the call to these functions. We have introduced for loop in main to read each and every line of given file.

We will just call the main function using main() argument in Python. and we will get the results.
Let us look at the results.

Results are displayed by running all the functions one by one to get more clarity.
Let us look at the first result of Duplicate Voters.





Vote counting results without Pretty printing.





Vote counting results with Pretty Printing.



Finally, let us see who got the maximum votes.



So, using this code we have answered the two questions that were asked.

Let us summarize the answers :


a. What is the most popular Radish variety  - It is champion
b. Did anyone vote twice  - Yes two people voted twice. (Phoebe Barwell and Procopito Zito)

In my next blog, We will learn how to draw  chart and we will draw a chart for the counts of each raddish variety.

Sunday 2 August 2015

Y2K- A bug that scared the World!

While many were ready to party "like it was 1999," many others predicted catastrophe at the end of the year from a small assumption made long ago when computers were first being programmed.
Considering how much of our everyday lives were run by computers by the end of 1999, the new year was expected to bring serious computer repercussions. Some doomsayers warned that the Y2K bug was going to end civilization.

Other people worried more specifically about banks, traffic lights, the power grid, and airports -- all of which were run by computers. Even microwaves and televisions were predicted to be affected by the Y2K bug. As computer programmers madly dashed to update computers with new information, many in the public prepared themselves by storing extra cash and food supplies.

What Is the Y2K Problem?

The cause of the Y2K problem was pretty simple. Until 2000, computer programmers had the habit of using two digit placeholders for the year portion of the date in their software. For example, the expiration date for a typical insurance policy or credit card was stored in a computer file in MM/DD/YY format (e.g. - 08/31/99). Programmers did this for a variety of reasons, including:

  • That's how everyone did it in their normal lives. When you write a check by hand and you use the "slash" format for the date, you write it like that.
  • It takes less space to store 2 digits instead of 4 (not a big deal now because hard disks are so cheap, but it was once a big deal on older machines).
  • Standards agencies did not recommend a 4-digit date format until recently.
  • No one expected a lot of this software to have such a long lifetime. People writing software in 1970 had no reason to believe the software would still be in use 30 years later.

The 2-digit year format created a problem for most programs when "00" is entered for the year. The software did not know whether to interpret "00" as "1900" or "2000". Most programs therefore defaulted to 1900. The code that most programmer's wrote made no assumption about the century and therefore, by default, it is "19". This wouldn't have been a problem except that programs performed lots of calculations on dates. For example, to calculate how old you are, a program will take today's date and subtract your birthdate from it. That subtraction worked fine on two-digit year dates until today's date and your birthdate were in different centuries. For example, if the program thinks that today's date is 1/1/00 and your birthday is 1/1/65, then it may calculate that you are -65 years old rather than 35 years old. As a result, date calculations gave erroneous output and software crashes or produced the wrong results.

The solution, obviously, was to fix the programs so that they worked properly. There were a couple of standard solutions:

  • Recode the software so that it understands that years like 00, 01, 02, etc. really mean 2000, 2001, 2002, etc.
  • "Truly fix the problem" by using 4-digit placeholders for years and recoding all the software to deal with 4-digit dates. [Interesting thought question - why use 4 digits for the year? Why not use 5, or even 6? Because most people assume that no one will be using this software 8,000 years from now, and that seems like a reasonable assumption. Now you can see how we got ourselves into the Y2K problem...]

Either of these fixes was easy to do at the conceptual level - you go into the code, find every date calculation and change them to handle things properly. It was just that there were millions of places in software that had to be fixed, and each fix had to be done by hand and then tested. For example, an insurance company might have 20 or 30 million lines of code that performs its insurance calculations. Inside the code there might be 100,000 or 200,000 date calculations. Depending on how the code was written, it may be that programmers have to go in by hand and modify each point in the program that uses a date. Then they have to test each change. The testing is the hard part in most cases - it can take a lot of time.

If you figure it takes one day to make and test each change, and there were 100,000 changes to make, and a person worked 200 days a year, then that means it would have taken 500 people a year to make all the changes. If you also figure that most companies din't have 500 idle programmers sitting around for an year to do it and they had to go hire those people. This become a pretty expensive problem.A programmer costs something like $150,000 per year (once you include everything like the programmer's salary, benefits, office space, equipment, management, training, etc.), you can see that it can cost a company tens of millions of dollars to fix all of the date calculations in a large program. But they had to do it anyway. That was the time when people with some database knowledge were benefited heavily.


So, when the date changed to January 1, 2000, very little actually happened. With so much preparation and updated programming done before the change of date, the catastrophe was quelled and only a few, relatively minor millennium bug problems occurred.