periodReturn at the acutual day

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

periodReturn at the acutual day

Pedro páramo
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).

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: periodReturn at the acutual day

Pedro páramo
But I think there is a way to obtain last price, doesn´t it? With getQuote?
I have to look for it, so I see no way to use close, do you now another
function to know the historial return by frequency different to
periodReturn, to see if it is posible?




El lun., 10 ago. 2020 a las 20:40, Ethan Smith (<[hidden email]>)
escribió:

> Yahoo provides End of Day (EOD) data. You cannot get the current days
> closing price until the market closes for the day and the final closing
> price is captured
>
> In fact, many EOD data provider require additional time after the close
> before the current day’s prices are available
>
>
>
> *From: *Pedro páramo <[hidden email]>
> *Sent: *Monday, August 10, 2020 12:23 PM
> *To: *[hidden email]
> *Subject: *[R-SIG-Finance] periodReturn at the acutual day
>
>
>
> 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).
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] 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]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: periodReturn at the acutual day

Daniel Cegiełka
In reply to this post by Pedro páramo


> On 10 Aug 2020, at 20:22, Pedro páramo <[hidden email]> 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]]
>
> _______________________________________________
> [hidden email] 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.

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: periodReturn at the acutual day

Pedro páramo
In reply to this post by Pedro páramo
I think,

getQuote("IBEX")
              Trade Time  Last Change % Change  Open High     Low
IBEX 2020-08-10 16:00:01 17.15   1.75 11.36364 15.65   18 15.0601
     Volume
IBEX 456965

> getQuote("IBEX")$Last

Is the final value for each periodReturn but the function
periodReturn(IBEX,period="monthly") dont use Last price,

Is there a way to obtain monthly return with Last Price?



El lun., 10 ago. 2020 a las 21:37, Pedro páramo (<[hidden email]>)
escribió:

> But I think there is a way to obtain last price, doesn´t it? With
> getQuote? I have to look for it, so I see no way to use close, do you now
> another function to know the historial return by frequency different to
> periodReturn, to see if it is posible?
>
>
>
>
> El lun., 10 ago. 2020 a las 20:40, Ethan Smith (<[hidden email]>)
> escribió:
>
>> Yahoo provides End of Day (EOD) data. You cannot get the current days
>> closing price until the market closes for the day and the final closing
>> price is captured
>>
>> In fact, many EOD data provider require additional time after the close
>> before the current day’s prices are available
>>
>>
>>
>> *From: *Pedro páramo <[hidden email]>
>> *Sent: *Monday, August 10, 2020 12:23 PM
>> *To: *[hidden email]
>> *Subject: *[R-SIG-Finance] periodReturn at the acutual day
>>
>>
>>
>> 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).
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> [hidden email] 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]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: periodReturn at the acutual day

braverock
getSymbols and getQuote are not the same thing.

getSymbols("^IBEX",src="yahoo",from="1998-01-01")
last(IBEX)
#     IBEX.Open IBEX.High IBEX.Low IBEX.Close IBEX.Volume IBEX.Adjusted
#2020-08-
#07    6929.1    6961.8   6876.7     6950.5   184151000        6950.5

The data returned is from Friday, the 7th's close, not from Monday, the
10th, for me.

I assume that Yahoo probably updates their data once a day, sometime
after the official close is published, and their vendor updates.

The joys of trying to use free data.

Brian

--
Brian G. Peterson
ph: +1.773.459.4973
im: bgpbraverock

On Mon, 2020-08-10 at 23:43 +0200, Pedro páramo wrote:

> I think,
>
> getQuote("IBEX")
>               Trade Time  Last Change % Change  Open High     Low
> IBEX 2020-08-10 16:00:01 17.15   1.75 11.36364 15.65   18 15.0601
>      Volume
> IBEX 456965
>
> > getQuote("IBEX")$Last
>
> Is the final value for each periodReturn but the function
> periodReturn(IBEX,period="monthly") dont use Last price,
>
> Is there a way to obtain monthly return with Last Price?
>
>
>
> El lun., 10 ago. 2020 a las 21:37, Pedro páramo (<
> [hidden email]
> >)
> escribió:
>
> > But I think there is a way to obtain last price, doesn´t it? With
> > getQuote? I have to look for it, so I see no way to use close, do
> > you now
> > another function to know the historial return by frequency
> > different to
> > periodReturn, to see if it is posible?
> >
> >
> >
> >
> > El lun., 10 ago. 2020 a las 20:40, Ethan Smith (<
> > [hidden email]
> > >)
> > escribió:
> >
> > > Yahoo provides End of Day (EOD) data. You cannot get the current
> > > days
> > > closing price until the market closes for the day and the final
> > > closing
> > > price is captured
> > >
> > > In fact, many EOD data provider require additional time after the
> > > close
> > > before the current day’s prices are available
> > >
> > >
> > >
> > > *From: *Pedro páramo <
> > > [hidden email]
> > > >
> > > *Sent: *Monday, August 10, 2020 12:23 PM
> > > *To:
> > > *[hidden email]
> > >
> > > *Subject: *[R-SIG-Finance] periodReturn at the acutual day
> > >
> > >
> > >
> > > 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).
> > >
> > >         [[alternative HTML version deleted]]
> > >
> > > _______________________________________________
> > > [hidden email]
> > >  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]]
>
> _______________________________________________
> [hidden email]
>  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.
>
>

_______________________________________________
[hidden email] 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.