R/RcppExports.R

Defines functions PropOPtLoopCpp sdRollCpp SMACpp weightsProp

Documented in sdRollCpp sdRollCpp SMACpp

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @title PropOPtLoopCpp
#' @description
#' Returns comparison value given lockback period and a confidence level
#' @name PropOPtLoopCpp
#' @param k numeric vector of lockback periods
#' @param cf int confidence level
#' @param type char comparison value either c("SharpeRatio", "CGR", "CAGR")
#'
NULL

PropOPtLoopCpp <- function(k, cf, type) {
    .Call('_cryptoPlay_PropOPtLoopCpp', PACKAGE = 'cryptoPlay', k, cf, type)
}

#' @title sdRollCpp
#' @description
#' Returns sd rolling over specified period
#' @name sdRollCpp
#' @param x A numeric vector
#' @param k number of periods to take mean over
#'
#' @export
NULL

sdRollCpp <- function(x, k) {
    .Call('_cryptoPlay_sdRollCpp', PACKAGE = 'cryptoPlay', x, k)
}

#' @title SMACpp
#' @description
#' Returns simple moving average
#' @name SMACpp
#' @param x A numeric vector
#' @param k number of periods to take mean over
#'
#' @export
NULL

SMACpp <- function(x, k) {
    .Call('_cryptoPlay_SMACpp', PACKAGE = 'cryptoPlay', x, k)
}

#' @title weightsProp
#' @description
#' Returns weights given t-statistics and a confidence level
#' @name sdRollCpp
#' @param x A numeric vector of t-statistics
#' @param cf int confidence level
#' @param k int lockback period
#'
#' @export
NULL

weightsProp <- function(x, cf, k) {
    .Call('_cryptoPlay_weightsProp', PACKAGE = 'cryptoPlay', x, cf, k)
}
3schwartz/cryptoPlay documentation built on May 18, 2019, 2:33 a.m.