2013-06-16

The 3 fundamental laws of markets behavior

Markets are places where people go and exchange things, called assets. People go to a market in order to buy something they need or sell something they no longer need.

Markets can be used in order to buy and sell mostly anything, but for the sake of our discussion, let's focus on 3 things:
  1. Foreign exchange, where currencies are exchanged for one another (e.g. euros vs. dollars).
  2. Stocks, where money is exchanged for ownership in a company (e.g. dollars vs Google stocks).
  3. Commodities, where money is exchanged for a specific good (e.g. dollars vs. oil).
Although buying and selling can be done directly, as in a barter system format (I give you 1 euro in exchange for 2 dollars), this process is typically done by using an universal exchange medium, such as money (I give you 1 Google stock in exchange for 10$ and I use this 10$ in order to buy 1 barrel of oil).

Every asset has a price, which is the amount you have to pay if you want to buy that good or the amount you will obtain if you sell it. In the world of free markets, prices are dynamic, that is, they change over time, depending on the supply and demand. For example, if a resource is very scarce (low supply), but highly desirable (high demand), such as gold, then it is only normal that it has a very high price. The other way around, a high supply, but low demand means a low price.

The study of the way prices evolve over time has an obvious appeal to it. For example, if the oil price today is 100$ and I can predict with a very high certainty that tomorrow it will be 150$ dollars, then it makes sense to buy oil today at a lower price and sell it tomorrow at a higher price in order to make a profit.

One way people study and predict prices is by looking at historical values. They try to learn certain patterns of past price behavior and hope that under similar conditions these patterns will repeat themselves, and thus make a profit by betting in the right direction.

The most interesting aspect to look at are price changes, since this is how you make a profit. You buy today at a low price, hoping that the price will go up (have a positive change) and sell tomorrow in order to make a profit.

An example of a historical hourly price record can be seen below:

Time Opening High Low Closing Volume
2011-04-01 16:00 1.40635 1.41487 1.40624 1.41460 19561.00

This record depicts the euro vs. U.S. dollar exchange rate, as it was in 1st of April, 2011, at 16:00. In that moment, the opening price (the price at the beginning of the hour 16:00) was 1.40635, the closing price (the price at the end of the hour 16:59) was 1.41460, the highest price achieved within this interval was 1.41487, the lowest was 1.40625, and the total volume of trading (how much euros and dollars where exchanged) was 19561.

Based on the above record, we can make some additional observations. The closing price (1.41460) is higher than the opening price (1.40635), thus we can say that within that trading hour the exchange rate went up (positive evolution). The absolute amount with which it went up (let's call this absolute difference), calculated as the absolute value of the difference between the closing price and the opening price was 0.00825 units, and the relative difference (as expressed in percentages from the opening price, that is (absolute difference) / (opening price) * 100) was 0.586%.

In other words, if I would have bought an amount of say 10 000 euros at 16:00 and sold that amount at 16:59, I would have made a relative profit of 0.586%, or in absolute terms, 58.6 euros (not bad for a single hour).

Note that in the example above I have depicted an hourly price change, but we can look at price records at other time granularities: changes within a second, a minute, an hour, a day, a week, trimester, semester, year, decade, century, millennium and so on (well actually it doesn't make sense to look at centuries and millennia, simply because the markets haven't been around for that long, but if the current market mechanism continues, this might be applicable in the future).

Let's recap the most interesting parameters we have discovered so far:
  1. Time granularity - the length of the period we look at a price difference.
  2. Binary evolution - if the price went up or down.
  3. Absolute difference - the difference between closing and opening price.
  4. Relative difference (magnitude) - the absolute difference expressed as a percentage from the opening price.
Looking at a single historical price record doesn't really reveal much useful information (except how much money we could have made or lost, if we traded in a certain direction or another) so in order to give laws referring to price changes, we have to study more of them.

But I believe we have enough information in order to propose the first law:

1. For every asset (euro vs dollar, oil, stocks, etc.), when looking at every possible time granularity (seconds, minutes, hours, days, etc.), within any time interval of a reasonable size, there is an almost equal amount of positive and negative price changes.

I've first made this observation by looking at the hourly price changes in the euro/dollar exchange rate, starting from the 1st of January 2010 until the 20th of April 2013. Within this time period, there are 20972 active trading hours (hours during weekends or holidays do not count, since the markets are closed). Out of these 20972 records, there are 10495 when the price went up (positive evolution) and 10477 when the prices went down (negative evolution). Expressed as percentages, there are 50.049% positive price changes and 49.951% negative price changes.

I wanted to see if this observation holds for every other asset, so I've downloaded the entire history of daily, weekly and monthly price changes referring to stocks for all the companies listed in the Standard and Poor's 500 index. For each of the downloaded time series that had more than 300 records I have  computed the percentage of positive price changes and plotted all of these percentages as a histogram. You can see the results below:

The series formed by all the positive percentages taken together has a mean of 50.614, standard deviation of 1.606, a minimum value of 43.40 and a maximum value of 55.816. This distribution is depicted in the picture above with a blue line. My intuition was that positive percentages follow a normal distribution, so in order to test this I've generated random points from a normal distribution with the same mean and standard deviation and plotted their histogram as well (depicted with green above). As you can see, the lines match pretty good, which confirms my intuition.

What this rule actually shows is that in every price time series, no matter the granularity, there are an equal amount of good and bad trading intervals.

The first rule only looks at the sign of the price change. Even though this is a good starting point, it would be much more interesting to also study the magnitude of price changes. So the second law proposes the following:

2. For every asset, when looking at every possible time granularity within any time interval of a reasonable size, the magnitudes (relative differences) of price changes follow a fat-tailed distribution.

This can be seen in the chart below:
The chart was generated by computing all of the magnitudes for the hourly price changes for the euro vs. dollar exchange rate from the 1st of January 2010 until the 20th of April 2013. This series has a mean of -0.000336 and a standard deviation of 0.132782, with a maximum of 1.625 and a minimum of -0.962 and it is depicted with the blue line.

By comparison, with the green line I have depicted a normal distribution with the same mean and the same standard deviation, and as you can see, the 2 distributions do not really fit.

I don't want to go into the details of what a fat-tailed distribution or a normal distribution are, but the basic difference is that in a normal distribution, extreme values are highly unlikely (99.7% of the data falls within 3 standard deviations of the mean) , while in a fat-tailed distribution, extreme values are more likely.

This difference is very important, since extreme price changes have to be taken into account, as they can bring huge profits or high losses. Even more important is that until recently, most of the predictive mathematical models made the assumption that price changes follow a normal distribution, which is false. The most dangerous part is that this normal distribution assumption is also made by official institutions. Fortunately, this view has been slowly changing in the recent years, mainly thanks to the works of Benoit Mandlebrot and Nassim Nicholas Taleb.

And slowly we get to the 3rd and final law:

3. Future price changes cannot be predicted based on past price changes, except in some limited special cases.

In other words, no matter how you look at past price data, the best you can do regarding the future is to toss a coin.

Although at the moment I cannot give an empirical or theoretical proof regarding this law, I can offer an intuition as why this is the case. Let's consider for example the Apple Company. Apple owns much of its commercial success (which is translated into high stock valuations) to the iPhone device, which it launched in 2007. This can be also seen on the chart depicting the evolution of the Apple stock price. After 2007, with a couple of exceptions related to the financial crisis of 2008-2009 and the death of Steve Jobs in 2011, the stock price of the company has been continuously rising.

So if this high success (high stock valuation) is due to the success of the iPhone device, my question is how could you have predicted in say 2006 (before the launch of iPhone) that such a device will be launched and it will be so successful, just by looking at past Apple stock prices? Obviously, you couldn't have. Or, another example, under the assumption that the exchange rate of a currency reflects the efficiency of a country's government, how can you predict this efficiency just by looking at the past movements of the exchange rate?

The special cases, where one could make a prediction, relate to the notion of a self-fulfilling prophecy. If enough traders hold the same belief, that some random past pattern can be used in order to predict the future, then when that pattern activates, all of them will make the same decision and this will be reflected in the stock price. For example, in the world of FOREX prediction, people talk about psychological levels of quotation, when the exchange rate of a currency is close to some round number. Some traders believe that if a currency can break through this level, then it will aggressively continue its rising or falling course. This may or may not be the case in reality, but the fact is that if enough traders believe that this strategy works, they will buy (or sell) that currency after it goes through this psychological barrier. As a result, the price will change according to their beliefs, and so the prophecy will come true.

In the next post, I will try to give some advice regarding as to how to trade, based on the laws stated above.

2013-06-15

Criticism of Test Driven Development

Test driven development (TDD) is a technique of software development, where you write automated tests before the code implementing the underlying functionality. The development cycle goes something like this:
  1. Write a test - this specifies the functionality that a piece of code should have.
  2. Run the test - initially this will fail, since the code that should implement this functionality doesn't yet exist.
  3. Write the minimum amount of code required in order to pass the test.
  4. Repeat this process for new pieces of functionality. Always refactor your code to the minimum possible that allows all the tests to pass.
A test represents a clear definition of the expectation that a piece of code should have. What TDD does, is that it allows you to first clearly define an expected functionality of a piece of code and then write the least amount of code that successfully implements this functionality.

But to see the problem with TDD, let's go back to the roots and define what the software development process really is.

Software development is a process whose aim is to produce source code that respects the following constraints:
  1. It has maximum optimality, or minimum error. It is a close as possible to the requested functionality (it has all the features, maximum efficiency, no bugs, and so on...).
  2. It has minimum amount. It implements the required functionality with the least amount of effort, measured either in lines of code, number of methods, classes, modules, packages, or you name it.
Judged from this perspective, tests act as exact measurements of optimality. Without tests, you don't really know where you how good your code respects your client's wishes (the alternative would be to let the client play around with your code and discover errors, but this is not a recommended practice for obvious reasons), so tests are an absolute must in order to make sure that you deliver high quality code.

But tests are also code. So if you write tests, you increase the amount of code written, breaking the second constraint of the software development process, that of minimum of code. However, this trade off is usually worth it, because in the end, what the client is paying for is maximum optimality. He doesn't really care about the amount of code used in order to achieve this.

But here is where things become problematic. In the typical software development process, optimality is in itself unknown, it has to be learned. Writing code is at the same time a process of delivering optimality and discovering it.

At the beginning, the client gives you a very rough idea of what he wants. This is just a first estimate. You then go to your office, write some code, and after a while go back to him and present it. He discovers some new features that should be implemented, he realizes that other features are worthless and can be eliminated. He then presents you with second estimate of optimality, and the iterative process repeats itself.

Going back to the initial constraints, that of maximum optimality and minimum amount, you can clearly see that the only constraint that is truly under your control is how much code you write. The optimality (and its maximum) remains to be discovered.

So the balancing act in software development consists in discovering this optimum by writing the lowest amount of code possible. Which is exactly the reason why I think TDD is a very bad practice.

Remember that tests represent measurements of optimality, but they themselves don't provide any functionality. So by writing them first you make one false assumption: that you know what the optimum is, before having written any code at all. But because at each iteration round, the estimate of optimality changes, and at the beginning it probably changes very fast, writing tests first means only writing unnecessary code. The required functionality will most likely change, so tests will most likely have to be changed as well. Why write them in the first place? Why not write them after you discovered what the optimal functionality is?

Moreover, deleting or changing code is always harder than creating new code. It has something to do with the psychological principle of risk aversion, which is why you see so much legacy code commented out, even though it makes absolutely no sense to keep commented code when using version control software (SVN, Git). So when the time comes to delete or modify your tests, that is your old definitions of what optimal code is, you might find that very hard to do, because of your innate human risk aversion personality. And you might continue to keep hold of old unnecessary functionality, just because you are afraid to delete it. The smart thing to do would be then to never put yourself in the position of having to be risk averse in the first place, that is you should avoid as much as possible writing code that you will have to delete.

TDD can still be a useful technique, but only in the cases where you know beforehand with maximal certainty what your code should do. In this case you can benefit from the safety net of the tests and also write the best code possible to pass them.

However, ideally speaking, the process of software development should always be about discovery. You should always write code that solves a new, previously unknown problem. Writing code for which the functionality is known sort of means that you are reinventing the wheel. And reinventing the wheel, well that is simply a waste of time.

2013-06-14

Money, independence and entrepreneurship

I keep asking the question what are the real reasons for which people become entrepreneurs? The main answers I receive are financial rewards and the possibility of working independently.

I believe however that these 2 reasons are simple illusions. In my view, what really motivates people to become entrepreneurs is that such a path gives them the possibility of personal fulfillment, by creating something truly useful for others. It is about the freedom of self-expression and helpful creativity. Money and independence are just nice side effects.

Becoming an entrepreneur is however not the single way of achieving this freedom of self-expression. It can sometimes be expressed as a hobby, which as an activity that a person does just for its own sake, usually without getting any financial gain.

Self-expression can also be achieved within the boundaries of a normal job. One can still work in the traditional sense for someone else in exchange for a monthly paycheck, and at the same be lucky enough to have the possibility of doing whatever he wants.

Yet the best way of professional self-expression is to open a private business. Yet, not everybody that starts his own business does it for the right reasons, but rather for the illusions I've mentioned in the starting paragraph: money and independence.

Let's try to detail things a little bit.

First on the blacklist is money. 

Well, money is a nice side effect of starting your own business, and of course you need money in order to survive, but I think financial profit should never be viewed as the main goal of a business, rather it should be seen at best as a necessary evil. The problem with chasing money is that you optimize your business in order to maximize the amount of profit. This may increase your chances of making a hefty profit, yet this is not the same thing as achieving personal fulfillment.

If you go the money way, every decision you take will go into maximizing profit direction. Unfortunately, decisions that maximize profit tend to minimize creativity and ethics, and you run the risk of turning your company into a modern day corporation.

Corporations are nothing else than giant money making machines, but this efficiency comes with a huge downside. The only to make insane amounts of money is by producing something very cheap and selling it at an overvalued price. Oftentimes, this translates into poor quality services marketed as valuable, dubious political tactics masked as ethical and considerate, or a highly artificial and worthless speech, filled with meaningless jargon, labeled as professional. There is almost always some corporation behind every environmental scandal, political scandal or regional conflict.

Working for a corporation is equally bad. People are stuck in a perpetual jungle-like power game, where everyone protects his or her own ass, pretends to be as busy as possible while working as little as possible, and jumps at the slightest opportunity to climb the social ladder. Actual work is continually delegated down the food chain and those at the bottom of it end up being swamped with an endless stream of meaningless, tedious, and boring tasks. Worst of all, everybody is forced to pretend they believe in some "grand vision", typically formulated as a "mission statement" that is specifically made to sound as artificial and devoid of any substance as possible (for example: http://www.deloitte.com/view/en_CA/ca/about-Deloitte/vision-values/).

Another associated risk with the money path is that you would probably be more opened to raising outside capital from "investors". The problem with "investors" lies in their job description. These guys give away money for the single purpose of making more money. Sure, there can be exceptions. Some of them might do it because they really care about you (your family members), some of them might do it because they genuinely like to help other people, but for the most of them their goal is simple: maximize profit.

When you raise capital, you always give away in exchange a part of your company. And the more you give away, the less control you will end up having. And even if you are an ethical guy, who is all about the work, when you don't really have a full saying in the direction your company should go, then you are at the mercy of your "investors". And since most likely, the goal of your investors is to extract the highest amount of profit possible from your company, they will force you into making a lot of corporation-like decisions, whether you like it or not.

The second false goal is independence.

You might wonder, why I am saying that independence is a bad goal to have? Well, the problem with independence is that it doesn't really exist. We humans live in a society, and, whether we are aware of it or not, we are intimately dependent on each other for our survival and well being.

Unfortunately, the modern world with its technological advances has managed to hide this dependency between people and we sort of believe in our modern times that we can stand on our own. This belief is both false and very dangerous.

Let me give you an example why it is false. You go now and buy your food at the supermarket, and the modern grocery shopping process is built in such a way in order to allow you to purchase the most amount of goods possible with the least amount of effort and human interaction. Actually, in most cases, the only human interaction you have in a supermarket is with the cashier, and to be honest, I wouldn't really call that a human interaction, since the only things you exchange are cash and fake smiles (and possibly hidden hatred).

After a number of such experiences of minimal human contact, you start believing that you are disconnected from the other people, that you are independent. This is not true, you are still as dependent as ever, it is just that your dependencies are less visible. To notice this, just think about how the food item you just bought came into being? It was produced, of course, by other people, it was processed and delivered by yet another group of people and the money you paid for it went into salaries of yet another set of people.

Your actions, and those of your company always affect other people. So if you think you are independent you dangerously run the risk of making either useless or, even worse, harmful products and because you are under pressure to sell them, you will also be tempted to lie and advertise them,under a false image.

As an example, I would return to the world of corporations, especially those dealing with energy and oil. In my opinion, most of the wars currently fought in the world are not about democracy (as their are falsely advertised by our "leaders"), but about the control of resources. And these wars are conducted in a total disregard of the well being of the people who live in war zones. Is it any wonder then, that these irresponsible conflicts result in terrorism and other violent behaviors? Ironically, the phenomenon of terrorism is not correctly interpreted as a direct consequence of an illegal resource stealing war, but it is rather used as an excuse to invade and create even more conflicts.

So here is my advice for all those aspiring to become entrepreneurs: get to know very well the exact reasons you want to start up and make sure it is not about the money or about independence. Try to minimize the amount of money you need and try to earn it in a responsible way. Never forget that whatever you are doing has a direct consequence on other people, whether you are aware of it or not, so make sure that your products truly help others, and don't serve as a way to steal their money.

But most importantly, make sure that your company allows you to freely express your creativity, because that is the most fulfilling of human activities.

2013-06-12

Privacy and hypocrisy

It has recently come into the attention of public media the scandal about the NSA project called PRISM. If you don't know what PRISM is all about, it is a so-called surveillance program, some tool that US Governmental agencies use in order to spy on people.

This tool gathers data about people from popular social media websites, such as Facebook, Twitter, Google and others. The "responsible" authorities of course excuse themselves, by claiming that this tool is being used "for your own protection", or in the interest of "national security", to asses the terrorism risk of a person or something.

Basically, if you have a Facebook account, you also have a number inside a database that represents how likely it is that you will blow up the US Government building (other governments would also keep track of you, but unfortunately all these popular social media websites are based in the US, under the US Government's juristiction. Though luck, Vladimir Putin).

So probably, if you have photos online where you shake hands with Venezuelan, Iranian or Chinese people, you most likely have a very high associated terrorism danger score, making you a perfect target for "closer surveillance" (black German cars with dark windows parked outside your door).

Obviously this project is a very dangerous breach of personal privacy, but what intrigues me the most is actually the way the public reacts to it. Everybody is extremely revolted, asking rhetorical questions like "how could our government do such a thing?", "what are we, the Soviet Union, to be constantly monitored?" and so on and so forth.

To be honest, I think this reaction is not only extremely hypocritical, it is just plain stupid. The people voicing these concerns, as well as the guy who blew the whistle on the whole affair, are simply looking for media attention. They're just babies trying to get a tittie in their mouths.

I mean, come on! Of course that the Government is spying on you! Why wouldn't it? Fuck, if I were the US Government, I would spy on you just as well. I would be surprised if the government wouldn't be spying on you. As a matter of fact, I think that it has been spying on you ever since you were born.

Everybody spies on other people, its only natural to find out what others are doing or thinking, especially when it is related to you. I'm sure that you as well are constantly stalking some good looking girl online, just to see if you have a chance to get her in the sack. I mean really, didn't you ever try searching for someone on Google? Of course you did! So why are you so surprised if the government does exactly the same thing? The difference is that the government is simply interested in more than pretty girls. They have a broader "persons of interest" category. It basically includes everybody on the planet. 

Nowadays, getting someone's private data has gotten extremely easy to do so. Everybody has a Facebook account and everybody is posting very personal stuff on Facebook. So the act of spying has been reduced to a simple database query. And you don't even need computer skills to do that.

The authorities: "Hello, we are the NSA, may we please have every piece of data originating from Abdullah Terrorist-Suspect?". 
Facebook: "Why sure, wait a minute: SELECT * FROM EVERYTHING WHERE name='abdullah'".

Bam! There you go! All your data are belong to mine! Everything you have ever written and posted is just one SQL query away. Man, these NSA guys have it really easy. I mean, come on, this is child play. At least back in the good old days, they would have had to do some serious spying work, like tapping your phone, or installing wires in your home. I guess the spying career is no longer what it used to be. They should really recast James Bond as some geeky looking guy sitting in some dark corner writing SELECT queries all the time. To the nerds belong the Power!

And why do people get so upset about Facebook? This is just the newest mass-consumption means of identification out there. But devices that give your privacy away have been around for quite some time.

If you have a mobile phone (for those of you who are really young, at the beginning of the 1990 there were not so many mobile phone), your location must be constantly known. If it is not, you have no signal and you cannot receive any phone calls. And I bet you get really frustrated when you don't have a signal, don't you?

And if you are like most people you probably carry your phone everywhere you go, 24 hours a day, holding it next to your head when you go to sleep. Then, please, be sure that the government knows with a very high accuracy exactly where you are, 24 hours a day, 7 days a week, every month, every year, every fucking moment!

It is strange, isn't it? We constantly and willingly carry around a personal tracking device, yet we get so fucking offended when "the government breaches our privacy". And to see the full irony of this situation, remember how angry you get when you run out of battery power or out of signal and you are no longer connected to the outside world.

The problem with social media websites is that whatever you post, whatever you write, no matter how private they claim this item to be, it is not. It is gone. Out of your head and into a server computer somewhere. And the thing with this computer is that it belongs to someone else. It is bought, maintained and owned by a company. It has a Facebook sticker on it. So by the law of physical association, Facebook also owns everything stored on that computer, including your oh so precious kitten pictures and embarrassing sex conversations. And if you have naked pictures on yourself on Google Drive (like I do), well I guess you already know who they belong to now.

To make matters worse, these companies, since they are so massive and deal with such a huge volume of data, replicate pieces of information not just on one computer, but on thousands. And in the name of speed, there are thousands of copies of your kittens photos, stored on computers all around the world. Which is why, if you try to delete something, even if the company makes an honest attempt at it (which is highly doubtful, since deleting information would go against their financial interest), it probably won't be able to, because by that point your data has been replicated so much, over so many computers, that I'm sure they've lost track of it. No matter how often you hit the "Delete" button, there will always remain a trace of your data on a computer, somewhere. Always!

So here is my simple advice to the world. If you want to have a pure private conversation, just do it face to face over a coffee. Don't post it on Facebook and then complain that the government breaches your privacy, because this is really childish and naive. Just assume and be sure that in the moment you have posted a message online, it is no longer private. It is no longer yours.

So the next time when your are masturbating with one hand under the desk while writing sex messages with the other, do the brave thing and invite that poor girl out for a date. You will not only have a truly private conversation, but also, if you're lucky enough, you can end up having a lot of real fun ;)

2013-06-09

On human skills

I have been recently pondering the issue of human intelligence, the learning process, and the effects of the education system. The traditional view on the issue of human intelligence is that some are born with a brain that is more optimized for science and order, while others have a brain more suitable for arts and creativity. The life of a human being is then viewed as an optimization process that takes this genetic makeup, trains it during the school years and then exploits it during the career years.

This traditional view is validated with studies made on the human brains of very accomplished people. For example, researchers conducted studies on Albert Einstein's brain after his death and found out that his was physiologically built in such a way that allowed him to make faster calculations or to think more abstractly. Einstein was somehow biologically gifted and, given also relatively stable life conditions that allowed him to develop his gift, it was inevitable that he achieved the status and glory that he did.

I think that this traditional view is flawed and, moreover, brain studies conducted on famous people are simply missing the point. The special biological structures found in the brains of geniuses are not so much a product of genetics as they are a product of experience. Let me give an example to better explain this:

Let's say that there is a part of the brain responsible for physics. Let's call it the physics brain part. The traditional view states that a person born with a better physics brain part achieves higher performance in physics. In my opinion, this goes the other way around. Studying physics the whole time leads to an improved physics brain part, just like for example climbing stairs every day leads to stronger legs.

It is obvious that Einstein had a better physics parts, because he trained this part all of his life. Studying his brain only confirms the fact that he was good at physics, which we already know, since he discovered the theory of relativity. It does not however offer an explanation as to why he was able to discover the things he did in the first place.

Genetics might give someone an advantage in a field, yet that advantage consists of simply giving a person more chances to practice and improve their skills.

Consider this example. Let's say that you are born with the genetic advantage of being tall. As such, you are considered to be better at basketball than the your average height peers. Because of this, during your training years, you will be offered more chances to play. And playing more helps you improve your skills faster. So in the end you will end up a better basketball player. But it is not your height that made you a better player, it is the amount of practice you had.

I believe that this view that more intelligence (whatever this may be) leads to better accomplishments is false. Accomplishment is nothing more than a result of the amount of practice.

As in the basketball example, genetics might sometimes help you get more practice: the taller you are the better your perceived potential is, the more chances you get to pay, the better you actually get.

Yet in many cases, genetics has absolutely no influence on the amount of practice you can get. I guess the most important factors are luck, speculative power, determination and courage.

You need luck to be born within a setting that allows you to practice. For example, if you live in a poor family or a poor society, then you will most likely never get any chance to practice something, because you would be spending your whole time trying to find food or avoid death. 

You also need luck to have access to some educational facility of some sort. If, for example, in your home town there is no basketball team then it will be less likely that you play basketball and thus, no matter how tall you are, you will lack the practice time required to make it big.

Closely related to luck is speculative power. Although there can be extreme cases of good and bad situations, most of us receive a balanced proportion of good and bad events. So the trick is to profit as much as you can from the positive ones and lose as little as you can from the negative ones. And this can be done simply by asking yourself the following questions: If I do this, how much can I win and how much can I lose? Is the potential loss smaller than the potential win?

Determination is also extremely important, because, during practice, you will fail a lot. You are, at the beginning of anything, by definition incompetent, so starting our can be very frustrating and demoralizing. Moreover, people might criticize you for your mistakes. This frustration can make you give up, and giving up means that you stop making progress.

You also need a lot of courage. Doing something important typically involves challenging the way some aspect of society currently works. You need to be able to step out of the comfort zone that playing by the rules give you.

I then see the success of accomplished people as a combination of these 3 factors: luck, determination and courage, plus maybe a little bit of help from mother nature. Yet the traditional view seems to overly emphasize the impact raw intelligence (brain power) plays in success stories.

I wonder, why is this? Regarding luck, this is something that is mostly out of personal control. If you are born in a poor family, without access to education, having to fight for your survival each day, there is not much you can really do about it. You had bad luck, and well, the best you can do is to make the most out of your life conditions.

Regarding determination, when times get tough, when success doesn't seem to come no matter what you do, it is really easy to give up and very hard to keep going.

And regarding courage, we all know that playing it safe is much easier than swimming against the current.

So intelligence (or the lack of it) tends to be used as an excuse for the lack of one of the above traits. It is easy to explain giving up in terms of not being intelligent enough. I personally have done it a lot of times.

So if we are really to understand what makes some people successful, it would be much more efficient to look in their brains for the parts responsible for determination and courage. It would also make much more sense to appreciate people for their effort and not for their results. And it would certainly be better to stop worshiping intelligence and the genetic makeup so much. 

2013-06-05

The missing "why"

I realized today that there is very big problem about the way we currently teach and expect people to learn.

On the student side, my personal example comes from mathematics, more specifically from probability theory. I have always hated mathematics and for a long time I just thought I am not a math person.

I realize now that there is no such thing as math or non-math person. Math is actually cool. I have always been taught math as a set of facts and formulas that need to be learned by heart, as they are, and then applied in the appropriate situation.

I've always thought that people who are good at math are somehow better adapted at remembering these abstract formulas. That they somehow have a brain that had specifically evolved to deal with all the mystical mathematical symbols and concepts.

I realize now that this was a very false preconception. Regarding probability theory, I'm slowly starting to understand it and, to my surprise, I'm finding it quite interesting and fun. No more hate.

This fact, together with the fact that I have already had a lecture in probability theory some years ago (and I really hated it back then) made me think hard if my brain is truly not equally adapted to learning mathematics.

So why do I like probability now and why didn't I like it back then? Simple. Because now I am driven by necessity to learn it, while back in school I just had to learn it because, well I don't really know why. It was just a subject in school that I had to go through.

And the major difference is that that now I have to reason as to why those formulas exist, why are they important, how can they be applied to a practical problem. Whereas in school this "why", this reason of existence, was the missing ingredient.

For example, the first lesson in probability theory started with the concept of "sample space". This may be a very useful concept, however I think it is simply wrong to introduce it as the first notion. How can one really understand what "sample space" (or any other concept) truly means, if one does not understand the necessity behind it?

In most of my learning experience, especially in math classes, the "why" was always missing. For example, in my early days, I learned about geometry and the area of a triangle. It is the famous formula: bh/2. The funny thing is that I recently realized that I had absolutely no clue whatsoever as to why the formula looks this way. Nobody told me this. Yet it is quite simple. If you fit your triangle inside a rectangle, you can easily see that the area of the triangle is exactly one half of the area of the rectangle, like in the picture below:



Wow! I mean really fucking wow! I've spent more than 25 years of my life, knowing by heart the formula of the area of a triangle, but not understanding why it is like that. How strange is that?

Putting this little formula in a very simple context suddenly made me feel enlightened. Something that I have always took for granted as a sort of a God given fact, that made absolutely no sense, seems now natural, intuitive and fun!

I am convinced that every mathematical notion, no matter how mystic it is, has a meaning, a why, a goal. It is a solution to a certain problem. Of course it is, otherwise it wouldn't exist. And the key to understanding the notion is to first understand the problem it solves. Actually, if you really understand the problem, the formula just seems natural, kind of obvious and unavoidable. But more importantly, it makes you like to learn it.

Probability theory was formalized by 2 great French mathematicians: Pierre de Fermat and Blaise Pascal sometime in the 17th Century. The interesting thing is that they built the mathematical models (the formulas) around this theory by discussing games of chance.

Gambling was their why, the problem they needed to solve, and gambling was most probably their way to make money. They had a real motivation to devise those models. They had a why. And from this "why" they started to deduce everything else.

So these guys started from the real-world (gambling) and went on to discover the mathematical world (probability).

Sadly, most of the textbooks do it the other way around. They start with the mathematical world and only afterwards go to the real world. In the beginning you get facts, theorems, formulas and so on, and at the end of the chapter you have some problems that can be solved by applying these theoretical notions.

I remember a lecture I took last semester in the Machine Learning field that dealt with the notion of Kernel Methods. The subject doesn't really matter, but what was important is how the professor never ever mentioned the "why" behind his subject.

In Machine Learning there is a very important mathematical operation called "the inner product", which is a product between 2 vectors. And this particular lecture was all about studying all the properties of this operation, in order to better understand it and ultimately implement it as an practical algorithm.

But the thing is that the professor never once mentioned why this "inner product" operation is important. He gave us formulas, cited papers, proved theorems, but it was never clear why the hell he did all these things in the first place.

Not surprisingly, I dropped this lecture simply because I couldn't learn anything from it. Remembering a bunch of formulas that had no meaning was the last thing I needed.

So I ask myself, if this "why" is so important, why is it then so absent from text books? Why is the teaching system based on giving facts and expecting students to simply memorize them? Why is teaching not equal understanding?

This has several reasons. First, schools in the middle ages were based on the scholastic method, were students were expected to memorize information and nothing more and the education system now still reflects (probably out of inertia) the old ways of doing things. 

Second, the method of giving facts makes the whole teaching process easier, more controllable and standardized (not to mention extremely boring).

But last and not least, it has something to do with the professors. 

Most professors, at least at the University level, are also accomplished professionals in their field: leading research, publishing papers, doing consulting or running their own companies. So most likely, the "why" of their subject is simply to obvious for them to realize that their students don't yet understand it.

They are also so enamored with what they are doing, find their work so great, that they probably expect every other person to find their work equally great, interesting and attractive. The reality is that most students have no clue as to why the subject they should be learning is important. And most of the subjects never have the chance to reveal their importance.

I guess most people nowadays become math persons, or computer persons, or art persons, or whatever they like, because they were lucky enough to either discover the "why" of their profession early enough either by themselves or with the help of some enlightened teacher.

2013-05-30

Never listen to the advice of famous people

I've lately observed how obsessed I am reading about famous people opinions. I want to get better at starting up my own business and for this I've started reading the blogs, essays and opinions of accomplished people in this area.

The strange thing that I have noticed is how inconsistent their stories are. Every one of them has a different opinion about how things should be, how things should be done and what is the best recipe for success. For example, regarding internet startups, some say that the best way to succeed is to find a new market, others say that you should enter an old market and disrupt it. Some are the fans of an iterative, lean, process, others are fans of big-design and planning up front. Some say that you should always hire people that fit into the company culture, others that you should maximize diversity.

The only consistent lesson I can extract from these stories is how inconsistent they are. Which is why nobody should ever listen to what these people say, because inconsistency can only lead to confusion. Which means that the more you listen to these stories, the more confused you will end up and so the less likely your chances of success will be.

There are many problems regarding telling stories after the events they describe have happened. For one, we humans tend to be extremely bad at recalling stuff. That is because recalling the past is influenced by the present: what we feel now can shape what we remember about how we felt yesterday.

I had a relationship with a girl for 3 years, but it ended really really badly. At the end we told each other nasty stuff and we cheated on each other with other people and stopped altogether speaking to each other. I was together with another girl for just 6 months, but at the end we broke up because she had to move to another country and we decided not to have a long distance relationship. 

With the first ex-girlfriend I had amazing sex. It was totally wonderful, very frequent, and very high intensity, which is probably the reason we stayed together for 3 years. With the second one, the sex was not so good, we had a bad chemistry, probably because she is actually a lesbian (after she went away she had sex with another girl which she enjoyed very much).

The interesting thing is that if you ask me now to recall and compare the quality of these 2 relationships, I would say to you that the first one was extremely bad, a waste of time, something I shouldn't have done, while the second one was good, it helped me grow, we had a nice time together and so on. I realize now that the only reason why I feel this way is because of the way the relationships ended. I am judging the quality of these relationships based on their last events, and not on what happened as a whole. In reality, I really had a much better time having sex with my first ex-girlfriend than with my second.

The famous people probably do sort of a similar thing. Because they have achieved success, they think that whatever they did was good. But just like I fail to see the good side of a relationship that ended badly, or the bad side of a relationship that ended in a good way, so too the successful people, in light of their success, fail to recall what they did bad and exaggerate the importance of what they did good.

It would be much more helpful to study the journal that an accomplished person kept while trying to get accomplished. I am sure such journals are filled with a lot of questions, doubts, confusion and frustrations and the reality of their lives was not as rosy as they present it in hindsight.

Moreover, people that already achieved success have something that people trying to achieve success don't and that is time to polish and write their stories. Not to mention that some of them also have the money to pay some professional to do it. Hence, whatever stories these people produce, they will almost always sound and look better than what happened to them in reality.

But even if we would assume that a person can recall past events with 100% accuracy, the story of famous people would still be totally worthless. That's because whatever they did worked in their specific case under their specific set of circumstances. And these circumstances cannot be easily reproduced.

I am also sure that luck plays a huge role in every success story, but we constantly underestimate the effects of chance because we, as a society, like to believe that our fates are totally in our hands.

Life is however a complex system, subject to what is called the butterfly effect. This effect describes systems that respond with dramatic changes in their output even if the input value is modified by a very small amount. The name "butterfly effect" comes from the theoretical example that a hurricane on one continent can be formed because a butterfly on another continent flapped its wings some time in the past. 

And what is human life, if not but a continuous stream of butterfly effects? A lot of big achievements start as insignificant small acts. Think about it this way: a simple smile to an attractive stranger in an otherwise very boring evening can lead to a wonderful lifetime relationship, marriage, family and so on. So too with a famous person. It may be that all of his or her fame is due to the right smile to the right person in the right evening.

It would be much more useful to compare their stories with those of people that under similar conditions tried in similar ways but didn't succeed. In this way, we would have more chances to see exactly what, if anything, made a real difference. I am sure that for each successful person that describes his story of success in a certain way we could find at least 10 people that tried under similar circumstances using a similar process, and failed. Unfortunately, people who didn't achieve success don't really have time to write up their stories, because they either busy trying again or busy feeling depressed for their lack of achievement.

So instead of reading about how to start my own company I should just start my own company. Well, I guess I will do just that.