Learn R Programming

⚠️There's a newer version (1.1.4) of this package.Take me there.

stocks (version 1.1.1)

Fast Functions for Stock Market Analysis

Description

Provides functions for analyzing historical performance of stocks or other investments. Functions are written in C++ to quickly calculate maximum draw-down, Sharpe ratio, Sterling ratio, and other commonly used metrics of stock performance.

Copy Link

Version

Install

install.packages('stocks')

Monthly Downloads

189

Version

1.1.1

License

GPL-2

Maintainer

Dane Van Domelen

Last Published

February 23rd, 2015

Functions in stocks (1.1.1)

nonnegatives

Return Non-Negative Elements of a Numeric Vector
pchanges

Lagged Proportion/Percent Changes
positives

Return Positive Elements of a Numeric Vector
ratios

Ratios of Subsequent Elements in a Numeric Vector
mdd

Maximum Drawdown
prices.rate

Calculate Growth Rate From a Vector of Stock Prices or Investment Balances
zzz

Daily Closing Prices for Imaginary Stock ZZZ Over 10 Years
convert.rate

Convert Gain from One Time Interval to Another
pdiffs

Lagged Proportion/Percent Differences
stocks-package

Fast Functions for Stock Market Analysis
balances

Calculate Balances Based on Initial Balance and Vector of Ratios
sortino

Sortino Ratio
rrr

Risk-Return Ratio
yearly.daily

Convert X-year Gain to Average Daily Gain
nonpositives

Return Non-Positive Elements of a Numeric Vector
sharpe

Sharpe Ratio
gains.rate

Calculate Growth Rate From a Vector of Stock or Investment Gains
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 of Ratios
negatives

Return Negative Elements of a Numeric Vector