stocks_file | R Documentation |
stocks_file()
lets the user download his personal Excel with his
Portfolio's data, locally or from Dropbox.
daily_stocks()
creates a dataframe with all relevant metrics and values,
for each ticker or symbol, for every day since inception.
daily_portfolio()
creates a data.frame with all relevant
metrics and values, for the overall portfolio, for every day
since inception.
stocks_obj()
lets the user create his portfolio's calculations and
plots for further study.
stocks_report()
lets the user create his portfolio's full report with
plots and send it to an email with the HTML report attached
stocks_file(
file = NA,
creds = NA,
auto = TRUE,
sheets = c("Portafolio", "Fondos", "Transacciones"),
keep_old = TRUE,
cache = TRUE,
quiet = FALSE
)
daily_stocks(hist, trans, tickers = NA, window = "MAX", ...)
daily_portfolio(hist, trans, cash, cash_fix = 0, window = "MAX")
stocks_obj(
data = stocks_file(),
cash_fix = 0,
tax = 30,
sectors = FALSE,
parg = FALSE,
window = c("1M", "YTD", "1Y", "MAX"),
cache = TRUE,
quiet = FALSE
)
stocks_report(
data = NA,
keep_old = TRUE,
dir = NA,
mail = FALSE,
attachment = TRUE,
to = "laresbernardo@gmail.com",
sectors = FALSE,
keep = FALSE,
creds = NA,
cache = TRUE
)
file |
Character. Import an Excel file, local or from URL. |
creds |
Character. Credential's user (see |
auto |
Boolean. Automatically use my local personal file? You might want
to set in into your .Renviron |
sheets |
Character Vector. Names of each sheet containing Portfolio summary, Cash, and Transactions information. Please, keep the order of these tabs. |
keep_old |
Boolean. Include sold tickers even though not currently in portfolio? |
cache |
Boolean. Use daily cache if available? |
quiet |
Boolean. Keep quiet? If not, informative messages will be printed. |
hist |
Dataframe. Result from |
trans |
Dataframe. Result from |
tickers |
Dataframe. Result from |
window |
Character. Choose any of: "1W", "1M", "6M", "1Y", "YTD", "5Y", "MAX" |
... |
Additional parameters. |
cash |
Dataframe. Result from |
cash_fix |
Numeric. If, for some reason, you need to fix your cash amount for all reports, set the amount here |
data |
Character. |
tax |
Numeric. How much [0-99] of your dividends are gone with taxes? |
sectors |
Boolean. Return sectors segmentation for ETFs? |
parg |
Boolean. Personal argument. Used to personalize stuff, in this case, taxes changed from A to B in given date (hard-coded) |
dir |
Character. Directory for HTML report output. If set to NA, current working directory will be used. If mail sent, file will be erased |
mail |
Boolean. Do you want to send an email with the report attached? If not, an HTML file will be created in dir |
attachment |
Boolean. Create and add report as attachment if
|
to |
Character. Email to send the report to |
keep |
Boolean. Keep HTML file when sent by email? |
List with portfolio, transactions, and cash data.frames.
data.frame. Processed at date and symbol level.
data.frame. Processed at date and portfolio level.
List. Aggregated results and plots.
Invisible list. Aggregated results and plots.
Other Investment:
etf_sector()
,
splot_summary()
,
stocks_quote()
Other Credentials:
db_download()
,
db_upload()
,
get_credentials()
,
get_tweets()
,
mail_send()
,
queryDB()
,
queryGA()
,
slackSend()
## Not run:
# Load lares dummy portfolio XLSX
file <- system.file("inst/docs", "dummyPortfolio.xlsx", package = "lares")
df <- stocks_file(
file = file,
sheets = c("Portafolio", "Fondos", "Transacciones"),
keep_old = FALSE
)
## End(Not run)
## Not run:
list <- stocks_obj()
stocks_report(list, dir = "~/Desktop")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.