Calculate CAPM metrics for a stock relative to an index.

1 2 3 |

`tickers` |
Character string or vector of 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. '1950-01-03' for January 3, 1950), indicating the starting date for the period of interest. |

`to` |
Date or character string in form of date (e.g. '2015-03-09' for March 9, 2015), indicating the ending date for the period of interest. |

`weights` |
Vector of numeric weights. |

`weights.popmoments` |
If TRUE, optimal weights are based on estimated population moments. |

`align.all` |
If TRUE, all dates are aligned. |

`decimals` |
Whole number indicating the number of decimal places you would like the CAPM metrics rounded to. |

`plot.characteristic` |
If TRUE, function plots characteristic lines for individual funds and optimally weighted portfolio. |

List where first element is list of trading dates, second element is matrix of growth of \$100, third element is data frame of performance metrics, fourth element is list of characteristic line regression fits, fifth element is covariance matrix, and sixth element is vector of optimal weights.

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

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.

NA

1 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.