File: getDividends.Rd

package info (click to toggle)
r-cran-quantmod 0.4.28-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 984 kB
  • sloc: makefile: 2
file content (69 lines) | stat: -rw-r--r-- 2,103 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
\name{getDividends}
\alias{getDividends}
\title{ Load Financial Dividend Data }
\description{
Download, or download and append stock dividend data
from Yahoo! Finance.
}
\usage{
getDividends(Symbol, 
             from = "1970-01-01",
             to = Sys.Date(), 
             env = parent.frame(), 
             src = "yahoo", 
             auto.assign = FALSE, 
             auto.update = FALSE, 
             verbose = FALSE,
             split.adjust = TRUE,
             ...,
             curl.options = list())
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{Symbol}{ The Yahoo! stock symbol }
  \item{from}{ date from in CCYY-MM-DD format }
  \item{to}{ date to in CCYY-MM-DD format }
  \item{env}{ where to create object }
  \item{src}{ data source (only yahoo is valid at present)}
  \item{auto.assign}{ should results be loaded to env}
  \item{auto.update}{ automatically add dividend to data object }
  \item{verbose}{ display status of retrieval }
  \item{split.adjust}{ adjust dividends for splits (\code{TRUE} by default
    because that's what Yahoo returns)}
  \item{\dots}{ currently unused }
  \item{curl.options}{ options passed to \code{curl::curl} }
}
\details{
Eventually destined to be a wrapper function along the lines
of \code{getSymbols} to different sources - this currently
only support Yahoo data.
}
\value{
If auto.assign is TRUE, the symbol will be written
to the environment specified in \code{env} with a
.div appended to the name.

If auto.update is TRUE and the object is of class
\code{xts}, the dividends will be included as an
attribute of the original object and be reassigned
to the environment specified by \code{env}.

All other cases will return the dividend data
as an \code{xts} object.
}
\references{ Yahoo! Finance: \url{https://finance.yahoo.com}}
\author{ Jeffrey A. Ryan }
\note{ 
This function is very preliminary - and will most likely
change significantly in the future.
}
\seealso{ \code{\link{getSymbols}} }
\examples{
\dontrun{
getSymbols("MSFT")
getDividends("MSFT")

getDividends(MSFT)
}
}
\keyword{ utilities }