[Returnanalytics-commits] r3337 - in pkg/PerformanceAnalytics/sandbox/PAenhance: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 25 20:56:17 CET 2014


Author: kecoli
Date: 2014-02-25 20:56:17 +0100 (Tue, 25 Feb 2014)
New Revision: 3337

Removed:
   pkg/PerformanceAnalytics/sandbox/PAenhance/R/lpm.Rd
   pkg/PerformanceAnalytics/sandbox/PAenhance/man/lpm.R
Log:
delete misplaced file in sandbox/PAenhance

Deleted: pkg/PerformanceAnalytics/sandbox/PAenhance/R/lpm.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/PAenhance/R/lpm.Rd	2014-02-25 19:47:36 UTC (rev 3336)
+++ pkg/PerformanceAnalytics/sandbox/PAenhance/R/lpm.Rd	2014-02-25 19:56:17 UTC (rev 3337)
@@ -1,30 +0,0 @@
-\name{lpm}
-\alias{lpm}
-\title{calculate the lower partial moment of a time series}
-\usage{
-lpm(R, n, threshold, about_mean = FALSE)
-}
-\arguments{
-  \item{R}{xts data}
-
-  \item{n}{the n-th moment to return}
-
-  \item{threshold}{threshold can be the mean or any point
-  as desired}
-
-  \item{about_mean}{TRUE/FALSE calculate LPM about the mean
-  under the threshold or use the threshold to calculate the
-  LPM around (if FALSE)}
-}
-\description{
-Code to calculate the Lower Partion Moments around the mean
-or a specified threshold from Huffman S,P & Moll C.R. 2011
-"The impact of Asymmetry on Expected Stock Returns: An
-Investigation of Alternative Risk Measures" Algorithmic
-Finance 1 (2011) 79-93
-}
-\author{
-Kyle Balkissoon \email{kylebalkissoon at gmail.com}
-\email{kyle at corporateknights.com}
-}
-

Deleted: pkg/PerformanceAnalytics/sandbox/PAenhance/man/lpm.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/PAenhance/man/lpm.R	2014-02-25 19:47:36 UTC (rev 3336)
+++ pkg/PerformanceAnalytics/sandbox/PAenhance/man/lpm.R	2014-02-25 19:56:17 UTC (rev 3337)
@@ -1,54 +0,0 @@
-#' calculate the lower partial moment of a time series
-#'
-#' Code to calculate the Lower Partion Moments around the mean or a specified threshold
-#' from Huffman S,P & Moll C.R. 2011 "The impact of Asymmetry on Expected Stock Returns: An Investigation of Alternative Risk Measures" Algorithmic Finance 1 (2011) 79-93
-#'
-#' @param R xts data
-#' @param n the n-th moment to return
-#' @param threshold threshold can be the mean or any point as desired
-#' @param about_mean TRUE/FALSE calculate LPM about the mean under the threshold or use the threshold to calculate the LPM around (if FALSE)
-#'
-#' @author Kyle Balkissoon \email{kylebalkissoon@@gmail.com}  \email{kyle@@corporateknights.com}
-#' @export
-lpm <- function(R,n,threshold,about_mean=FALSE){
-
-  if(about_mean==TRUE){
-    #Calculate Number of obs less than threshold
-    nb = nrow(x[x<threshold,])
-    #Calculate mean of all obs less than threshold
-    R_avg = mean(x[x<threshold,],na.rm=T)
-    #subset data as less than threshold
-    x_cond = x[x<threshold,]
-    #Calculate LPM
-
-    LPM = (1/nb) * sum(max(0,R_avg-x_cond)^n)
-  } else {
-
-  #Calculate Number of obs less than threshold
-    nb = nrow(x[x<threshold,])
-    #Calculate mean of all obs less than threshold
-    R_avg = threshold
-    #subset data as less than threshold
-    x_cond = x[x<threshold,]
-    #Calculate LPM
-
-    LPM = (1/nb) * sum(max(0,R_avg-x_cond)^n)
-
-  }
-
-  return(LPM)
-}
-
-
-
-###############################################################################
-# R (http://r-project.org/) Econometrics for Performance and Risk Analysis
-#
-# Copyright (c) 2004-2014 Peter Carl and Brian G. Peterson
-#
-# This R package is distributed under the terms of the GNU Public License (GPL)
-# for full details see the file COPYING
-#
-# $Id: lpm.R 3301 2014-01-18 15:26:12Z braverock $
-#
-###############################################################################



More information about the Returnanalytics-commits mailing list