pp.ellipse <- function (center=c(0,0), a=1, b=1, phi=0, resolution=100) { # function that gives the x and y positions of an ellipse # placed in the public domain 2012 by Burns Statistics stopifnot(length(center) == 2, length(a) == 1, length(b) == 1, length(phi) == 1, length(resolution) == 1) tt <- seq(0, 2 * pi, length=resolution) x <- center[1] + a * cos(tt) * cos(phi) - b * sin(tt) * sin(phi) y <- center[2] + a * cos(tt) * sin(phi) + b * sin(tt) * cos(phi) list(x=x, y=y) } P.activepassive <- function (filename = "activepassive.png") { if(length(filename)) { png(file=filename, width=512, height=530) par(mar=c(5,4, 0, 2) + .1) } plot(.5, .5, xlim=c(0,1), ylim=c(0,1), xlab='Effort', ylab='Turnover', axes=FALSE, type="n", xaxs="i", yaxs="i") axis(1, at=c(0,.95), labels=c("0", "high")) axis(2, at=c(0,.95), labels=c("0", "high")) box(bty="L") text(.93, .93, "EXPENSIVE", cex=4, col="gold", vfont=c("sans serif", "bold"), adj=1) text(.03, .08, "CHEAP", cex=4, col="gold", vfont=c("sans serif", "bold"), adj=0) # active-passive boundary xs <- seq(.01, .75, length=100) lines(xs - .02, 3.5 * (xs^-.05 - .75^-.05)) text(.28, .49, "active-passive boundary") arrows(.24, .47, .09, .39,, length=.1, lwd=2) # index funds lines(pp.ellipse(center=c(.2, .12), a=.1, b=.01), col="steelblue", lwd=2) text(.35, .22, "index funds", col="steelblue") arrows(.32, .2, .25, .14, col="steelblue", length=.1, lwd=2) # minimum variance funds lines(pp.ellipse(center=c(.1, .15), a=.01, b=.1), col="steelblue", lwd=2) text(.2, .32, "minimum variance", col="steelblue") arrows(.22, .3, .11, .23, col="steelblue", length=.1, lwd=2) # HFT lines(pp.ellipse(center=c(.9, .9), a=.05, b=.05), col="steelblue", lwd=2) text(.8, .78, "high frequency trading", col="steelblue") arrows(.84, .8, .87, .86, col="steelblue", length=.1, lwd=2) if(length(filename)) { dev.off() } }