You need to register separately on the Chart Forum
- see Chart Forum Help
Edit Profile Profile Help Help
Forum Rules Forum Rules Advanced Help/Instructions Advanced Help
Search Last 1|3|7 Days Latest Posts Latest Posts
Search Search Forum Tree View Tree View
   

LOG scale for Volume: a solution for you...

Chart Forum » Support » LOG scale for Volume: a solution for you...

««  Previous  Next  »»

This topic has been replaced by our new Incredible Support Tracking System. If you need support please submit a Support Request.

 
Thread  
Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message

Top of pagePrevious messageNext messageBottom of page Link to this message
luigidedeo
Member
Username: luigidedeo

Post Number: 4
Registered: 09-2004

Rating: 
Votes: 1


Saturday, October 02, 2004 - 02:56 am:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Hi Colin,

I assume what we want achieve here is to resolve with naked-eye differences BETWEEN orders of magnitude and differences greater than 2x WHITHIN the same order. We dont care about differences less that 2x (or 1.5x) within the same order. Which is something reasonable.

What does it mean?

1) We want to keep the visibility of differences between eg: 1, 10, 100, 1000 (BETWEEN)

2) But - at the same time - we dont want to lose the visibility of the difference between eg 10 and 20, 100 and 150 or 200, 1000 and 1500, and so on. (WITHIN)

3) We dont deem relevant differences comparable to 1 order of magnitude below the reference. We dont pay attention to differences between eg: 10 and 12; 100 and 120; 1000 and 1100, etc...

Now if you use the LOG scale appropriately, it is excelent for this purpose.

Here it is how you should set it up. Nice and easy.

1) Take the minimum of the volumes in the Time-Window shown in the chart.
2) Name this minimum as Vm
3) Calculate for each day: Vl=LOG(Vd/Vm)
LOG is log base 10
Vd the volume of the day
Vl the transformation of the volume of the day
Vm the minimum Volume in the Time Window
4) Display the series on Vd by adding to each a baseline equal to Vm so that:
Vl-display= Vl + Vm

5) You might wanna mark horiziontal lines that mark orders of magnitude (LOG10/Vm, LOG100/Vm, LOG1000/Vm) for the unaccustomed eye.

Why this is OK?

1) No negative Vl values as Vd>Vm always by definition
2) Fuflill requirement 1/2/3 above mentioned
3) No discontinuity in Reference(Vm) whithin the window shown...

Attached a quick example of the effect we get. (It's just a quick excel, dont expect nice stuff)

What do yo think?

Regards

Luigi
application/octet-streamLOG SCALE VOLUME EX -- EXCEL
log scale volume.xls (16.4 k)



Top of pagePrevious messageNext messageBottom of page Link to this message
colin_twiggs
Member
Username: colin_twiggs

Post Number: 1326
Registered: 09-2002

Rating: 
Votes: 1


Saturday, October 02, 2004 - 10:17 am:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Thanks Luigi

That looks very interesting.
So we plot the log rather than a log scale. It should be fairly straight-forward to implement.

Regards
Colin







Top of pagePrevious messageNext messageBottom of page Link to this message
colin_twiggs
Member
Username: colin_twiggs

Post Number: 1377
Registered: 09-2002

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 06:12 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Luigi

I have played around with some figures and plotting the log (base 10 or natural log) fails to highlight the significance of changes in volume.

See attachment below.

Regards
Colin

application/vnd.ms-excelvolume log
volume_log.xls (18.9 k)



Top of pagePrevious messageNext messageBottom of page Link to this message
colin_twiggs
Member
Username: colin_twiggs

Post Number: 1378
Registered: 09-2002

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 06:22 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Volumes in the middle range (2m to 5m) appear very similar in size. Only the largest spike (20m) stands out.

Regards
Colin


Top of pagePrevious messageNext messageBottom of page Link to this message
mosaic1996
Member
Username: mosaic1996

Post Number: 979
Registered: 01-2003

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 06:42 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Luigi, Colin,

Doesn't matter whether you use Log10 or Ln as they are essentially the same in that the bars have the same relative height, i.e.,

Ln(Vol) = Log10(Vol)/Log10(e) = Log10(Vol)/constant

so only the y-axis scale changes.

To make the bars standout you need to apply some other transformation to have the desired effect, i.e., to increase the percentage of screen real estate assigned to normal volume ranges.

You also have to look at data that replicates the problem.

I would suugest the following data point

40m bigger spike
20m big spike
2.5m normal very high volume
1.5m normal high volume
1.0m normal volume
0.5m normal low volume
0.1m normal very low volume

I have done some work as posted on another thread http://www.incrediblecharts.com/userscripts/forums/show.plx?tpc=24&post=51740#PO ST51740

PLOT-t = LOG( (VOL-t + VOL-scale) / VOL-scale)

where
PLOT-t is the plot point at time period t
Vol-t is the actual volume at time period t

and I would try Vol-scale to the follwoing values as a starting point
40.0m (max vol)
20.0m
2.0m
1.0m
0.5m
0.25m

Luigi, if you have the time could you code and post charts for the model that I have suggested.

Please let me know if the above doesn't make sense and I will try and explain it better.

Cheers,
Mosaic

(Message edited by mosaic1996 on October 12, 2004)


Top of pagePrevious messageNext messageBottom of page Link to this message
colin_twiggs
Member
Username: colin_twiggs

Post Number: 1380
Registered: 09-2002

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 06:50 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Mosaic

Your formula best highlights the differences in the mid-range. See attachment below.

What is the purpose of the Vol-scale? Is this to avoid Log of zero errors?

Regards
Colin


Top of pagePrevious messageNext messageBottom of page Link to this message
colin_twiggs
Member
Username: colin_twiggs

Post Number: 1381
Registered: 09-2002

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 06:51 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



application/octet-streamvolume log mosaic
volume_log.xls (20.5 k)



Top of pagePrevious messageNext messageBottom of page Link to this message
mosaic1996
Member
Username: mosaic1996

Post Number: 980
Registered: 01-2003

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 06:53 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



One other aspect that you have to consider is that the method used has to also work for normal volume.

So in the above examples, you could eliminate the 2 volume spikes from the data (40m and 20m) and use Vol-scale values of 2.0m (non-spike max), 1.0, 0.5, and 0.25.

Cheers,
Mosaic


Top of pagePrevious messageNext messageBottom of page Link to this message
mosaic1996
Member
Username: mosaic1996

Post Number: 981
Registered: 01-2003

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 07:06 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Colin,

To better understand the issue, can you change the data points to the volume data that I suggested - or something similar.

The objective of using scale factor is to make the numbers smaller which then makes the relative logs differences larger, which means that you make better use of screen real estate.

Rewriting the formula to highlight the two parts

PLOT-t = LOG( Vol-t/Vol-Scale + 1) where you can more clearly see the scaling factor and the +1 is to make sure that all plot values are >= 0.

Cheers,
Graeme (alias Mosaic - I am sure that I am going to write Mosaic in a legal document in the not too distant future)


Top of pagePrevious messageNext messageBottom of page Link to this message
mosaic1996
Member
Username: mosaic1996

Post Number: 982
Registered: 01-2003

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 07:08 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



The +1 also avoids Log(0) errors and results in a PLOT-t = 0 for Vol-t = 0.

Cheers,
Graeme


Top of pagePrevious messageNext messageBottom of page Link to this message
macka
Member
Username: macka

Post Number: 75
Registered: 10-2003

Rating: N/A
Votes: 0


Tuesday, October 12, 2004 - 08:39 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Mos

Mate, you are going to have to get a life.

I just hope that you are not a blood donor. I am sure that it would come out black as your oil industry knowledge would make any Saudi Arabian green with envy. Are there any oil industry issues that you are not across ?.

And what are these formulae that you and Colin are exchanging all about ?.

So no other option. When we can convince the Captain to have another table you must again grace us with your presence.

Regards....Macka...


Top of pagePrevious messageNext messageBottom of page Link to this message
colin_twiggs
Member
Username: colin_twiggs

Post Number: 1384
Registered: 09-2002

Rating: N/A
Votes: 0


Friday, October 15, 2004 - 07:42 am:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Mosaic,

Have been thinking about this. The +1 deals with the log of zero problem in much the the same way as my earlier spreadsheet: IF(Vol>0,0,Log(........)). It only calculates the log if volume is greater than zero, otherwise it substitutes 0.

I am currently experimenting with the Richter scale (for measuring earthquakes). The formula is:
2/3*LOG10(Vol)-0.9
Or in Excel: =IF(Vol>0,2/3*LOG10(Vol)-0.9,0)

See attached spreadsheet.
application/octet-streamlog_volume
volume_log.xls (22.5 k)


Regards
Colin


Top of pagePrevious messageNext messageBottom of page Link to this message
mosaic1996
Member
Username: mosaic1996

Post Number: 983
Registered: 01-2003

Rating: N/A
Votes: 0


Friday, October 15, 2004 - 03:46 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Colin,

Firstly, the better solutions to the data spike problem are
a) price and volume overlaid in the same chart space, e.g., charts posted by Hershy
http://www.incrediblecharts.com/userscripts/forums/show.plx?tpc=8&post=42268#POS T42268
b) cropping/capping volume at some value, say n time x day MA

However, persuing the rescaling approach that we have been discussing.....

There is a problem with your formula when the Vol is <= 22, but I will get to that later.

The Richiter solution is the same as I proposed, only with a suboptimal scale factor..

Richter = 2/3 * LOG(vOL)-0.9
= 2/3 * ( LOG(Vol) - 0.9*3/2 )
= 2/3 * ( LOG(Vol) - 1.35)
= 2/3 * ( LOG(Vol) - LOG( 22.39) )
= 2/3 * LOG (Vol / 22.39)
= LOG ( {Vol / 22.39 ) ^ (2/3) ) where ^ is raised to the power of.

Now muliplying the log by 2/3 (a constant) doesn't change anything in realtive terms, it only changes the scale on the y-axis, and all the data points will have exactly the same realtive position. So we can get rid of the 2/3, which leaves us with

= LOG( Vol / 22.39 )

Now the problem with this formula is that when the volume is less than 22.39, you will have a log of a number that is less than 1, which is negative.

Now one way around this is to add 22.39 (or more) to the Vol to avoid the problem of plotting negative values, and fortunately it also maps a Volume of 0 to 0 - a desirable outcome.

So now the forumla becomes

= LOG( (Vol + 22.39) / 22.39 )

which is one instance of

= LOG( (Vol + Vol-Scale) / Vol-Scale )

which is what I proposed in the first place.

I have done a little extra research and I believe that one of the better Vol-Scale values is around 15% of a 200 period SMA which I believe would be far superior to a value of 22.39 (far too small).

To guage the effectivenes of any solution, you need to look at the two broad cases:
a) volume spike
b) no volume spike
and you need to select/design data series that are representative of these two cases.

I would suggest the following data series
Series 1: 100m, 50m, 5m, 2m, 1.5m, 1m, 500k, 250k, 100k, 50k, 10k. - very unusual spike
Series 2: 50m, 5m, 2m, 1.5m, 1m, 500k, 250k, 100k, 50k, 10k. - typical (but infrequent) spike
Series 3: 5m, 2m, 1.5m, 1m, 500k, 250k, 100k, 50k, 10k - normal series

and where the main volume points of interest lie in the 500k to 5m range, and the 200 SMA is say 1.5 million, so my suggested scale factor would be 225k.

Cheers,
Graeme







Top of pagePrevious messageNext messageBottom of page Link to this message
mosaic1996
Member
Username: mosaic1996

Post Number: 984
Registered: 01-2003

Rating: N/A
Votes: 0


Friday, October 15, 2004 - 07:42 pm:Edit Post Delete Post Print Post    View Post/Check IP (Moderator/Admin only) Ban Poster IP (Moderator/Admin only) Move Post (Moderator/Admin Only)



Re. RICHTER FORMULA < 0

Just in case it wasn't evident from my jottings...
= 2/3*LOG(vol)-0.9
say volume = 10
= 2/3 * log(10)-0.9
=2/3 * 1 - 0.9
= 0.6666 - 0.9
= -0.23333

Cheers,
Graeme

TSX Stocks 15-minute delayed

 
Other Threads  
Last PosterPostsPagesLast Post
Stock Screeningrobin31-Oct-04  12:37 am
Stock Searchrobin29-Oct-04  01:20 am
Lost Threadsrobin11 28-Oct-04  07:04 pm
How do I stop the "DING" sound?nightstalker27-Oct-04  09:38 pm
Just Downloaded new Executablecolin_twiggs26-Oct-04  06:08 pm
QQQcolin_twiggs26-Oct-04  12:45 pm
Trend lines beyond the current dataingot5425-Oct-04  10:49 pm
Adding securities to Watchlistlad21-Oct-04  05:33 pm
Sector indexes using and narrowing colin_twiggs21-Oct-04  08:08 am
FPH history datacolin_twiggs17-Oct-04  09:59 am
Version 4.0.3.700colin_twiggs16-Oct-04  06:31 pm
Posting charts to another site.colin_twiggs16-Oct-04  11:40 am
Vacationrobin16-Oct-04  12:02 am
Anti viral software helpann14-Oct-04  10:30 pm

Threads by Last Post Time:

First Previous 94 95 96 97 98 99 00 01 02 03 04 05 06 07 Next Last

Administration Administration   Log Out Log Out    

««  Previous  Next  »»