Check out "The Power Laws"

marcus

Active Member
#1
The following is an article I came across on the internet and I subsequently found the following two articles whilw researching "the power laws"

For someone who claims to be an avid stock market trader, Nalin Pasricha is fairly 'chilled out'.

By 11am, most traders would already be into the thick of trading, aggressively trying to cut losses or hit home runs.

But you won't catch Nalin with the phone to his ear or eyes glued to his computer screen. On the contrary. He has a fairly flexible agenda interspersed with periodic checking of the market.

Does he have a lot of flunkies to do the job? Nope. It's a one-man show.

Yet, by the end of the day, he would have completed at least a few crore in volume for himself and his clients.

And his returns? An average of over 100 per cent per annum.

The number of stocks he would have traded in? A maximum of (just) 30. These chosen few are selected from various sectors and are available for derivatives trading on the National Stock Exchange.

How does he manage that?

Upfront, Nalin comes clean: "I am not an investor but a trader." A derivatives trader, to be more precise.

An investor will think long-term, analyse the fundamentals of the company before taking a buy-and-hold position and then hope to benefit by dividends and compounded business growth leading to a substantial capital gain.

A trader is not that far sighted. His rationale: even if a stock continues a gradual upward trend, there is money to be made in the journey. Every climb and descent has potential for returns. You make money when the market is going up or down. If you keep buying and selling at various positions, you would end up continually making (and even losing) money.

It is at this juncture that Nalin parts company with other traders.

Most are discretionary traders but Nalin is a systematic trader (a rare breed in India).

Discretionary trading is subjective. Based on news, market information, research and technical analysis, a decision is made on entry, exit and position size.

A systematic trader relies on the decisions generated by his software programme. Based on mathematical relationships and various inputs, the system operates on a set of rules.

For instance, a very simple rule put into the system could be: Buy when the PE goes down for three consecutive days and sell when it goes up for five consecutive ones.

The system would automatically buy and sell based on these rules.

Does systematic trading work? If past performance is anything to go buy, the answer is a resounding yes!

A walk into the past

A chartered accountant by profession, Nalin found himself working as an investment banker (a job coveted by others but detested by him) with Jardine Fleming and J P Morgan.

One night, a friend in the Navy invited him over for a meal and asked him to verify a trading system that timed the market. The first trade his friend gave him was: Buy RIL on Wednesday, sell on Thursday.

Totally flabbergasted and cynical, Nalin did so. It worked.

Then he did it with Dr Reddy and a few others. It worked again! Well, almost (there were losses too). Intrigued, he decided to pursue this.

Another friend who raked in big bucks just by investing on fundamentals told him he was barking up the wrong tree (he heard this a lot).

Partly out of a passion to make money out of this system and partly out of a desire to silence his skeptics, Nalin got cracking (at the cost of putting his career in investment banking on the line).

Starting 2002, Nalin spent a year (unemployed and avoiding skeptics) focussed solely on research, study of quantitative analysis, mathematics, statistics and computer programming to come up with a system. He purchased NeuroShell Trader for over Rs 100,000 and Wealth-Lab Developer for around Rs 25,000. Both were software trading development platforms to help launch his product.

Not making much of a headway, he almost gave up. Thanks to a stranger-than-fiction coincidence, he came across a paper authored by Xavier Gabaix, then assistant professor of economics at Massachusetts Institute of Technology, and a few physicists.

The paper, published in Nature (May 15, 2003), claimed that just as it was possible to determine an earthquake, it was possible to determine the direction of the market.

The essence of the paper was that the artificial world (stock market) follows a similar pattern to that found in the natural world. So though the stock market is characterised by a fair amount of randomness, at the end of the day, a pattern emerges that matches power-law (mathematical relationships between the frequency of large and small events) patterns found empirically in data from systems such as earthquakes.

Totally fired up, he once again tried his hand at it. This time, he came up with a product which he called Seismo (in honour of the above paper which set him down this path).

He then spent months back testing the system.

His software combines trend following and anticipatory systems. So if the market is on a rise, the system goes long and if it is sliding downward, it goes short. This way, it follows the trend. Simultaneously, it also predicts the direction of the market with advanced mathematical computations. But here too, the predictions are just for a few days, not long term.

The rules his software follows are based on a variety of inputs such as price trend of the stock, volumes traded, interest rates and data from the derivatives market.

Though he has been trading using other systems for the past three years, his product - Seismo - was ready by August 2003.

Every evening, he looks at this software and sees the recommendations on each stock. By 10 am the next morning, he places the trades.

Where's the catch?

Nalin has been trading in such a way for the past three years. Which brings us to the perennial question asked of traders: How has he fared in a prolonged bear market?

In a bull run, everyone and his aunt, would have made money. But the test of a savvy trader is how much of dust he manages to kick up when the bears are doing a jig on Dalal Street.

Nalin has not had the experience of systematic trading in a bear run so all we have to go by is how he has traded with sharp corrections.

May 17, 2004

As news of NDA's (National Democratic Alliance) defeat began doing the rounds and Leftist leaders started shooting their mouths off, the stock market fell precipitously.

The Sensex fell 842 points during the day and recovered around 300 points. At the end of the day, when the stock market closed for trading, the Sensex had fallen 11.41 per cent or 565 points -- the second biggest fall in the history of the Bombay Stock Exchange. The Nifty opened at 1582 and closed at 1388.

That day, when other traders would have lost their shirt (and probably their pants too), Nalin could not wipe the grin off his face. He made a cool 50 per cent profit on his personal portfolio. One of his clients booked profits midway through the day and landed up with a 60 per cent profit.

All he did was short sell and leverage. Or rather, his system did so.

October 2005

The market turned volatile and the much talked about, inevitable correction took place. Nifty touched a high of 2699 and a low of 2390 that month. Overall, the market dipped 8.85 per cent. He made a 25 per cent return on his portfolio.

Does that mean his software generates phenomenal returns consistently? He himself is quick to refute that claim.

Here's how he explains the downside. On an average, around seven months in the year will make money. So, if you invest Rs 10 lakh (Rs 1 million), you should make around Rs 300,000 a month, which will translate into an annual earnings of Rs 21 lakh (Rs 2.1 million). The losses for the balance five months would be around Rs 200,000 per month, which will total to around 10 lakh (2 lakh x 5 months).

The net profit per annum on Rs 10 lakh, would be Rs 11 lakh {(Rs 1.1 million) over 100% return}.

Nalin also clarifies that a single year may not give an over 100 per cent return, but over a few years, it all averages to that.

So who does he trade for?

He refers to himself as a prop trader. Nothing to do with real estate; its an abbreviated version of proprietary trader.

When a financial firm trades in stocks, bonds, derivatives or commodities with its own money (and not those of its clients and customers) and with the sole aim of making a profit for itself, it is referred to as proprietary trading.

Sometimes, they hand over the task to another (like Nalin). He gets a percentage of the profits.

His clients are stock brokers, trading companies, corporates and high networth non-resident Indians. Ask him to name a few and he does not oblige - breach of confidentiality, he says.

Ask him how much he makes and all you get is a grin in response (a very self satisfying one). Taking into account that he gets 25 per cent of the profits of his clients (no other fee is charged) and the fact that he actually trades for himself, you can just let your imagination figure that out.

Not bad at all for someone who spends the better part of his day 'chilling out' and figuring out how to upgrade his system to come up with a version for commodities trading.
 

marcus

Active Member
#2
What are the power laws about?

POWER LAWS SHOW HOW BIG PLAYERS SHAKE THE MARKET
Many stock-market investors may feel they have been shaken by an earthquake in the past few years.

In fact, the market behaves like earthquakes, holds Xavier Gabaix, an economist at Massachusetts Institute of Technology. It bumps up and down in a somewhat predictable pattern, similar to the earth's tremors.


Stock prices may be looking better this year. The Standard & Poor's 500 stock index shot up nearly 15 percent in the quarter just ended.

But because stock-market movements, though man-made, behave with the mathematical elegance frequently found in natural systems, investors can expect another crash ahead like that of 1929 or 1987, or the more recent one.

The problem, notes Mr. Gabaix: You can't predict exactly when it will hit - a decade from now or in 50 years.

Nor can market regulators do much about crashes. Gabaix doubts the "circuit breakers" imposed by major stock exchanges to restrain price movements during a rough day will do the trick. But, he adds, perhaps a major injection of liquidity into the financial markets by the Federal Reserve could limit a crash.

Gabaix's views arise from research he conducted along with H. Eugene Stanley, a Boston University physicist, and two other associates.

They examined more than 100 million stock trades from 1994 through 1996 at the New York Stock Exchange and markets in Britain, Canada, Japan, and seven other nations. Their findings (indecipherable to most) were recenty published in Nature, a science magazine.

The four found that for the market as a whole and for an individual stock, the daily volume of stocks traded, the number of trades, and price fluctuations follow "power laws."

For instance, the number of days when a specific stock price moves by 1 percent will be eight times the number of days when that stock moves by 2 percent, which will in turn be eight times the number of days when that stock moves by 4 percent, which will in turn be eight times the days that stock moves by 8 percent, and so on. The same pattern characterizes the number of daily trades.

An inverse power law describes the number of shares of a specific stock traded each day. For example, if 100,000 shares of IBM stock were traded on 512 days during a certain period, then it could be predicted that there would be 64 days when 400,000 shares of IBM stock were traded, and eight days when 1.6 million traded, and one day when 6.4 million shares traded.

The patterns applied in all the markets they examined, even though national economic systems vary. "It is surprisingly consistent," says Gabaix.

Although the new knowledge may be intriguing, an ordinary investor won't be able to profit from it. It doesn't tell whether a price move will be up or down, only its size. "At this stage, it's largely pure science," says Gabaix. Perhaps those trading in options on stocks could benefit from knowing that price movements tend to move in certain-size jumps and not smoothly, Gabaix speculates.

Stock-market prices and trading volumes are governed by the millions of buy-and-sell decisions made by multitudes of investors acting on their own complex judgments.

This has led to the "efficient markets hypothesis." This academic theory holds that it is extremely difficult for investors to consistently get a return on their portfolios better than that of an appropriate market average. This is popularized as the "random walk" or "dart board" theory - that over time the investors who choose a portfolio of stock by throwing darts at a listing of stocks will do as well on average over time as those carefully selecting a portfolio.

Gabaix figures his "power law" doesn't violate the random walk. But Burton Malkiel, a Princeton University economist who is a major proponent of the random walk, says he's "suspicious" of any finding of regularity in stock-price changes. There is, he says, an infinite variety of variations.

Gabaix attributes the power-law patterns to the major influence on stock markets of large financial institutions, such as mutual funds or hedge funds.

When these institutions, each with more than $100 million in assets, decide, for instance, to dump a stock under time pressure, they move the market. Sometimes their decisions may be based on news about a stock.

Last month, the Internal Revenue Service reported that the nation's Top 400 taxpayers reported a collective income of nearly $70 billion for 2000, with an average of $174 million. They accounted for 1.09 percent of total US adjusted gross income, more than twice the Top 400's share for 1992.

But Gabaix doubts their individual trading power matches that of big institutions
 

marcus

Active Member
#3
hocus-pocus or not here's some more info I found wish I could find the original article in nature magazine

Stock market crashes follow a similar pattern of predictability to earthquakes, according to a new study.

Major financial events adhere to distinct patterns - or "power laws" - according to research at the Massachusetts Institute of Technology and Boston University.

"The frequency of crashes such as those in 1987 and 1929 follow these patterns," said Prof Xavier Gabaix, lead author of the paper in Nature.
advertisement

The "power laws" describe mathematical relationships between the frequency of large and small events. For example, the number of days when a particular stock price moves by one per cent will be eight times the number of days when that stock moves by two per cent, which will, in turn, be eight times the number of days when that stock moves by four per cent, and so on.

Another power law is used to forecast the chances that an earthquake of a given magnitude will occur. "Fortunately, in Tokyo, they build buildings so that they don't succumb to earthquakes. We need to do the same thing in economics," said co-authors Dr Parameswaran Gopikrishnan and Dr Vasiliki Plerou.

When applied to a precise computer model, the power laws might help market analysts to predict a crash, though not necessarily prevent it. "We want to understand financial earthquakes in order to protect people like you and I whose retirement is tied up in the markets," said Prof Eugene Stanley.
 
U

uasish

Guest
#4
Marcus,
Many thanks for opening this new vista of knowledge.Sometimes i feel we must get more than 18.5 Hrs (24 - 5.5 ) to learn & implement.Somehow all my projects are so delayed i get crazy.Where to squeeze in the 'Quality Time' with family members.If only i had ,prior knowledge of C++ & age in my favour,see only 3 mins left for Opening.
Asish
 

marcus

Active Member
#5
Dear Dada,

Not necessary to know c/c++ although it would help but you can do everything you desire with the following programs with minimal /almost no programming experience

Fret not for I quote from Dr. Brett's site:

One of the real hurdles to testing trading ideas is that traders may lack the skill sets of a programmer such as Henry. While such platforms as TradeStation and Wealth-Lab Pro simplify the programming required--it's not necessary to code from scratch--even those programming languages (and the time needed to master and apply them) may prove daunting for traders.

Enter the newest generation of tools that define and test trading ideas with no programming required whatsoever. The price one pays for such ease is typically a loss of flexibility: these platforms only test pre-defined indicators or systems (although those with some programming background can often add their own). The benefit is that such testing can be carried out across a variety of stocks and trading instruments, so that it becomes possible to see which markets can be traded with various combinations of indicator conditions.

1) Neuroshell trader - has won the best AI software for several years in a row by stocks and commodities magazine for 2003 2004, 2005, 2006, 2007 (even wealth-labs developer has a fuzzy logic plugin but its a bit hard to use)

2) Trading Blox

3) Trade Ideas

4) Worden Blox

Why not try an evaluation copy?
 
U

uasish

Guest
#6
marcus,
Somehow if it is not self coded i cant be sure ,whether my concept is rightly interpreted by the coder.This is not RSI are 2 MAs so that i can use a canned one.The near right ones will have less no. of 'Epochs' & take less time to 'Train',on sample data or on out of sample data or Walk Forward ,etc.
Asish
 

beginner_av

Well-Known Member
#7
Dear Dada,

1) Neuroshell trader - has won the best AI software for several years in a row by stocks and commodities magazine for 2003 2004, 2005, 2006, 2007 (even wealth-labs developer has a fuzzy logic plugin but its a bit hard to use)

2) Trading Blox

3) Trade Ideas

4) Worden Blox

Why not try an evaluation copy?
Because none of them provide Sir!
 

marcus

Active Member
#9
CV even neuroshell trader does they claim full money back gurantee (refering to the EOD one) the reply wasn't intended for beginner_av, it was meant for dada who already know's how to get the programs if he wants em.
 

Similar threads