1

I'm trying to understand a study that recently has been published by Lin et al. (2023). Through this study, an Online Portfolio Selection algorithm has been proposed which takes advantage of mean reversion and meta-learning approaches (in other words, it is a combination of the mentioned approaches). They've provided an algorithm as below:
enter image description here
My question is about the 8th line where they wrote:
8: Calculate the vector $\mathbf{L}_t$ for OGU according to (8): ${\mathbf{L}_t} = {1 \over 2}\left( {{{\nabla {f_t}\left( {{\theta _t}} \right)} \over {\zeta {g_\infty }}} + \mathbf{1}} \right)$

Where I should calculate ${\nabla {f_t}\left( {{\theta _t}} \right)}$. According to the paper, ${\mathbf{L}_t} \in {\mathbb{R}^k}$ is a vector, and the ${\nabla {f_t}\left( {{\theta _t}} \right)}$ is a vector as well:

$\nabla {f_t}\left( {{\theta _t}} \right) = - \frac{{{\mathbf{x}_t}B_t^ \top }}{{{\theta _t}{B_t}\mathbf{x}_t^ \top }} + \lambda \left( {{\theta _t}{B_t} - {{\tilde{\mathbf{b}}}_{t - 1}}} \right)B_t^ \top \in {\mathbb{R}^k}$

However, I don't understand how the $\nabla {f_t}\left( {{\theta _t}} \right)$ results in a vector. Let's first recap the essence of the required variables:

$\begin{array}{l}m = \text{Number of stocks}\\t = \text{Index of time period}\\k = \text{Number of experts}\\n = \text{Number of trading periods}\\{b_t} = ({b_{t,1}},{b_{t,2}}, \ldots ,{b_{t,m}})\\\lambda = Scalar\\{{\tilde b}_{t - 1}} = ({{\tilde b}_{t - 1,1}},{{\tilde b}_{t - 1,2}}, \ldots ,{{\tilde b}_{t - 1,m}})\\{B_t} = \left[ {b_t^1;b_t^2; \ldots ;b_t^k} \right] \in {\mathbb{R}^{k \times m}}\\{\theta _t} = \left( {\theta _t^1,\theta _t^2, \ldots ,\theta _t^k} \right) \in {\mathbb{R}^k}\end{array}$

Considering the definitions, I don't know how to calculate ${{\theta _t}{B_t}x_t^ \top }$. ${B_t}$ is a ${k \times m}$ matrix. On the other hand, the shape of $x_t^ \top$ matrix should be (from my point of view) $x_t^ \top \in {\mathbb{R}^{m \times 1}}$. Hence, the result of ${{B_t}x_t^ \top }$ should be a matrix with the size of ${k \times 1}$. Then, what would be the result of ${{\theta _t}{B_t}x_t^ \top }$ (considering ${\theta _t} \in {\mathbb{R}^k}$ and ${B_t}x_t^ \top \in {\mathbb{R}^{k \times 1}}$) ?

The right hand side of the $\nabla {f_t}\left( {{\theta _t}} \right)$ we have this $\lambda \left( {{\theta _t}{B_t} - {{\tilde b}_{t - 1}}} \right)B_t^ \top$ term. $\lambda$ is a scalar and it's clear. Let's open up the rest:

$\left( {{\theta _t}{B_t} - {{\tilde b}_{t - 1}}} \right)B_t^ \top = {\theta _t}{B_t}B_t^ \top - {{\tilde b}_{t - 1}}B_t^ \top = {\theta _t}I - {{\tilde b}_{t - 1}}B_t^ \top $

The result of ${{\tilde b}_{t - 1}}B_t^ \top$ probably is a Matrix of ${1 \times k}$ (in other words a vector with $k$ members (${\mathbb{R}^k}$)). Hence, I guess the result of ${\theta _t}I - {{\tilde b}_{t - 1}}B_t^ \top$ is a vector with $k$ members. Am I right?

Shayan
  • 113
  • 1
    $\theta_t$ is a $1\times k$ row vector. So $\theta_tB_tx_t^T$ is $(1\times k)(k\times m)(m\times 1) = (1\times 1)$ which is a scalar. And you're right: the final thing you mentioned in your question is a $(1\times k)$ vector. – Benjamin Wang Oct 05 '23 at 07:28
  • @BenjaminWang, wow, yes! and the result of ${{x_t}B_t^ \top }$ should be a scalar as well. Am I right about the second term of the $\nabla {f_t}\left( {{\theta t}} \right)$? This term $\left( {{\theta _t}{B_t} - {{\tilde b}{t - 1}}} \right)B_t^ \top$ I mean. – Shayan Oct 05 '23 at 07:33
  • 1
    @BenjaminWang, thank you so much!! – Shayan Oct 05 '23 at 07:36
  • 1
    No, the numerator $x_tB_t^T = (1\times m)(m\times k) = (1\times k)$ vector. But your second term is correct $(1\times k)$. Of course the two terms must be the same dimensions. – Benjamin Wang Oct 05 '23 at 07:40
  • 1
    @BenjaminWang, Oh, my bad. Thank you! – Shayan Oct 05 '23 at 07:42

0 Answers0