Skip to content

Latest commit

 

History

History
295 lines (227 loc) · 13.1 KB

contents.md

File metadata and controls

295 lines (227 loc) · 13.1 KB

Contents

Arithmetic Operations

  • ceil - Round toward positive infinity
  • cumdev - Cumulative mean deviation
  • cummax - Cumulative max of array elements
  • cummin - Cumulative min of array elements
  • cumprod - Cumulative product of array elements
  • cumsum - Cumulative sum of array elements
  • diff - Differences between adjacent elements in array
  • dot - Arrays dot product X * Y
  • fix - Round toward zero
  • floor - Round toward negative infinity
  • ldivide - Left array division X. \ Y
  • minus - Subtraction X - Y
  • mldivide - Matrix division X \ Y
  • mod - Modulus after division
  • mpower - Matrix power X ^ Y
  • mrdivide - Matrix division X / Y
  • mtimes - Matrix multiplication X * Y
  • plus - Addition X + Y
  • power - Element-wise power X. ^ Y
  • prod - Product of array elements
  • rdivide - Right array division X. / Y
  • rem - Remainder after division
  • round - Round to nearest integer
  • sum - Sum of array elements
  • times - Array multiply X. * Y
  • uminus - Unary minus -X

Array Creation and Concatenation

  • array - Create an array with custom elements
  • cat - Concatenate arrays and matrices
  • clone - Create a clone of the input array or matrix
  • diag - Diagonal matrix and get diagonals of a matrix
  • eye - Identity matrix
  • falses - Create array of all false
  • horzcat - Concatenate arrays or matrices horizontally
  • isarray - True for array
  • linspace - Create linearly spaced arrays
  • logspace - Create logarithmically spaced arrays
  • matrix - Create a matrix object
  • ones - Create array of all ones
  • rand - Uniformly distribuited pseudorandom numbers
  • subset - Subset of array or matrix based on X,Y coordinates
  • substelin - Subset of array or matrix based on linear indexing
  • tomat - Convert number or array to matrix
  • trues - Create array of all true
  • vertcat - Concatenate arrays or matrices vertically
  • zeros - Create array or matrix of all zeros

Array Dimensions

  • iscolumn - True for column vector
  • isempty - True for empty array or matrix
  • ismatrix - True for matrix
  • isrow - True for row vector
  • isscalar - True for scalar input
  • issquare - True for square matrix
  • isvector - True for vector input
  • length - length of vector or largest array dimension
  • ncols - Number of columns in vector|matrix MxN
  • ndims - Number of array dimensions
  • nrows - Number of rows in vector|matrix MxN
  • numel - Number of elements in an array
  • size - Size of N-D array

Basic Statistic

  • histc - Histogram count

Complex Numbers

  • abs - Absolute value
  • sign - Signum function

Create and Concatenate Strings

  • randchar - Generate a random alpha-numeric string

Data Transformation

  • ret2tick - Convert a return series to a value series with a start value
  • tick2ret - Convert a value series to a return series

Data Type Identification

Datafeed

  • yahoo - Download CSV Yahoo Finance historical (async request)
  • yahooSync - Download CSV Yahoo Finance historical (sync request)

Dates and Time

  • clock - Current date and time as date vector
  • datenum - Convert date and time to serial date number (Unix)
  • datestr - Convert serial date number (Unix) to string format
  • datevec - Convert date and time to vector of components
  • month - Month of date
  • now - Current date and time as date number (unix)
  • today - Current date
  • weekday - Day of week

Descriptive Statistic

  • corrcoef - Correlation coefficients of two arrays X,Y
  • cov - Covariance matrix
  • iqr - Interquartile range
  • kurtosis - Kurtosis
  • mad - Mean absolute deviation
  • max - Largest element in array
  • mean - Average value of array
  • median - Median value of array
  • min - Smallest element in array
  • mode - Most frequent value in an array of elements
  • moment - Central moments
  • prctile - Percentiles of a sample
  • quantile - Quantilies of a sample
  • quartile - Quartilies of a sample
  • range - Range of values
  • skewness - Skewness
  • std - Standard deviation
  • varc - Variance
  • xkurtosis - Excess kurtosis
  • zscore - Standardized Z score

Distance metrics

  • pdist - Pairwise distance between two sets of observations

Distribution Tests

Exponents and Logarithms

  • exp - Exponential value
  • log - Square root

Indexing

  • colon - Array of numbers from L to U with step S
  • end - Last index in array or matrix
  • find - Find indices of nonzero elements
  • getcol - Get a column of a matrix
  • getrow - Get a row of matrix
  • ind2sub - Multiple subscripts from linear index
  • setcol - Set a column of a matrix
  • setrow - Set a row of matrix
  • sub2ind - Subscripts to linear indices

Interpolation

Linear Equations

  • inv - Matrix inverse
  • linsolve - Solve linear system of equations Ax = b

Linear Regression

Logical Operations

Matrix Analysis

  • det - Matrix determinant

Matrix Decomposition

  • lu - LU matrix factorization

Matrix Types

Normal Distributions

  • normcdf - Normal cumulative distribution function (cdf)
  • norminv - Inverse of the normal cumulative distribution function (cdf)
  • normpdf - Normal probability density function (pdf)

Numeric Types

  • isnan - True only for NaN input

Parse Strings

  • strfind - Find one string within another

Performance metrics

  • activereturn - Active return
  • annreturn - Annualized Return
  • cagr - Compound annual growth rate
  • irr - Internal rate of return on an investment based on a series of periodic cash flows
  • mdietz - Historical performance of an investment portfolio with external cash flows
  • percpos - Percentage of positive values in array or matrix
  • ror - Simple rate of return
  • twr - True Time-weighted return measures the returns of the assets irrespective of the amount invested

Relational Operations

  • eq - Equality X === Y
  • ge - Greater than or equal to X >= Y
  • gt - Greater than X > Y
  • le - Less than or equal to X <= Y
  • lt - Less than X < Y
  • ne - Inequality X !== Y

Risk metrics

Set Operations

  • unique - Unique values in array or matrix

Sorting and Reshaping Arrays

  • flatten - Flatten a matrix
  • flipdim - Flip order of elements in array or matrix
  • fliplr - Flip matrix left to right
  • flipud - Flip matrix up to down
  • mergesort - Sort array in ascending/descending order
  • repmat - Replicate and tile array
  • reshape - Reshape array or matrix with custom values
  • sort - Sort array elements in ascending/descending order
  • squeeze - Remove singleton dimensions from N-D arrays (matrices)
  • transpose - Transpose X.'

Special Functions

  • erf - Error function
  • erfc - Complementary error function
  • erfcinv - Inverse complementary error function
  • erfinv - Inverse error function

Structures

  • arrayfun - Apply function to each element of an array or matrix
  • vectorfun - Apply a function to each vector column or row of a matrix

Time Series Analysis

  • hurst - Hurst index/exponent
  • tomonthly - Convert a time series to a monthly frequency
  • toweekly - Convert a time series to a weekly frequency

Utility

  • argsarray - Converting arguments to an array
  • format - Set display format for output (numbers)