[R-SIG-Finance] PerformanceAnalytics::table.CalendarReturns
Brian G. Peterson
br|@n @end|ng |rom br@verock@com
Thu Sep 5 14:44:52 CEST 2024
the 'returns' package has just turned them into whole numbers rather
than decimals. The numbers all agree.
--
Brian
On Thu, 2024-09-05 at 12:35 +0100, Amarjit Chandhial via R-SIG-Finance
wrote:
>
>
> Thanks Enrico!
>
> If try on SPY for the year 2023
>
> > calendarReturnTable(spyRets, digits = 4, percent = FALSE)
> Using 'Value' as value column. Use 'value.var' to override
> Jan Feb Mar Apr May Jun Jul Aug
> Sep
> Oct Nov Dec Annual
> 0.0674 -0.0251 0.0371 0.0160 0.0046 0.0648 0.0327 -0.0163 -
> 0.0474
> -0.0217 0.0913 0.0457 0.2671
> DD
> 0.0997
> > PMwR::returns(SPY, period = "month")
> Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec YTD
> 2023 6.7 -2.5 3.7 1.6 0.5 6.5 3.3 -1.6 -4.7 -2.2 9.1 4.6 26.7 >
> PerformanceAnalytics::table.AnnualizedReturns(spyRets, scale = 249,
> geometric = TRUE)
> Adjusted
> Annualized Return 0.2671
> Annualized Std Dev 0.1301
> Annualized Sharpe (Rf=0%) 2.0525
> > PerformanceAnalytics::maxDrawdown(spyRets)
> [1] 0.09974311
>
>
> Amarjit
>
>
>
> ------ Original Message ------
> From: es using enricoschumann.net
> To: a.chandhial using btinternet.com Cc: r-sig-finance using r-project.org
> Sent: Thursday, September 5th 2024, 10:10
> Subject: Re: [R-SIG-Finance]
> PerformanceAnalytics::table.CalendarReturns
> On Wed, 04 Sep 2024, Amarjit Chandhial via R-SIG-Finance writes: >
> Hi, >
> > Are there any plans for >
> https://timelyportfolio.github.io/PerformanceAnalytics/reference/table.CalendarReturns.html
>
> > function to handle daily returns aggregated to monthly and year? >
> > >
> It would be useful to have a table displaying Monthly Returns and
> Total
> > Return (rows), by year's (columns), for daily returns. > >
> > Amarjit >
> If an alternative package be acceptable as well, then function
> 'returns'
> in PMwR (which I maintain) might do what you want: returns(, period =
> "month") in which series is a zoo (or xts) series. It is
> described in the manual:
> https://enricoschumann.net/R/packages/PMwR/manual/PMwR.html#holding-period-returns
>
> -- Enrico Schumann Lucerne, Switzerland https://enricoschumann.net
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance using 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.
>
[[alternative HTML version deleted]]
More information about the R-SIG-Finance
mailing list