Description Usage Arguments Details Value Author(s) References See Also Examples
Returns the diary infomation about the prices and/or the transactioned volume of the shares adjusted by the factors that you choose.
1 2 3 |
shares |
A vector with the names of the shares or # "all" to download shares with adjusted prices. |
by |
A vector with the corporate events must be used in the adjust. Slipts and alterations in the factor of quotation are always adjusted: all - It uses all the events; Separately it's possible to specify in a vector a combination of these: Dividend, Interest, Bonus shares, Subscription Right, Spinoff, Return of Capital. |
subscription |
There are three alternatives of specification for this argument: rational - buy the share when the price of subscriptied share is cheaper than the price of the share in the market; neverbuy - self explanatory; alwaysbuy - self explanatory |
info |
full - returns a data.frame with the bovespa's quotation data; simplified - returns a data.frame with the open, close, min, max, mean, bid and ask prices, transactioned volume of the day and other informations that changed between the specified shares; single - returns a xts object with a single column specified in paramenter value. |
value |
only used if info = "single". The setted argument is the "Return" column, but it can be changed at will. |
fill |
Some of the shares aren't negotiated every period, so this parameter set how must be treated the missing days. Notice that this paramenter will only used only if info = "single". The options are below: last - uses the last negotiated day value to fill the gaps. NA - fills with NAs. drop - Drop the day out of the time serie. |
An explanation will be given as to how stock returns are adjusted
The function has two different outputs.
A data.frame with the share in the first collum and date as second for info setted as "full" or "simplified"
A xts with a collum (the one from value parameter) taken from the original data.frame for each share.
Michel Ricardo Meyer /emailmichel.ricardo.meyer@gmail.com
To the original information see:
The BM&F Bovespa's site also have the firm's corporative events. Not everyone, unfortunately.
1 2 3 4 5 6 7 8 9 | # Same as in \code{\link{getPrices}} but now we have one more parameter.
tests <- getAdjPrices(c("PETR3", "VALE3", "WEGE3"), by = "", info = "single", value = "Close")
# Here we have the PETR3 quotation adjusted only by the splits and alteration of quotation factor.
plot(tests[, "PETR3"])
tests <- getAdjPrices(c("PETR3", "VALE3", "WEGE3"), by = "all", info = "single", value = "Close")
# Now adjusted by all corporative events.
plot(tests[, "PETR3"])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.