[R-SIG-Finance] query on adjRatios() function from TTR package
Pitabas Mohanty
p|t@b@@m @end|ng |rom x|r|@@c@|n
Tue Jun 9 10:00:53 CEST 2020
Yes, it is working. I could finally compute the adjusted closing prices.
Thank you so much.
On Mon, Jun 8, 2020 at 6:17 PM Enrico Schumann <es using enricoschumann.net>
wrote:
> On Mon, 08 Jun 2020, Pitabas Mohanty writes:
>
> > Hi
> >
> > Can anyone tell me how to find the adjusted closing price when there are
> > multiple split events on the same day? In India, a few companies have
> > announced stock split and stock dividend on the same day. When I use the
> > adjRatios() function, it only adjusts for the first event and not the
> > second event.
> >
> > Any help will be greatly appreciated.
> >
>
> Function 'split_adjust' in package 'PMwR' supports
> several splits on a single timestamp. Suppose a stock
> split two times 2-for-1 on timestamp 2. Then:
>
> split_adjust(x = c(100, 25, 25), ## prices
> t = c(2, 2), ## index when split occurs
> ratio = c(2, 2)) ## split ratio
> ## [1] 25 25 25
>
> split_adjust(x = c(100, 25, 49), t = c(2, 2),
> ratio = c(2,2), backward = FALSE)
> ## [1] 100 100 100
>
> --
> Enrico Schumann (maintainer of PMwR)
> Lucerne, Switzerland
> http://enricoschumann.net
>
[[alternative HTML version deleted]]
More information about the R-SIG-Finance
mailing list