Analyze Historical Performance of Two-Fund Portfolio as a Function of Asset Allocation

Description

Calculate various measures of historical performance for a two-fund portfolio with all possible asset allocations.

Usage

1
2
twofund.portfolio(tickers, index.ticker = "SPY", from = NULL, to = NULL,
                  reference.tickers = "SPY", plots = TRUE)

Arguments

tickers

Character vector of two ticker symbols.

index.ticker

Character string indicating ticker symbol for the index that the stock is being compared to.

from

Date or character string in form of date (e.g. '2015-01-01' for Jan. 1, 2015), indicating the starting date for the period of interest. Default is 1 year prior to current date.

to

Date or character string in form of date (e.g. '2016-01-01' for Jan. 1, 2016), indicating the ending date for the period of interest. Default is current date.

reference.tickers

Character string or vector indicating ticker symbols of reference funds to compare results against.

plots

If TRUE, function returns three plots in addition to other results (compound annual growth rate vs. maximum drawdown; mean vs. standard deviation of daily gains; and Sharpe ratio vs. standard deviation of daily gains).

Value

Depending on the function inputs, some combination of a data frame with performance statistics for the two-fund portfolio with various allocations, a data frame with performance statistics for the reference.tickers funds, and three plots. If more than one object, they are returned as a list.

Note

This function prints warnings which are typically nothing to worry about.

Author(s)

Dane R. Van Domelen

References

Acknowledgment: This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-0940903.

See Also

NA

Examples

1

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.