How can I calculate annualized log returns when the year is different from a calendar year

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

How can I calculate annualized log returns when the year is different from a calendar year

Maulik Bhatt
Dear all,

I want to calculate annualized log return for a security. But the issue
is that the company follows financial year from April to March. So, all
its other ratios are calculated from April to March year. The data is
taken using the package tidyquant.

library(tidyquant)

df<- tq_get("SBIN.NS")

 From the package vignette of tidyquant, the periodReturn can be
calculated for yearly, but in that case the year is calendar year. But I
want to get the return for financial year. In case of this company, the
financial year is from April to March. So, what modifications do I need
to make in order to calculate annual log return from April to March?

Thanks in advance,

Maulik.

_______________________________________________
[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: How can I calculate annualized log returns when the year is different from a calendar year

braverock
I don't use tidyquant, but you can easily use endpoints() in xts to get
the end of March timestamps and calculate your period return that way.

Brian

On Mon, 2020-11-09 at 13:45 +0530, Maulik Bhatt wrote:

> Dear all,
>
> I want to calculate annualized log return for a security. But the
> issue
> is that the company follows financial year from April to March. So,
> all
> its other ratios are calculated from April to March year. The data is
> taken using the package tidyquant.
>
> library(tidyquant)
>
> df<- tq_get("SBIN.NS")
>
>  From the package vignette of tidyquant, the periodReturn can be
> calculated for yearly, but in that case the year is calendar year.
> But I
> want to get the return for financial year. In case of this company,
> the
> financial year is from April to March. So, what modifications do I
> need
> to make in order to calculate annual log return from April to March?
>
> Thanks in advance,
>
> Maulik.
>
> _______________________________________________
> [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.