FairPortfolio.apply_f_from_2nd_rowMethod
apply_f_from_2nd_row(prices::Matrix, f::Function, top_row_value)

Per column, apply function f to the prices row-by-row, depending on current and prev value Good data from 2nd row.

FairPortfolio.calc_dretMethod
calc_lnret(prices::Matrix)

Input: prices Output: nominal returns, good from 2nd row https://en.wikipedia.org/wiki/Continuouslycompoundednominalandreal_returns

FairPortfolio.calc_lnretMethod
calc_lnret(prices::Matrix)

Input: prices Output: continuous returns, good from 2nd row https://en.wikipedia.org/wiki/Continuouslycompoundednominalandreal_returns

FairPortfolio.calc_new_varianceMethod
calc_new_variance

Running variance calculation of time series data. Calculates the variance given the prev one, the prev point and the new point.

FairPortfolio.calc_norm_dretMethod
calc_norm_dret(dret::Matrix, running_var_homogenizer::Matrix)

Given the nominal returns (dret) and running variance homogenizer, calculate the homogenized nominal returns. Good data from 1 rows after input

FairPortfolio.calc_running_homogenizerMethod
calc_running_homogenizer

Given running variance, calculates the homogenizing factor required to have a stable variance across assets and time (heteroskadasticity -> homoskadasticity). Good data same as input.

FairPortfolio.optimizeMethod
optimize(C)

(nassets, nassets) = size(C) Takes a full (square) covariance matrix (C) (symmetric and positive semi-definite) and with constant diagonals. Output: optimal weights per asset.

FairPortfolio.optimizeMethod
optimize(prices...)

Expects a vector per asset, rows are per time period. Each asset has the same # of rows. Calculates the homogenized and shrunk covariance matrix before running the core optimization. Output: optimal weights per asset.

FairPortfolio.separate_cov_matrixMethod
separate_cov_matrix(C)

(nassets, nassets) = size(C) Takes a full (square) covariance matrix (C) (symmetric and positive semi-definite) and with constant diagonals. Returns C split into four parts as required by the optimization.

FairPortfolio.shrinkMethod
shrink(C)

Statistical Shrinkage stabilizes the covariance matrix C https://en.wikipedia.org/wiki/Shrinkage_(statistics)

FairPortfolio.tuple_to_matrixMethod
tuple_to_matrix(prices::Tuple)

Input are prices vectors per asset as a tuple or separated as arguments. E.g. tupletomatrix(asset1prices, asset2prices, asset3prices, ...) Returns a Matrix with a column per asset and a row per time period.