Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

filter out short positions immediately on portfolio import #499

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 0_web_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ get_input_files <- function(portfolio_name_ref_all) {
stop("Multiple investors detected. Only one investor at a time can be anaylsed")
}

# remove holdings with <= 0 market value (short positions)
portfolio <- portfolio %>% filter(market_value > 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
portfolio <- portfolio %>% filter(market_value > 0)
portfolio <- portfolio %>% dplyr::filter(market_value > 0)


return(portfolio)
}

Expand Down