[R-sig-Finance] Map of the Market

BBands bbands at gmail.com
Wed Jun 7 16:28:08 CEST 2006


On 6/7/06, Kyle Campbell <Kyle.W.Campbell at williams.edu> wrote:
> Hello all,
>
> I am trying to design an R function to display the Map of Market
> graphic for a given portfolio of stocks (something like this, though
> not so interactive: http://www.smartmoney.com/marketmap/ ).  Does
> anyone know a good algorithm I could use for positioning the different
> rectangles once I know the relative area that each one should occupy?
> Any help on this, or any other suggestions for this project would be
> much appreciated.

This is a tiling problem a very interesting area. (It is actually a
nested tiling problem.) Long a source of interesting mathematical
diversions, tiling was examined on several occasions by Martin
Gardiner in his Mathematical Recreations column in Scientific
American. I couldn't find much in R at present, but here is a link to
a site that should get you started.

http://www.ics.uci.edu/~eppstein/junkyard/tiling.html

Implementation in R ought to be pretty straight forward.

Have fun,

     jab
-- 
John Bollinger, CFA, CMT
www.BollingerBands.com

If you advance far enough, you arrive at the beginning.



More information about the R-SIG-Finance mailing list