[R-SIG-Finance] Quantmod Monthly Return function

Jeff Ryan jeff.a.ryan at gmail.com
Mon Sep 20 23:05:09 CEST 2010


Hi Werner,

It actually is far more subtle an issue than quantmod.  It is
essentially how your TZ and Locale is getting used/abused by your OS.

Can you provide at least the output of sessionInfo so we may get a
better idea of what is happening?

Thanks
Jeff

On Mon, Sep 20, 2010 at 4:00 PM, Jan Vandermeer <nordicgnome at gmail.com> wrote:
> Hi Werner;
>
> quantmod 0.3-8 running under Gentoo x86_64 and R-2.11.1 provides:
>
>
> library(quantmod)
> Loading required package: xts
> Loading required package: zoo
> Loading required package: Defaults
> Loading required package: TTR
> getSymbols("^AEX", from ="1999-01-01")
> [1] "AEX"
> head(monthlyReturn(AEX))
>         monthly.returns
> Jan 1999    -0.024654471
> Feb 1999     0.007573907
> Mar 1999     0.001510856
> Apr 1999     0.068146686
> May 1999    -0.033930813
> Jun 1999     0.012868642
>
> Jan
>
> On Mon, Sep 20, 2010 at 4:35 PM, Werner Erselina <w.erselina at gmail.com>wrote:
>
>> Dear R-finance list,
>>
>> Why is the Monthly Return function from the Quantmod packge showing a
>> return
>> for the month december 1998. When my data begins at 1999-01-04 (YYYY-MM-DD)
>>
>> > getSymbols("^AEX", from ="1999-01-01")
>> [1] "AEX"
>> > head(monthlyReturn(AEX))
>>         monthly.returns
>> dec 1998    -0.024654471
>> jan 1999     0.007573907
>> feb 1999     0.001510856
>> mrt 1999     0.068146686
>> apr 1999    -0.033930813
>> mei 1999     0.012868642
>>
>> Greetings,
>>
>> Werner
>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



-- 
Jeffrey Ryan
jeff.a.ryan at gmail.com



More information about the R-SIG-Finance mailing list