% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/targetPeerPerformance.R
\name{targetPeerPerformance}
\alias{targetPeerPerformance}
\title{Targeted peer-performance screening for selected funds}
\usage{
targetPeerPerformance(
  X,
  funds,
  method = c("alpha", "sharpe", "msharpe"),
  factors = NULL,
  level = 0.9,
  na.neg = TRUE,
  control = list()
)
}
\arguments{
\item{X}{Matrix \eqn{(T \times N)}{(TxN)} of \eqn{T} returns for \eqn{N}
funds. \code{NA} values are allowed.}

\item{funds}{Integer indices or character column names identifying the focal
funds. The output preserves the order provided in \code{funds}.}

\item{method}{Screening method: \code{"alpha"} (default), \code{"sharpe"}, or
\code{"msharpe"}.}

\item{factors}{Optional matrix of factor returns (only when
\code{method = "alpha"}).}

\item{level}{Modified Value-at-Risk level (only when \code{method = "msharpe"}).}

\item{na.neg}{Logical; return \code{NA} for a negative modified
Value-at-Risk (only when \code{method = "msharpe"}).}

\item{control}{Control parameters (see \code{\link{alphaScreening}}).}
}
\value{
A \code{SCREENING} object (see \code{\link{alphaScreening}}) whose
fund-level components (\code{pizero}, \code{pipos}, \code{pineg}, the
performance measure, \code{npeer}, \ldots) cover the focal funds only, and
whose \code{pval}/\code{tstat}/difference matrices have one row per focal fund
and one column per universe fund. Works with the \code{print}, \code{plot},
\code{summary}, and \code{as.data.frame} methods.
}
\description{
Performs peer-performance screening for a user-selected subset of
funds (the \dQuote{focal} funds) against the whole universe, returning
detailed outputs for those focal funds only. It is a convenience wrapper that
calls the corresponding screening function with the cross-group argument
\code{Y} set to the full matrix \code{X}; equivalently,
\code{targetPeerPerformance(X, funds, "alpha")} is
\code{alphaScreening(X[, funds], Y = X)}.
}
\examples{
data("hfdata")
rets <- hfdata[, 1:10]

## focal Sharpe screening (funds by index) against the whole universe
out <- targetPeerPerformance(rets, funds = c(2, 5, 7), method = "sharpe",
                             control = list(nCore = 1))
out$sharpe
}
\seealso{
\code{\link{alphaScreening}}, \code{\link{sharpeScreening}},
\code{\link{msharpeScreening}}.
}
\author{
Murilo Andre Peres Pereira, David Ardia and Kris Boudt.
}
\keyword{htest}
