PCA for asset allocation

Assume we have a family of \(n\) assets whose daily return is vector \(\mu\) and the covariance matrix is \(\Sigma\). If we make a portfolio whose asset weight is \(w_k\) for asset \(k\) and the vector of all weights is \(w\), then the portfolio’s volatility is \(\sigma = (w^\top\Sigma w)^{1/2}\).... [more]

Multivariate Outlier Detection

For an observation of multidimensional variable \(x_i\) and the set of observations \(X\), the Mahalanobis distance tells how far \(x_i\) is from the center of the data with the shape of the dataset considered (i.e., far from center but with multiple samples in the proximity of Euclidean space is fine,... [more]

Building tensorflow 2.7 in Debian

If you just want to use tensorflow, nothing can be easier than running pip install tensorflow to install it. If for any reason you need to recompile it from source code (in Linux), this is what to do. [more]

Tensorflow.js quick start

Tensorflow.js is a way to run tensorflow model in Javascript, or simply your browser. It is huge but not as huge as the Python tensorflow itself. The way we use it is first, to load the 1.2MB js file from the CDN at anywhere in the HTML: [more]