Functions for analyzing historical performance of stocks or other investments. Calculate maximum draw-down, Sharpe ratio, Sortino ratio, risk return ratio, alpha and beta from the capital assets pricing model (CAPM), and other commonly used metrics of stock performance. C++ used where possible to improve processing speed.

Author | Dane R. Van Domelen |

Date of publication | 2016-01-11 18:25:23 |

Maintainer | Dane R. Van Domelen <vandomed@gmail.com> |

License | GPL-2 |

Version | 1.1.2 |

**balances:** Calculate Balances Based on Initial Balance and Vector of...

**balances_weighted:** Calculate Balances of a Weighted Portfolio of Various Funds

**beta_trailing50:** Beta for Last 50 Daily Gains

**capm_daily:** Calculate Capital Assets Pricing Model (CAPM) Metrics Based...

**convert_rate:** Convert Gain from One Time Interval to Another

**daily_yearly:** Convert Daily Gain to X-year Gain

**diffs:** Lagged Differences (Alternate Implementation)

**final_balance:** Calculate Final Balance Based on Initial Balance and Vector...

**gains_rate:** Calculate Growth Rate From a Vector of Stock or Investment...

**historical_performance:** Analyze Historical Performance of Individual Funds or a...

**mdd:** Maximum Drawdown

**monthly_gains:** Calculate Monthly Gains for One or More Tickers

**neg:** Return Negative Elements of a Numeric Vector

**nonneg:** Return Non-Negative Elements of a Numeric Vector

**nonpos:** Return Non-Positive Elements of a Numeric Vector

**pchanges:** Lagged Proportion/Percent Changes

**pdiffs:** Lagged Proportion/Percent Differences

**pos:** Return Positive Elements of a Numeric Vector

**prices_rate:** Calculate Growth Rate From a Vector of Stock Prices or...

**ratios:** Ratios of Subsequent Elements in a Numeric Vector

**rrr:** Risk-Return Ratio

**sharpe_ratio:** Sharpe Ratio

**sortino_ratio:** Sortino Ratio

**stocks-package:** Fast Functions for Stock Market Analysis

**ticker_dates:** Get Yahoo! Finance Start/End Dates for One or More Tickers

**twofund_portfolio:** Analyze Historical Performance of Two-Fund Portfolio as a...

**vanguard_etfs:** List of Vanguard ETFs and their inception dates, current as...

**yearly_daily:** Convert X-year Gain to Average Daily Gain

**yearly_gains:** Calculate Yearly Gains for One or More Tickers

**zzz:** Daily Closing Prices for Imaginary Stock ZZZ Over 10 Years

stocks/DESCRIPTION

stocks/NAMESPACE

stocks/R

stocks/R/RcppExports.R
stocks/data

stocks/data/vanguardetfs.rda

stocks/data/zzz.rda

stocks/man

stocks/man/balances.Rd
stocks/man/balances_weighted.Rd
stocks/man/beta_trailing50.Rd
stocks/man/capm_daily.Rd
stocks/man/convert_rate.Rd
stocks/man/daily_yearly.Rd
stocks/man/diffs.Rd
stocks/man/final_balance.Rd
stocks/man/gains_rate.Rd
stocks/man/historical_performance.Rd
stocks/man/mdd.Rd
stocks/man/monthly_gains.Rd
stocks/man/neg.Rd
stocks/man/nonneg.Rd
stocks/man/nonpos.Rd
stocks/man/pchanges.Rd
stocks/man/pdiffs.Rd
stocks/man/pos.Rd
stocks/man/prices_rate.Rd
stocks/man/ratios.Rd
stocks/man/rrr.Rd
stocks/man/sharpe_ratio.Rd
stocks/man/sortino_ratio.Rd
stocks/man/stocks-package.Rd
stocks/man/ticker_dates.Rd
stocks/man/twofund_portfolio.Rd
stocks/man/vanguard_etfs.Rd
stocks/man/yearly_daily.Rd
stocks/man/yearly_gains.Rd
stocks/man/zzz.Rd
stocks/src

stocks/src/RcppExports.cpp

stocks/src/balances_weighted_c.cpp

stocks/src/diffs_c.cpp

stocks/src/mdd_hl_c1.cpp

stocks/src/mdd_hl_c2.cpp

stocks/src/mdd_p_c1.cpp

stocks/src/mdd_p_c2.cpp

stocks/src/pchanges_c.cpp

stocks/src/pdiffs_c.cpp

stocks/src/ratios_c.cpp

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.