Russell's Efficient Frontier Applet - now w/2007

Discuss all general (i.e. non-personal) investing questions and issues, investing news, and theory.
Post Reply
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Russell's Efficient Frontier Applet - now w/2007

Post by Russell »

Good afternoon fellow Bogleheads!

I'm trying to learn Java, and as a first program I've used some of TrevH's data to put together an "efficient frontier applet".

Click on the screenshot below to try it out!

Image


Some gritty details: This applet uses historical data from "riskless" T-bills and five "risky" asset classes (1972-2007) -- and you are allowed to leverage or short the asset classes at the T-bill rate.

Best, Russell

EDIT (version 1.2 - June 15, 2007): This updated version has an option to view either a return vs risk (efficient frontier) plot or a return vs time (historical performance) graph. The interfaces have been cleaned up with a more professional styling (if I do say so myself :) ). You can also save two portfolios in memory and see the interpolation between them.

EDIT (August 13, 2007) : Sorry, just updating my links....

EDIT (January 23, 2008) : Updated with Simba/Trev's 2007 data and the the government's 2007 CPI-U data.
Last edited by Russell on Thu Jan 24, 2008 3:43 pm, edited 6 times in total.
The best material model for a cat is another, or preferably the same, cat. - A. Rosenblueth and N. Wiener (1945).
User avatar
United
Posts: 447
Joined: Wed Mar 28, 2007 5:45 pm

Post by United »

Very cool!

By the way, what's the yellow curve supposed to be? I'd guess the efficient frontier, except there are portfolios with better risk-adjusted returns than that curve.
User avatar
tetractys
Posts: 5343
Joined: Sat Mar 17, 2007 3:30 pm
Location: Along the Salish Sea

Post by tetractys »

Russell, caution:

If you write with "Pure Java" it will probably work. Microsoft in the past has regularly made attempts to breach the standards, causing incompatibilities like the one you mention.

Tet
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Good evening --

Thanks for trying it out!

The yellow curve (------) is the usual interpolation between a 100% bond portfolio and a 100% u.s. equity portfolio.
User avatar
watchnerd
Posts: 9293
Joined: Sat Mar 03, 2007 11:18 am
Location: Seattle, WA, USA

Post by watchnerd »

Just FYI, seems to be broken with Firefox 2.0.0.4 under Mac OSX.

Not criticizing, though. Working in high tech, I can sympathize with cross-platform development.
65% Global Market Stocks | 30% Global Credit | 5% Global Market Commodities, Crypto, Gold || LMP TIPS/STRIPS || RSU + ESPP
User avatar
mickeyd
Posts: 4869
Joined: Fri Feb 23, 2007 3:19 pm
Location: Deep in the Heart of South Texas

Post by mickeyd »

You guys are so far ahead of me, techwise, that I can not even see you.

All that I get is a red X. What did I not do?
Part-Owner of Texas | | “The CMH-the Cost Matters Hypothesis -is all that is needed to explain why indexing must and will work… Yes, it is that simple.” John C. Bogle
harland
Posts: 302
Joined: Fri Feb 23, 2007 12:33 pm
Location: Virginia

Re: Efficient Frontier Applet (try it out!)

Post by harland »

Russell wrote:
edit: Tech answer (I think): I compiled the applet using Java 1.6.0, so you probably need to be running Java 1.6.0 or better to see the applet. I will try to recompile it tomorrow with the proper options so everyone doesn't have to update java to play.... :wink:
Try compiling with Java 1.5.0_07. Why? Selfish reason - that's the last version supported by Mac OS X.

FYI, for those that need to update their Java install, point your browser to theJava website.
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Hi Watchnerd and Tetractys (and mickeyd)--

Thanks for the notes.

Part of the fun of Java is you should be able to write it once and it's immediately "cross-platform" running on all sorts of machines -- I'll try to clean it up tomorrow....

Best, Russell

p.s. mickeyd -- I also got a red "X" on my home machine here until I updated my Java Platform -- I can now see the applet here as well.... As I mentioned, I'll try to recompile it tomorrow to work with the older versions....
User avatar
DaveTH
Posts: 2504
Joined: Thu Apr 05, 2007 7:23 pm

Post by DaveTH »

Russell,

Great application. Just curious, what are the underlying indexes used for each of the asset classes? I'm especially interested in the commodity one. Are the returns based on GSCI, DJ-AIG or something else?

Dave
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Hi Dave --

Thanks! I had done some previous computations with my own collected data -- but I've been too lazy to update that data since 2003....

The data for this applet is from the TrevH/Simba file, as in conversation 2520.

In that conversation, TrevH says the commodities data comes from:

Code: Select all

Standard & Poor's Commodity Index 1972-2002 
Pimco PCRIX 2003-2006 
Best wishes, Russell
User avatar
baw703916
Posts: 6681
Joined: Sun Apr 01, 2007 1:10 pm
Location: Seattle

leverage

Post by baw703916 »

Nice applet--it runs fine for me (Windows XP)

I'm a little bit curious about the effect of leveraging though. In just trying to optimize the return by tweaking the bars, w/o paying attention to what they mean, I get the following:

Portfolio:
U.S. equity: -12%
Foreign equity: 29%
real estate: 64%
commodities: 33%
fixed: 176%
cash: -190%

return: 17.0%
std. dev. 15.37%

In particular, leveraging bonds seems to give a huge boost in return with little risk.

I don't think I'd actually want to do that in real life though...is that an artifact of interest rates generally falling during the time period (so that leveraging yields consistently made money)?

Thanks for the programming, neat app!

Best wishes,
Brad
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Good morning, Brad --

That was the first thing that I noticed to. The "carry trade" -- selling low-yielding securities in order to buy high-yielding securities -- would have been an easy way to juice returns during this period (at least according to the applet's rules). When I started piling on bonds -- at the expense of cash -- the curve tended to move nearly straight up, adding return with little increase in risk....

Of course, this applet is a "rear-view mirror" sort of a tool. Perhaps with the yield curve looking the way it does today, this might be rather a more risky strategy....

As a side effect, the more u.s. bonds you have (in the applet), the more your equities might favor foreign over u.s., since foreign equities ought to be expected to show somewhat lower correlation to that big pile of domestic bonds.

Best, Russell
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Good morning, fellow Bogleheads --

I just uploaded the recompiled version -- hopefully more people will be able to see the applet now. Sorry for the trouble....

Best wishes, Russell
User avatar
watchnerd
Posts: 9293
Joined: Sat Mar 03, 2007 11:18 am
Location: Seattle, WA, USA

Post by watchnerd »

Russell wrote:Good morning, fellow Bogleheads --

I just uploaded the recompiled version -- hopefully more people will be able to see the applet now. Sorry for the trouble....

Best wishes, Russell
Yep, works great for me now. :D
65% Global Market Stocks | 30% Global Credit | 5% Global Market Commodities, Crypto, Gold || LMP TIPS/STRIPS || RSU + ESPP
User avatar
DelrayDave
Posts: 47
Joined: Sat Mar 03, 2007 2:33 pm

Nice, I like.

Post by DelrayDave »

Very Cool. Thanks for allowing us to run it with earlier Java versions. As a network engineer who works with alot of Cisco products with Java based apps, I can't just update to the newest Java version whenever I want as many apps wouldn't be compatible.
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Good morning --

Glad to hear the applet's working for more people -- even the Firefoxy Mac-users!

Anybody have any suggestions for the eventual irrepressible Efficient Frontier Applet version 1.2 ?
  • - value and growth?
    - large and small?
    - emerging and developed?
    - short duration and long?
    - more annotations / discussion on the web page?
    - suggested layout/content changes?
The one thing I thought might be cool -- and shouldn't be too hard -- would be the ability to store two portfolios of your choice and then see the interpolation between them (rather than just the predetermined u.s. stock/bond curve that I show now)....

Thanks again,
Russell
User avatar
tetractys
Posts: 5343
Joined: Sat Mar 17, 2007 3:30 pm
Location: Along the Salish Sea

Post by tetractys »

Hi Russell,

It's working flawlessly for me now too. Pretty cool!

I guess the tall order would be the user's ability to enter and mix-match data, on top of built in data packages.

For 1.2? I imagine any of the popular portfolio allocation assets on this forum would be great!

PS I have a brother in AZ named Russell who races bikes.

Tet
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Hi everybody!

I've posted an updated -- somewhat more stylized 8) -- version of the efficient frontier applet (see the original post).

The data is all the same, but you now have the options to:
  • save two portfolios to compare against.
    see the return series, as well as the efficient frontier graph.
This might be it for a while -- I should probably get to work on the projects I was learning Java for in the first place :oops: !!

Russell
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Good afternoon --

At the suggestion of Ed Tower, the graphs can now be viewed either in real or nominal dollars. Just click in the box next to "adjust for inflation?"

Enjoy, Russell
User avatar
mickeyd
Posts: 4869
Joined: Fri Feb 23, 2007 3:19 pm
Location: Deep in the Heart of South Texas

Post by mickeyd »

No more red X ...Wonderful tool Russell, thanks for the new toy... :lol:
Part-Owner of Texas | | “The CMH-the Cost Matters Hypothesis -is all that is needed to explain why indexing must and will work… Yes, it is that simple.” John C. Bogle
User avatar
ualdriver
Posts: 725
Joined: Wed Feb 21, 2007 1:07 am

quick question

Post by ualdriver »

I threw a sample allocation in of 60% domestic stock, 20% international stock, 15% bonds, 3% real estate, 2% commidities as an example. So from an investor's standpoint, what does it mean if my little dot (after adjusting the sliders for my rough assett allocation listed) is above the efficient frontier curve?
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Good evening, all --

Hi MickeyD: I'm glad the applet is working for you now! Enjoy the toy!

Hi UALdriver: The default for the yellow curve is simply the family of all of the 100% invested u.s. stock/bond portfolios -- these portfolios aren't necessarily efficient in terms of providing the highest return per unit of risk . If your portfolio is above that curve, it suggests that (historically, from 1972-2006) your portfolio was more efficient than this two-asset portfolio. In particular, a portfolio of u.s. stocks and bonds with the same logarithmic deviation as your portfolio would have had a lower return over that period. Nicely done!

Good night, all,
Russell
User avatar
tarkbud
Posts: 151
Joined: Sat Feb 24, 2007 9:20 pm

Post by tarkbud »

Oh Well, I guess I am the only person left who still gets a gray screen. Drat :!:

Sandy
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Good morning, Sandy --

Sorry to frustrate you with the gray screen. I think my applet might be incompatible with your avatar -- GO PATS!! :D

I wish I had a more constructive suggestion.... :?

Best, Russell
User avatar
StoneReader
Posts: 394
Joined: Tue Feb 27, 2007 7:42 pm

Very Useful Java Chart

Post by StoneReader »

Russell,

Thank you very much for your new Java charts that allow you to vary the composition of your portfolio interactively and see the results over a long time period. I am most interested in minimizing drawdowns rather than maximizing returns and this depicts how drawdowns vary with portfolio composition interactively and instantaneously.

I am using an Intel iMac with OSX10.4.9 with a Safari browser and it all works perfectly.

Tom
User avatar
tarkbud
Posts: 151
Joined: Sat Feb 24, 2007 9:20 pm

Post by tarkbud »

Russell wrote:Good morning, Sandy --

Sorry to frustrate you with the gray screen. I think my applet might be incompatible with your avatar -- GO PATS!! :D

I wish I had a more constructive suggestion.... :?

Best, Russell
hehehe :lol

Sandy
User avatar
tarkbud
Posts: 151
Joined: Sat Feb 24, 2007 9:20 pm

Post by tarkbud »

Actually, if it helps anyone solve the problem of why I still only get a gray frame.

On top of the gray frame it says in green "Efficient Frontier Applet" with some sort of Crest(?) on each side. At the botton--off the chart--
it says" load:class Efficient Frontier 2 not found"

Any help would be appreciated. Thanks

Regards,

Sandy
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

tarkbud wrote:At the botton--off the chart--it says" load:class Efficient Frontier 2 not found"
I think there are two main things that can cause this. (See for instance here.)

One is if the .class file (the compiled program) is really not there. I doubt this is the problem, because I put it there myself.... :)

The other is if I (as the compiler/developer) am using a newer version of java than you (as the reader/user). This was the problem people were having early on, since I blithely compiled the applet using Java 1.6, which had only been out a month or so.

Just moments ago, I recompiled (and uploaded) the program with a target of Java 1.2, which has been around since the last millenium. Are you willing to give me one last chance?

Note: close up your browser and reopen it first to make sure you really get the fresh copy -- reload is not always strong enough....

Good luck!
Russell
User avatar
tarkbud
Posts: 151
Joined: Sat Feb 24, 2007 9:20 pm

Post by tarkbud »

HOORAY! HOORAY! :D

Thanks Russell for the extra help. One bad thing about this site though. I almost missed your LINK to the article that led me to get the update I needed. The color of your word "here" does not appear to me to be that much different than the other text.

FWIW, I couldn't find the version I had but according to Sun I had
1.4.2-02 . Theoretically shouldn't 1.2 have worked? It didn't But thanks again for your extra help in getting this available to me. I appreciate it.

Best Regards,

Sandy

"GO VIKES"
User avatar
docneil88
Posts: 929
Joined: Mon Apr 30, 2007 3:39 pm
Location: Taxable

This is too cool for school!

Post by docneil88 »

This is too cool for school! Thanks very much Russell.
Russell wrote:Anybody have any suggestions for the eventual irrepressible Efficient Frontier Applet version 1.2 ?
  • - value and growth?
    - emerging and developed?
    - short duration and long?...
When you next get inspired, I think that adding those three pairs would be great. Best, Neil
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Hi everybody!

I just updated the applet to include the TrevH and Simba's "new" 2007 data. Enjoy!

This has been complied to work with Java 1.4.X or better. If it doesn't work for you, and you're not sure which version of Java you're using, you can find out by clicking here.
The best material model for a cat is another, or preferably the same, cat. - A. Rosenblueth and N. Wiener (1945).
exeunt
Posts: 907
Joined: Tue Jan 08, 2008 6:54 pm

Post by exeunt »

Awesome. Thanks for your excellent work.
joelesposito
Posts: 138
Joined: Fri Sep 21, 2007 1:30 pm

USNA

Post by joelesposito »

Russell, very nice applet.

Looks like I am not the only one at the Academy interested in this stuff....

Joel (WSE Dept)
joelesposito
Posts: 138
Joined: Fri Sep 21, 2007 1:30 pm

Post by joelesposito »

You should add a check box which prevents -cash%'s, if desired. Most of us don't invest on margin.

It makes it hard for me to trace out a curve, by varying the bond percentage.
User avatar
Topic Author
Russell
Posts: 285
Joined: Fri Feb 23, 2007 2:26 pm
Location: on the Chesapeake Bay
Contact:

Post by Russell »

Hi Joel --

Thanks for the suggestion!

One idea: it might be possible to trace out nice curves using the memory buttons.

If you click on either the red circle or the blue square at the lower right, the current portfolio is added to that memory slot. The yellow curve on the screen is the interpolation between those two stored portfolios.

When the applet loads, the stored portfolios are just 100% US stocks and 100% US bonds -- and so the yellow curve shows the returns of pure stock/bond combinations.

So one way to more smoothly trace out a curve that adds bonds to a desired portfolio, is to have 100% bonds in one stored portfolio, and your other mix in the other! Then the program will do it for you!

Maybe not as nice as a check box, but it's a start! :D
The best material model for a cat is another, or preferably the same, cat. - A. Rosenblueth and N. Wiener (1945).
User avatar
stratton
Posts: 11083
Joined: Sun Mar 04, 2007 5:05 pm
Location: Puget Sound

Post by stratton »

Russell,

Thanks for the update.

What about adding one more asset class for TIPS? They behave differently enough from bonds they are a different asset class.

Paul
User avatar
zane
Posts: 52
Joined: Sun Sep 16, 2007 6:19 pm
Location: Boulder, CO
Contact:

TIPS b4 Short/Long

Post by zane »

Awesome applet!

I second the TIPS request, before splitting bonds into short and long, and both Value/Growth and Large/Small would be great too of course :)

I'm amazed at how increasing commodity exposure seems almost to have no effect on risk until you get up to more than 30%, while significantly increasing returns. Is that just a freakish consequence of the last few years of commodity returns? I guess I've read papers that suggested commodities did this (linked to from the Altruist FA site), but seeing it graphically makes it seem almost like magic. Dangerous black magic...

Having a "clear" button would be nice too, so that you can erase tracks that have been drawn without having to reload the page.
Okay, that's enough: I'm no longer down on my knees, praying for a crash...
User avatar
Cb
Posts: 275
Joined: Wed Feb 21, 2007 12:39 am

Re: TIPS b4 Short/Long

Post by Cb »

zane wrote: I'm amazed at how increasing commodity exposure seems almost to have no effect on risk until you get up to more than 30%, while significantly increasing returns. Is that just a freakish consequence of the last few years of commodity returns? I guess I've read papers that suggested commodities did this (linked to from the Altruist FA site), but seeing it graphically makes it seem almost like magic. Dangerous black magic...
I think Roger Gibson saw similar results in 2000, and again in 2005, so I don't think it's entirely due to the most recent run in commodities. I think '73-'74 probably had a greater impact.

For what it's worth even Gibson doesn't recommend such a high % in Commodities, due primary to tracking error/regret.

btw - has anyone read Gibson's 4th update to his book yet?

Cb
Post Reply