library(AZASRS) library(tidyverse)
Highlighting the importance of get_pm_nav_daily()
when looking for the latest NAV value
nav = get_pm_nav_daily() nav
(removing all 0 NAV funds) Not Cash Adjusted -- will only find reported values
latest_fund_nav = nav %>% filter(nav != 0) %>% group_by(pm_fund_id) %>% filter(effective_date == max(effective_date)) %>% ungroup() latest_fund_nav
latest_portfolio_nav = nav %>% filter(nav != 0) %>% group_by(pm_fund_portfolio) %>% filter(effective_date == max(effective_date)) %>% summarize(effective_date = max(effective_date), NAV = sum(nav)) %>% ungroup() latest_portfolio_nav
latest_category_nav = nav %>% filter(nav != 0) %>% group_by(pm_fund_portfolio, pm_fund_category_description) %>% filter(effective_date == max(effective_date)) %>% summarize(effective_date = max(effective_date), NAV = sum(nav)) %>% ungroup() latest_category_nav
Utilizing effective_date
of 2019-12-31
latest_portfolio_nav = nav %>% filter(nav != 0) %>% group_by(pm_fund_portfolio) %>% filter(effective_date == '2019-12-31') %>% summarize(effective_date = max(effective_date), NAV = sum(nav)) %>% ungroup() latest_portfolio_nav
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.