Y&R Miscellaneous R Functions
Lag/Lead Correlation
Spearman rank correlation
Calculate future value of annuity
Calculate present value of annuity
Create logarithm with a random base
Calculate the plain vanilla bond price
Calculating the difference of a time series
Largest draw down of returns
Create a lag variable
Create a lead variable
Create logarithm with a random base
Calculating rate of return of a vector
Create nth power variable
Sort a data frame by a column
Stack data frame by one classifier
Correlation matrix
Calculating kurtosis for numeric data.
Calculating mode for numeric data
Calculating skewness for numeric data
Descriptive statistics of a data frame
Time series plot for two variables
Time series plot for two variables with ggplot2
Scatter smooth plot with text overlay
Scatter smooth plot with text overlay using ggplot2
Scatter plot with text overlay
Scatter plot with text overlay with ggplot2
Scatter plot of x and y divided by z
Plot histograms for a data frame
Plot histograms for a data frame with ggplot2
Plot histograms and scatter plots for a data frame
Plot histogram with density line for a data frame
Plot histograms for a data frame with ggplot2
Plot mean-variance simulation result
Plot scatter plots for a data frame
Plot scatter plots for a data frame using ggplot2
Plot scatter smooth plots for a data frame
Plot scatter plots with smooth line for a data frame using ggplot2
Plot time series plots for a data frame
Plot times series plot for a data frame with ggplot2
Time series plot with multiple variables
Stock return alpha
Annualized excess return
Annualized return
Annualized standard deviation
Stock return beta
Bias ratio
Batting average
Cumulative excess return
Cumulative return
Dual-alpha
Dual-beta
Expected loss
Mean-variance model with historical average returns and standard devia...
Information ratio
Jensen's alpha
Modigliani risk-adjusted performance
Probability of loss
Roy's safety-first criterion
Standard deviation of excess return
Semivariance of loss
Sharp ratio
Sortino ratio
Tracking error
Treynor ratio
Average up and down returns
Up and down capture
Adjusted R-squared for lm.fit
AIC for lm.fit
BIC for lm.fit
Degree of freedom for lim.fit
Durbin-Watson Test
Linear regression processor
Linear model generator
R-squared for lm.fit
Standard error for lim.fit
Sigmoid function
Logistic function
Normal density function
Unit normal loss integral
Download data from Federal Reserve Bank of St. Louis
Federal Reserve Bank of St. Louis Economic Data Tickers
Miscellaneous functions for data analysis, portfolio management, graphics, data manipulation, statistical investigation, including descriptive statistics, creating leading and lagging variables, portfolio return analysis, time series difference and percentage change calculation, stacking data for higher efficient analysis.