Y&R Miscellaneous R Functions

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.


YRmisc package News:

================================================== YRmisc 0.1.4


New Functions:

all new functions for this version are for portfolio management

pt.annrtn: calculate annualized return from annual returns pt.udrtn: average up and down returns pt.alpha: calculate asset alpha pt.beta: calculate asset beta pt.annexrtn: annualized excessive return pt.annsd: annualized standard deviation pt.btavg: batting average pt.cmrtn: cumulative return pt.cmexrtn: cumulative excess return pt.probloss: probability of loss with target pt.exploss: expected loss with target pt.semivar: semivariance of returns with target pt.info: calculate information ratio pt.sharp: calculate sharp ratio pt.sortino: calculate sortino ratio pt.treynor: calculate treynor ratio pt.sdexret: standard deviation of excess return pt.updwcap: up and down capture pt.jalpha: Jensen's alpha pt.te: tracking error pt.m2: modigliani risk-adjusted performance

================================================== YRmisc 0.1.3


Happy New Year!

Changing package name to {YRmisc}: Yin & Russon Miscellaneous R Functions

New Functions:

pkg.save: save installed packages before updating R pkg.install: install pre-save packages from pkg.save() after updating R pl.histgg: histograms for a data frame with ggplot2 pl.sgg: scatter plots for a data frame with ggplot2 pl.smgg: scatter plots with smooth line for a data frame with ggplot2 pl.tsgg: time series plots for a data frame with ggplot2 pl.2tsgg: two time series with ggplot2 pl.3txtgg: scatter plot with text overlay using ggplot2 pl.3smoothtxtgg: scatter plot with text overlay and smooth line using ggplot2 xd.fred.tickers: output a data frame with information of FRED variables


xd.fred: now the function can take more than one ticker and output a merged data frame with all observations

Bug fixes:

text fixes

removed pl.multiple - plotting arrangement has switched to using {gridExtra}

================================================== PMmisc 0.1.2


Happy Thanks Giving!

Bug fixes:

Fixed df.sort not working due to a coding error Fixed pl.s having wrong title generated Fixed pl.sm having wrong title generated

New Functions:

cv.powers to generate new varibables cv.logs to generate new varibables cv.axp to generate new varibables

reg.linreg now is with optimized coding, runs 99% faster reg.r.suqred for reg.linreg result generation reg.adjr.suqred for reg.linreg result generation reg.aic for reg.linreg result generation reg.bic for reg.linreg result generation reg.dof for reg.linreg result generation reg.std.err for reg.linreg result generation reg.dw for reg.linreg result generation *Note: All the test statistics add as functions are to improve reg.linreg efficiency for large number of model calculations.

pl.histgg for batch graph generation with ggplot2 Note: This is a test to convert most pl. functions from base graph to ggplot2. However, the current version runs very slow.

================================================== PMmisc 0.1.1


Added package NEWS File.

Updated some examples with more details.

Applied a new naming method.

Added new 14 functions.

================================================== PMmisc 0.1.0

First Version 2018-May-04

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.6 by Xuanhua (Peter) Yin, 2 years ago

Browse source code at https://github.com/cran/YRmisc

Authors: Manuel Russon <[email protected]> , Xuanhua (Peter) Yin <[email protected]>

Documentation:   PDF Manual  

GPL (>= 2) license

Imports ggplot2, grid, gridExtra

See at CRAN