So glad you read my post.  Hate that I could not share index history.

2 suggestions:
1) using ROC default is continuous, try type="discrete"

BarAggReturn <- ROC((to.monthly(AGG)), type="discrete")*100

2) also, since AGG history is limited, use a mutual fund like vbmfx for more history

Hope this helps.

Kent Russell
http://timelyportfolio.blogspot.com


In reply to:
  1. Calculate AGG monthly returns using Quantmod (Pacheco, Luis)
After reading the great post "Bond Market as a Casino Game Part 1" in
the Timely Portfolio blog,

(http://timelyportfolio.blogspot.com/2011/04/bond-market-as-casino-game-
part-1.html)

I tried to replicate the monthly returns that iShares is publishing
here:

(http://us.ishares.com/product_info/fund/excel_historicalperformance.htm
?ticker=AGG)

using quantmod, but the results for the Adjusted close column are very
different



getSymbols("AGG")

BarAggReturn <- ROC((to.monthly(AGG)))*100



Some comparisons:



Month

Return using ROC on Adjusted

iShares

Nov-10

-0.83966718

-0.56

Dec-10

-0.67493958

-1.07

Jan-11

-0.08588197

0.07

Feb-11

0.285986849

0.23



Thanks for all your help, I deeply appreciate it.







Luis Pacheco

Asurion



	[[alternative HTML version deleted]]

