stocks1.1.4 package

Stock Market Analysis

beta_trailing50

Beta for Last 50 Daily Gains

contango_hedged

Backtest a Hedged Contango-Based Volatility Trading Strategy

contango_simple

Backtest a Simple Contango-Based Volatility Trading Strategy

convert_gain

Convert Gain from One Time Interval to Another

daily_yearly

Convert Daily Gain to X-year Gain

diffs

Lagged Differences (Alternate Implementation)

gains_graph

Scatterplot of Investment Gains

gains_prices

Convert Gains to Prices

gains_rate

Calculate Growth Rate From a Vector of Gains

growth_graph

Graph Investment Growth

load_gains

Download and Align Gains for a Set of Tickers

load_prices

Download and Align Historical Prices for a Set of Tickers

mdd

Maximum Drawdown

metrics

Calculate Various Performance Metrics

onemetric_graph

Graph Performance Metric for Various Investments

onemetric_overtime_graph

Graph Performance Metric Over Time for Various Investments

pchanges

Lagged Proportion Changes

pdiffs

Lagged Proportion Differences

prices_gains

Convert Prices to Gains

prices_rate

Calculate Growth Rate From a Vector of Prices

ratios

Ratios of Subsequent Elements in a Vector

rrr

Risk-Return Ratio

sharpe

Sharpe Ratio

sortino

Sortino Ratio

stocks

Stock Market Analysis

targetall

Backtest a Fixed-Allocation Trading Strategy

targetbeta_twofunds

Backtest a Two-Fund Strategy that Targets a Certain Beta

threefunds_graph

Graph One Performance Metric vs. Another for Three-Fund Portfolio as A...

ticker_dates

Get Yahoo! Finance Start/End Dates for Tickers

twofunds_graph

Graph One Performance Metric vs. Another for Two-Fund Portfolios as Al...

twometrics_graph

Graph One Performance Metric vs. Another for Various Investments

Functions for analyzing stocks or other investments. Main features are loading and aligning historical data for ticker symbols, calculating performance metrics for individual funds or portfolios (e.g. annualized growth, maximum drawdown, Sharpe/Sortino ratio), and creating graphs. C++ code is used to improve processing speed where possible.

  • Maintainer: Dane R. Van Domelen
  • License: GPL-3
  • Last published: 2018-08-31