Description Usage Arguments Value Author(s) References See Also Examples
Converts a proportion gain over one or several years to an average daily gain.
For example, an investment that gains 15% over 3 years has an average daily
gain of approximately 0.0186%. The formula is:
daily.gain = (total.gain + 1) ^ (1 / (252 * years)) - 1
. Here
total.gain
and daily.gain
are proportions, e.g. 0.15 for 15%.
1 | yearly.daily(total.gain, years = 1)
|
total.gain |
Numeric value (or vector) representing the proportion gain of an investment over the number of years specified. |
years |
Number of years. |
Numeric value indicating average daily gain.
Dane R. Van Domelen
Acknowledgment: This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-0940903.
1 2 3 4 5 | # Calculate average daily gain corresponding to a 15% gain over a 3-year period
yearly.daily(total.gain = 0.15, years = 3)
# Figure out daily gain required for various gains over a 5-year period
yearly.daily(total.gain = seq(0, 2, 0.25), years = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.