\HeaderA{apply.fromstart}{calculate a function over an expanding window always starting from the beginning of the series}{apply.fromstart}
\keyword{ts}{apply.fromstart}
\keyword{multivariate}{apply.fromstart}
\keyword{distribution}{apply.fromstart}
\keyword{models}{apply.fromstart}
\begin{Description}\relax
A function to calculate a function over an expanding window from the start of the timeseries.  This wrapper allows easy calculation of \dQuote{from inception} statistics.
\end{Description}
\begin{Usage}
\begin{verbatim}
apply.fromstart(R, FUN = "mean" , gap = 1, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{R}] an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns 
\item[\code{FUN}] any function that can be evaluated using a single set of returns (e.g., rolling beta won't work, but \code{\LinkA{Return.annualized}{Return.annualized}} will)
\item[\code{gap}] the number of data points from the beginning of the series required to \dQuote{train} the calculation
\item[\code{...}] any other passthru parameters 
\end{ldescription}
\end{Arguments}
\begin{Value}
A timeseries in a zoo object of the calculation results
\end{Value}
\begin{Author}\relax
Peter Carl
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{apply}{apply}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(managers)
apply.fromstart(managers[,1,drop=FALSE], FUN="mean", width=36)

\end{ExampleCode}
\end{Examples}

