invest: Return on investment for a single cryptocurrency

Description Usage Arguments Value Author(s) Examples

View source: R/preciousFunctions.R

Description

Computes the simple gain or loss given a specific cryptocurrency and a particular amount of money invested in it during a period of time.

Usage

1
invest(symbol = "BTC", amount, start, end = as.Date(Sys.Date()))

Arguments

symbol

a character string of the symbol. Default is "BTC" for Bitcoin.

amount

a numeric value for the amount of money invested, in the previous currency.

start

a date in "YYYY-MM-DD" format when the money is invested.

end

a date in "YYYY-MM-DD" format when the money is withdrawed. Default is today.

Value

a numeric value.

Author(s)

Vincent KV contact@vincentkv.com

Examples

1
my_gain=invest(symbol="BTC",amount=20,start="2021-01-01",end="2021-04-01")

VincentKV/Cryptics documentation built on Dec. 18, 2021, 6:18 p.m.