% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter_options.R
\name{filter_options}
\alias{filter_options}
\title{Create Filter Options}
\usage{
filter_options(
  exclude_financials = FALSE,
  exclude_utilities = FALSE,
  min_stock_price = NULL,
  min_size_quantile = NULL,
  min_listing_age = NULL,
  exclude_negative_book_equity = FALSE,
  exclude_negative_earnings = FALSE,
  ...
)
}
\arguments{
\item{exclude_financials}{A logical indicating whether to exclude financial
firms (SIC codes 6000–6799). Defaults to \code{FALSE}.}

\item{exclude_utilities}{A logical indicating whether to exclude utility
firms (SIC codes 4900–4999). Defaults to \code{FALSE}.}

\item{min_stock_price}{A single positive numeric specifying the minimum
stock price required to include an observation. \code{NULL} (the default)
applies no price filter.}

\item{min_size_quantile}{A single numeric strictly between 0 and 1
specifying the minimum cross-sectional size quantile (based on lagged
market cap) required to include an observation. \code{NULL} (the default)
applies no size quantile filter. The cutoff is computed from NYSE
stocks only. This requires an \code{exchange} column in the data (as
mapped via \code{\link[=data_options]{data_options()}}); an error is raised if it is missing.}

\item{min_listing_age}{A single non-negative integer or numeric specifying
the minimum number of months a stock must have been listed in CRSP.
\code{NULL} (the default) applies no listing age filter.}

\item{exclude_negative_book_equity}{A logical indicating whether to exclude
observations with non-positive book equity. Defaults to \code{FALSE}.}

\item{exclude_negative_earnings}{A logical indicating whether to exclude
observations with non-positive earnings. Defaults to \code{FALSE}.}

\item{...}{Additional arguments to be included in the filter options list.}
}
\value{
A list of class \code{tidyfinance_filter_options} containing the
specified filter options.
}
\description{
Creates a list of filter options of class \code{tidyfinance_filter_options} used
for sample construction in TidyFinance-related functions. These options
control which observations are retained before portfolio sorting.
}
\examples{
filter_options(
  exclude_financials = TRUE,
  exclude_utilities = TRUE,
  min_stock_price = 1,
  min_listing_age = 12
)

}
\seealso{
Other portfolio functions: 
\code{\link{assign_portfolio}()},
\code{\link{breakpoint_options}()},
\code{\link{compute_breakpoints}()},
\code{\link{compute_long_short_returns}()},
\code{\link{compute_portfolio_returns}()},
\code{\link{data_options}()},
\code{\link{filter_sorting_data}()},
\code{\link{implement_portfolio_sort}()},
\code{\link{portfolio_sort_options}()}
}
\concept{portfolio functions}
