daily_yearly {stocks}R Documentation

Convert Daily Gain to X-year Gain

Description

For example, you can use this function to calculate that an investment that gains 0.1 days).

Usage

daily_yearly(gain, years = 1)

Arguments

gain

Numeric value specifying a gain, e.g. 0.005 for 0.5 a vector of gains.

years

Numeric value.

Value

Numeric value or vector.

Examples

# Calculate annual gain for an investment that gains 0.1% per day
daily_yearly(gain = 0.001)

# Calculate 5-year gains corresponding to various daily gains
daily_yearly(gain = seq(0, 0.001, 0.0001), years = 5)



[Package stocks version 1.1.4 Index]