In this tutorial, we will learn how to compute annualized return of stock using tidyverse from scratch. Annualized return of an investment is the average returns of the investment that is held over many years. In comparison to simple mean of yearly returns, annualized return is … [Read more...] about How to compute annualized return of a stock with tidyverse
prod()
How to get product of all elements in a column
In this tutorial we will learn how to compute product of all elements of a column in a dataframe using tidyverse. We will use prod() function in base to multiple all elements of a columns. Let us first load tidyverse. We will create a simple dataframe using tidyverse' … [Read more...] about How to get product of all elements in a column