Message-ID: <749BCB4C-BE32-419B-B405-B9F0024DC26F@gmail.com>
Date: 2020-08-10T20:53:09Z
From: Daniel Cegiełka
Subject: periodReturn at the acutual day
In-Reply-To: <CAB-TgNuk4i=11cnjL2DfPFcv+5bZUevutMALynFS_tzGp2bvgQ@mail.gmail.com>
> On 10 Aug 2020, at 20:22, Pedro p?ramo <percentil101 at gmail.com> wrote:
>
> Hi all,
>
> I am using to make some statistical analysis this functions:
>
> library(quantmod)
> getSymbols("^IBEX",src="yahoo",from="1998-01-01")
> MensualR = periodReturn(IBEX,period="monthly")
> AnualR = periodReturn(IBEX,period="yearly")
>
> The thing is that if I print MensualR or AnualR they "show" data to the
> previous friday 07/08/2020
>
> There is some way to obtain data to the actual date (not previous friday
> close).
>
have you checked your data?
> last(IBEX, 3)
IBEX.Open IBEX.High IBEX.Low IBEX.Close IBEX.Volume IBEX.Adjusted
2020-08-05 7073.2 7123.5 7027.7 7039.7 208795900 7039.7
2020-08-06 7022.1 7046.1 6917.0 6957.9 205847300 6957.9
2020-08-07 6929.1 6961.8 6876.7 6950.5 184151000 6950.5
so what result do you expect?
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org 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.