update_db_prices_based_on_transactions: Update and store prices in database based on new transactions

View source: R/get_price_data.R

update_db_prices_based_on_transactionsR Documentation

Update and store prices in database based on new transactions

Description

Update and store prices in the database (currently csv files) shared by all users. For each ticker, prices are written to a separate csv file. Prices are updated if incoming transactions are older than the latest price that is available according to a list with first and last date of a given ticker (this list is stored in a csv as well). Prices are also updated if there are no prices available for the given ticker.

Usage

update_db_prices_based_on_transactions(df_transactions, db_path,
         external_search = TRUE)

Arguments

df_transactions

A data frame. Results from get_transactions. At least three variables/columns are required: transaction_type, isin and transaction_date

db_path

A single character string containing the directory of the database.

external_search

Logical; if TRUE, the function searches external sources to find the ticker.


lorenzbr/PortfolioTracker documentation built on Feb. 11, 2023, 8:27 a.m.