Message Boards Message Boards

GROUPS:

Problems Replicating Monthly Returns from Daily Returns Using FinancialData

Posted 7 days ago
48 Views
|
0 Replies
|
0 Total Likes
|

Dear community members, according to FinancialData, the monthly return for Google in January 2006 was 0.00392246:

FinancialData["NASDAQ:GOOGL", "Return", {{2006, 1,1}, {2006, 1, 31}, "Month"}]

{{{2006, 1, 31}, 0.00392246}}

However, when I try to replicate that number using the daily returns for January, I get a different figure:

jan2006 = 
 FinancialData["NASDAQ:GOOGL", "Close", {{2006, 1, 1}, {2006, 1, 31}}]

{{{2006, 1, 3}, 217.826}, {{2006, 1, 4}, 
  224.698}, {{2006, 1, 5}, 225.839}, {{2006, 1, 6}, 
  233.056}, {{2006, 1, 9}, 233.676}, {{2006, 1, 10}, 
  235.108}, {{2006, 1, 11}, 236.043}, {{2006, 1, 12}, 
  232.04}, {{2006, 1, 13}, 233.351}, {{2006, 1, 17}, 
  233.781}, {{2006, 1, 18}, 222.671}, {{2006, 1, 19}, 
  218.434}, {{2006, 1, 20}, 199.924}, {{2006, 1, 23}, 
  213.957}, {{2006, 1, 24}, 221.73}, {{2006, 1, 25}, 
  216.57}, {{2006, 1, 26}, 217.343}, {{2006, 1, 27}, 
  216.955}, {{2006, 1, 30}, 213.617}, {{2006, 1, 31}, 216.54}}

prices = jan2006[[All, 2]]

{217.826, 224.698, 225.839, 233.056, 233.676, 235.108, \
236.043, 232.04, 233.351, 233.781, 222.671, 218.434, 199.924, \
213.957, 221.73, 216.57, 217.343, 216.955, 213.617, 216.54}

dailyreturns = (#[[2]]/#[[1]] - 1) & /@ Partition[prices, 2, 1]

{0.0315481, 0.00507796, 0.0319564, 0.00266028, 0.00612817, \
0.00397689, -0.0169588, 0.00564991, 0.00184275, -0.0475231, \
-0.0190281, -0.0847396, 0.0701917, 0.0363297, -0.0232715, 0.00356926, \
-0.0017852, -0.0153857, 0.0136833}

monthly = Times @@ (dailyreturns + 1) - 1

-0.00590384

Last[prices]/First[prices] - 1

-0.00590384

What am I doing wrong?

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract