Skip to content
Prev 15193 / 15274 Next

apply a function to a data.frame column with condition

On Thu, 06 Mar 2025, Arnaud Gaboury writes:
Thank you.

I am afraid there are no built-in, ready-to-use reports in
PMwR.  That was a deliberate choice: PMwR should only
provide simple tools for computing P/L, returns, or for
backtesting, say. For analyzing the results of such
computations, you have all of R for analysis and summarizing
:-)

For my reporting needs, I typically prepare templates in
plain text, HTML or LaTeX and then fill in stats such as
returns etc. See e.g.
https://cran.r-project.org/web/packages/PMwR/vignettes/FinTeX.pdf

For equity series, i.e. total value of a portfolio, using
NAVseries and its summary method might be a start, see e.g.
https://enricoschumann.net/R/packages/PMwR/manual/PMwR.html#NAVseries-summaries
There are handful of functions for analyzing such series,
e. g. `drawdowns` or `streaks`.  But as I said, most
analysis I do with basic R functions.
Message-ID: <87wmd1nnc2.fsf@enricoschumann.net>
In-Reply-To: <e0aa67a0fef7f21ce6556a94241d021af1a9c78c.camel@gmail.com> (Arnaud Gaboury's message of "Thu, 06 Mar 2025 09:09:14 +0100")