Stock Market Tools (6) - Livermore Market Key

"MANY years of my life had been devoted to speculation
before it dawned upon me that nothing new was happening in the
stock market, that price movements were simply being repeated, that while
there was variation in different stocks the general price pattern was the same...."
- Jesse Livermore


Livermore Market Key Table. (Click to enlarge)




In his book, "How To Trade In Stock"(<-downloadable), the stock speculation king, Jesse Livermore had spent a great deal of effort to illustrate how he used his own method in determining the trend of stocks... And he named it as the "Livermore Market Key".

Although the method was published in 1940, and many traders who had read some classical trading book must have come across this Tool, this method is not popular at all. I guess, most likely, that it involves with lot of manual work in updating the table as shown above. With current technology, this can be programmed into charting format to make it more user friendly as the following chats...


In the Market Key System, Livermore applies two level of filter to double check whether the stock is in Up-Trend or Down-Trend. So at anytime, a stock is classified into one of the six states:-
1: Up Trend, - (Long - Plotted as Green in the following Diagrams)
2: Natural Rally, - (Close position and stay with Cash)
3: Secondary Rally, - (Close position and stay with Cash)


4: Down Trend, - (Short - Plotted as Red in the following Diagrams)
5: Natural Reaction, - (Close position and stay with Cash)
6: Secondary Reaction. - (Close position and stay with Cash)


In his example, Jesse Livermore use 5 points as the filter threshold for stock that go from 30 plus to 100. To make it able to use of all price range of stock, using "percentage change" would be a good choice for programming the algorithm. And, in fact, this is the ONLY parameter that needs to be taken care of...


Parameters Setting:

All the following charts are using the same setting of 10% as filtering threshold. Of course, one can go through computerized optimization to find out what value work best, over here it is just for illustration purpose.


The next three charts below are S&P500 Monthly, Weekly and Daily Chart. And are all have the Livermore Market Key with 10% threshold setting:-

SPY (S&P500) Monthly Chart: Click to enlarge


SPY (S&P500) Weekly Chart: Click the Chart to enlarge


SPY (S&P500) Daily Chart: Click the Chart to enlarge

It shows that there are more Buy and Short Signals from shorter time-frame chart, that's the daily chart. (But, the back test data show that the Monthly Chart actually gain more profits.)
The following are just some charts around the globe with this indicator:-


China SSE Composite Daily Chart: Click to enlarge:

Singapore Straits Time Index Daily Chart: Click to enlarge

UK ETF Daily Chart: Click to enlarge

Germany ETF Daily Chart: Click the Chart to enlarge

Note: The back tested data has shown a surprising fact: That's this algorithm work better in longer time frame... That is trading with weekly charts are more profitable than daily charts.

The Algorithm that describes in his book, "How to Trade in Stock" is now decoded in the form of programming flow-charts, and it can be download here.:->
Programming the Jesse Livermore Market Key

Jesse Livermore once said: "It was never my thinking that made me money but my sitting tight."
How True! People would normally think too much either win or lose in their account with the emotion of greed or fear. Only those who work with system and stick with it can sit tight.

"...providing tools that can be utilized to evaluate information is more important than providing information; that tools whereby one can use his/her judgment is more important than providing values, and demanding responsibility is more important than providing laws and rules of conduct. The latter should be the default of only those who are unable or unwilling to take responsibility." - Clara Szalai (Philosopher, Writer)






The program source code in AFL can be download from:
2) Amibroker's AFL Library.(Need some little work to re-define the plotting state.)

----------------------------    Additinal note added on 10 May 2012  -------------------------------------
Like most other single stock indicator, Livermore Market Key was designed to analysis single stock.  In his book, Livermore put recommend to put two similar stocks(same sector) next to each other as to it would help to confirm the signals. 
As of today, the market is much more complex.  It is recommend to have a overall view on the market with the concept of -> Sector Rotation <- rather than just focus in one stock.



---------------------------- Additional note added on 19 Apr 2013  -------------------------------------

Just thought of an idea.

Instead of plotting the levels indicator, one can actually plot these level lines ONTO the price chart itself.  The advantage would be knowing in advance the exact stop level instead of waiting for the indicator to switch states.

Would get back to work on this soon.

---------------------------- Additional note added on 06 May 2013 -------------------------------------

As promised on the last update, the following linked shows the Livermore Secret Market Key's Levels plotted on the price chart itself.  Very much helpful in visualizing the market action taking place and how the Market Key works!

Livermore Secret Market Key on Price Chart



---------------------------- Additional note added on 29 Sep 2013 -------------------------------------

When the Livermore Market Key fires the signals, it is the time when the Dow Theory three movements are in the same direction... 

http://blessedfool.blogspot.sg/2013/09/project-freedom-13-multiple-time-frame.html


------------------  Additional Information  Added on 06 Jan 2015 -----------------------

Excerpt from the book - Jesse Livermore's Methods of Trading in Stocks - written by Richard D. Wyckoff
//--------------------------------------------------------------------------------------------------//
HIS OFFICE EQUIPMENT

He arrives at his office ,which is on one of the upper floors of a big down town skyscraper. There is no name on the door. It consists of a reception room,private offices for some of his assistants. and his own private office,separated by swinging doors from his board.room. This is an oblong room with a long silicate quotation board on one side and a row of windows opposite. On the board are exhibited quotations for thirty or forty of the leading active stocks, and a few each of the active futures in cotton, wheat, corn and oats. The quotation board is not arranged according to the ordinary custom prevailing in brokerage houses. The changes in quotations are not posted by means of printed tickets containing merely the opening, high, low and last figures; instead , each stock has its own column running the full length of the board. in which the various changes in quotations are written with chalk, with the numerous sales strung along down below the abbreviations. He prefers this kind of board because it gives him a line on the swings of a stock, the extent of its rallies and reactions, as well as its relative activity. The volume of trading does not appear on the board; he gets this from the tape.

(Also in the the book - there is a concise chapter on Tape Reading)
Chapter 4. How Livermore Reads The Tape
                 How He Judges The Turning Points
                 How He Plays The Intermediate Swings

//---------------------------------------------------------------------------------------------------//
For those who are interested in Livermore methodology, you probably had read the book -   Reminiscences of a stock operator written by Edwin Lefevre. (PDF version is easily available by online search.)
Just the first few pages, it disclosed the method that brought him into the stock market as a child.  What is it???  --> TAPE READING!

In Short, the Jesse Livermore Secret Market Key is NOT COMPLETE without integration of the trading volume from Tape Reading.





Enjoy. :-)



Bless You
KH Tang


HOME

48 Comments->:

Anonymous said...

Hello,

In the explanation of chart one, "Refer to Explanatory Rule 6-B" is incomprehensible; I suppose that it is rule 6-C?

6(b) When a reaction occurs to an extent of approximately six points, after you have been recording prices in the Natural Rally column, you then start to record those prices in the Natural Reaction column...
6(c) When a rally occurs to an extent of approximately six points, after you have been recording prices in the Downward Trend column, you then start to record those prices in the Natural Rally column,...

And there are other typos in the explanations...

KH Tang said...

Hello, Anonymous

I did not discover any wrong description with the original rules while I was working with it.

Thanks, MS-Words has help me to correct a couple of typos.

Bless You
KH Tang

Lucjs said...

Hello again,

Can you explain how rule 6-B applies to April 2nd, when "prices began to be recorded in Natural Rally column."?

The typos are in the book, not yours, sorry for the misunderstanding ;-).

Thank you,

Luc

KH Tang said...

Good evening, Lucjs

I was decoding the table at least 4 years back. So, I can not simply recall the individual rules.

On the other hand, I can tell you this...
Despite that I had 10 over years of software programming experience while I was with some engineering firm... When I first trying to decode the tables, I was confused and thought that there might be some mistakes in the rules or table entry or what...

But, I did not just give up. I tried to decode it the next year yet no result. Only when I tried again (3rd attempt) another year later... I see the picture.

For that reason, I put up the flow chart to save other's time.

Bless You
KH TAng

Anonymous said...

Hi KH, I can't see your flow chart. Clicking on the "Programming the Jesse Livermore Market Key
" link is only showing the Jesse's table from the original book.

thanks,
DavidC.

KH Tang said...

Good afternoon, DavidC.

On the lower portion of the article, there is a link to bring you to Scribd.

Yes, the first page show the table, and there are a total of 12 pages in the PDF document... You can download it or flip the page on your screen.


Bless You
KH Tang

Anonymous said...

KH Tang
Thank you for the Livermore market key
can you please share the ATR based stop loss indicator afl (or the formula) as well
Thank you
AKKI

KH Tang said...

Good evening, AKKI

That particular ATR formula was given to me by a trading friend who asked me to code it into AFL originally he purchased for his MetaStock system some 4-5 years ago. So, I will keep the promise not to share that particular code.

BUT, nevertheless, all ATR Stop and Reverse indicators that I come across perform about the same. I don't see which one is particularly superior than other every year over a longer period of time.

You can get a good and similar one from the TASC magazine on the June 2009 issue. The Complete Workable AFL code is in the Amibroker member section. ALL YOU NEED TO DO is to change the plotting to :->

Plot( trailARRAY, "ATR",IIf(C>trailARRAY, colorGreen,colorRed), styleNoLine|styleDots );

You'll get what you see.

Bless You
KH Tang

Anonymous said...

Thank you for quick reply
I will try to change the plotting this way it is neat

Thank you once again and Happy New Year !!!!

Harley Wong said...

Thank you very much KH for this wonderful tool. I backtested the Philippine market on a 25 year period, and got a 5000% cumulative return with a 50% max drawdown. :) great work!

KH Tang said...

Good afternoon, Harley Wong

Well, the Great Work goes to Jesse Livermore! I am just the messenger. :-)

In my view, Yes, his tool still works, but not for daytrader, nor get rich quick scheme. And if someone is having a full-time job, this tool can help him to not only protect his asset, but also generate profits from it.

On the other hand, 50% drawdown is way too much.

Bless You
KH Tang

Nirman broking said...

Thanks so much for this! I haven't been this moved by a blog for a long time! You’ve got it, whatever that means in blogging. Anyway, You are definitely someone that has something to say that people need to hear. Keep up the good work. Keep on inspiring the people!
regards:
Stock Market

KH Tang said...

Good day, Nirman broking

You're welcome.

As Abert Einstein had said:"The world is a dangerous place to live; not because of the people who are evil, but because of the people who don't do anything about it."

I find that this is particularly true in the financial world. So, just do my part to share some stuffs that I have learnt.

Bless You
KH Tang

Anonymous said...

Hello KH Tang,

After much searching on this topic, I came across your blog. You have clearly spent a lot of time and effort in constructing this ... and well done to you for sharing !

Have you (or do you know anyone?) that has converted this code for use in prorealtime?

Thanks again for sharing your work and experience with others.

Kind regards,
Nigel

"The place to improve the world is first in one's own heart and head and hands, and then work outward from there." == Robert M. Pirsig

KH Tang said...

Good day, Nigel

Yes. The code work in any time frame, including intraday.

And, the user must know what % number to set in order to get it work properly.

For example, in the daily time frame, if one set to 10% to use it as a trend follower...
When he change to intra-day, he must reduce the % level, or it would seems to stuck at a level for long time.


Bless you
KH Tang

Anonymous said...

Hello again KH Tang,

Sorry for my lack of clarity in my question :D

"prorealtime" is a trading platform (prorealtime.com) and is free with end of day prices, or pay for live prices.

The last few pages of the programming guide ( prorealtime.com/en/pdf/probuilder.pdf ) describes the syntax used. (I am not a programmer :D))

I wondered how difficult it would be to convert your code for that platform?

Kind regards,
Nigel

KH Tang said...

Good morning, Nigel

I took a look at the information your provided...
It is not likely that this program can be ported over to that platform due the the complexity.

Also a point to note is that, not for this case as I already opened the source code and algorithm, it is not wise to write all code in the Web-based software! The administrator of the web can have access to all code, even if password protected. Same problem go to cloud computing!

Bless You
KH Tang

Anonymous said...

KH Tang - thanks for the info :-)

Kind regards to you,
Nigel

Anonymous said...

Thank you so much KH Tang for generously sharing your substantial work with all of us. I really appreciate your altruism !! God Bless - Jay S

Anonymous said...

i think you should test all time high with livermore market key. here is free code i found. livermore always invested at new high prices. so did William o Neil, Nicolas Darvas, Brendon Glett and many more.

http://www.wisestocktrader.com/indicators/1808-all-time-high-exploration

Anonymous said...

can your indicator be used as a filter and an indicator? is that what the classification part is about? also investing in top sectors is another key to livermore.

my suggestions

all time high
invest in top sectors top 3 or 5
use livermore market key to manage trades
use turtle trading money management code.

of course check the s and p first to see if market is above pivotal point with your indicator.

KH Tang said...

To the two Anoymous above:

Any idea than can be platted as an indicator can also be used as a filter. And, it can be back-tested and be part of the system as a component.

A century a ago, the market was not having personal computers and don't have something call High Frequency Trading that produces so much noise into market as of today.

Therefore, in my view, if the old gurus such as Jesse Livermore,Nicolas Darvas, etc. were to be alive, they would evolve their system to adapt to the current environment. As today environment is too complex to simply use a Single Indicators a full decision for trading.


Bless You
KH Tang

Anonymous said...

Can you tell me where your friend obtained the Metastock version or where I can find the formula
for The Market Key for MetaStock?

KH Tang said...

Well, I don't know if there is a MetaStock Verson for The Livermore Market Key. But, I know that WealthLab also has a scrpit on that.

The MetaStock ATR system is commonly avaiable in the MetaStock Zone Formula... Check here:->
http://blessedfool.blogspot.com/2012/01/project-freedom2-in-search-of-heaven.html

Anonymous said...

Thanks for your quick reply.

Cheers

Anonymous said...

Hi KH Tang, thank you for sharing your work, you made Livermore's system a lot easier to understand.

I just have one question. I understand that a buy signal is to be generated by your indicator after a successful penetration of the last Natural Rally as stated in Rule 5(a). I was wondering if you also included Rule 9(a) as a condition for buying? Where the price stops short of the last recorded price in the Downtrend Column?

Thanks again

KH Tang said...

Good day, Anonymous

I had not been using this algorithm for quite some time... Mainly becuase the market is getting too volatile and this algorithm is not respond fast enough for my time frame.

Having said that, it does not means that is totally no use, it would be a good shield for working class people who do not have much time to monitor the market (for example.)

As for the entry and exit, I would recommend everyone to do a backtest, over a long period of time, with different entry and exit level, with different markets... Then one will know the "Probability record" in the history. Then, one would know how to manage the trade with any that indicator.

Bless you
KH Tang

Anonymous said...

Good morning:

I worked on your suggestion to search the Wealth Labs for the MetaStock code but without luck.

Am I missing something or can you provide me more details.

Thanks LT

KH Tang said...

Good day,

http://blessedfool.blogspot.sg/2012/01/project-freedom2-in-search-of-heaven.html

There are a few sites have collection of codes. If you want only MetaStock code, then you have to click on the first link there. (But, not all site has the Livermore market key )

Bless You
KH Tang

Anonymous said...

Good morning:

I have recently imported your codes into AMIPRO and I managed to display the various stages including the uptrend and downtrend.

I do not have much experience using the Market Key. Could you provide me the key points about this "Market Key":

1. in what way it can help the trader
2. do you scan stocks that have just turned to uptrend or down trend
3. did you suggest the trader should be out of the market when it is neither up trend nor down trend.

Appreciate your earliest reply.

Thanks in advance ... LT

KH Tang said...

Good day, LT

The Livermore Key was coded as it is from the book. As of today market, I believe that if Jesse Livermore would to be here, he would have added something else to enchance the respond time.

The man in the following link had modified it to be very profitable:
http://blessedfool.blogspot.sg/2011/12/personal-finance-7-realistically-whats.html


If one do not know how to add exploration code into the platform, it means that he just need to join the Amibroker forum to do his homework. Then, he will be able to do it himself. Take your time. Been there, done that. :-)


Bless You
KH Tang

Anonymous said...

Good day,
I tried to rewrite it for Metatrader 4. But I wasn´t able to get it to run. Anyone has managed to get it run on MT4 or can help me to rewrite it for MT4.
Cheers

KH Tang said...

Good day, Anoymous

If you would like to rewrite it in any other platform, the best place to ask for help is to post in that particular platform forum. That would increase your chances of getting thing done.

Bless You
KH Tang

Mark Josam Quinones said...

Sir, Good day!
I have a question regarding back testing the formula using Amibroker. When I'm changing the threshold variable (%) using the parameters tab, the analysis gives the same result which is from the 10% threshold. How can i solve this problem? Thank you.

KH Tang said...

Good day, Mark

This forum is to share the key concept of stuffs that I came by or developed.

If you have any question on AFL backtesting, the yahoo Amibroker forum could be a good place for you to get your solution.

Bless you
KH Tang

Mark Josam Quinones said...

Thank you, Sir. I discovered the answer earlier this morning. :)
I appreciate your work.

-Mark

shahadat hussain said...

By the end of the 1960s, pension funds,
insurance companies and individuals owned 67% of all the shares on the Share Market.
But today they are just minnows next to the global hedge funds that really control Britain's companies.

SHRISTOCKTIPS said...

Share Market Investment made profitable by SHRISTOCKTIPS- Get NSE/BSE Tips via SMS and Yahoo Messenger. We give daily stock market tips for future and cash segments. As said last time we made a buy position in NIFTY around 6300-6400 we booked the profit at 6600 level. Our all paid & trial clients made a very handsome profit. Now for the coming week we suggest all theINDIAN NSE, STOCK TIPStraders to make a sell position in NIFTY around 6700-6750 for the target of 6300-6200 with stoploss of 6900.Traders can also make a sell position in all NIFTY 50 stocks according to the level of NIFTY. Please trade with strict stoploss because there may be a high volatility in the market. For Further update keep following our website & you can also avail our two days trial to check our accuracy.
Regards
SHRISTOCKTIPS TEAM

Sofiya Lim said...

Favourable post, mentioning about SGX stock picks and various product reports on daily,weekly and monthly basis.

Anonymous said...

Hi KH Tang,

Thanks for your great effort, dude.

I have a question, Jesse Livermore said in the book that he had to compare and record price of 2 similar stocks (then the output will be the "Key Price") since recording only 1 stock price could lead to wrong signal.

I have 2 questions :

(1) I have a confusion in determining criteria for this "similar stocks", what makes stocks similar? Same industry, same size, same trading volume, etc ?

(2) In comparing index, lets say S&P 500, as you stated in illustration above, can we just comparing this one index? i mean we don't need to have another "similar index" to compare?

KH Tang said...

Good day, Anonymous

1) In his book -> he use two leading stocks from the same industry.
2) In the olden manual way, they compare to key market index. Richard D. Wyckoff created his own index. As of today computer speed, compare as much as you could or like. Like William O'neil IBD, I compare all the stocks in my database and rank them according with a improved algorithm in multiple time frame too.

Also to point out, Jesse Livermore did not mentioned anything about the Tape Reading in his Secret Market Key... Which is a key factor for him to detect the "Distribution and Accumulation" of the stock. Also, it can use to compare the degree of Disribution or Accumulation for him to decide which stocks to take.

My learning experience is this... The Proper way for self learning is to study Wycoff D. Richard course. The Reason is that amoung the few equal name Gurus at his time, such as Jesse Livermore and W.D. Gann, ONLY Wycoff putting lot of effort in consoliating his experience into Public Course.

There are many books floating around in the web that one may find...
BUT, I consider that may be not a easy start for most beginner...
The BEST MATERIAL is from "Wykoff Stock Market Institute."
https://wyckoffstockmarketinstitute.com/course.htm
This is probably the best course for public from very basic to advanced lavel.
I have no connection this institution. I recommend not just here, but many other people and other Q&A or blog, it because, as a self-learned trader, I wished someone would have recommended this to me long before I discovered it myself, it is a good course and it could save you both money and time.

Bless You
KH Tang

Andrew said...
This comment has been removed by the author.
Andrew said...

Hi KH. Was this made into an indicator? I could not find it. I was wondering if anyone did a conversion into MT4.

Great work. Great blog.

Market Indicators said...

Thank you for this information.

Anand Agrawal said...

We provide best intraday tips,100 accurate intraday trading tips and jackpot share market tips. Call now +91-8486224486
share market tips
intraday trading tips
intraday tips

Leah Graham said...

We have trading rules that we need to obey. Trading is not just about making money but is also about discipline.
Trading Rules

Ram Katariya said...

For Beginners, trading with valuable Stock tips and advices from Epic Research will be profitable if they follow strictly.

Anonymous said...

any updates for this formula , or this the last one ?

Post a Comment