\begin{algorithm}
\caption{The market return fitting step in training GF-AGRU.} \label{algorithm_N}
\textbf{Hyperparameters}: learning rate $l_{\text{fix}}$ of the FIX-OPTIM sub-procedure, learning rate $l_{\text{tv}}$ of the TV-AGRU sub-procedure, number of maximum iterative steps $N_m$, number of training epochs $N_{\text{fix}}$ of FIX-OPTIM, number of training epochs $N_{\text{tv}}$ of TV-AGRU, and the training set size $S$.\\
\textbf{Input}: training data including the features $F_{<t}$ and the label $Y_M^t$. $F_{<t}$ is constructed by Equation \eqref{eqn:features_Ft} using historical daily market returns, and $Y_M^t$ is the future one-month return. The training set collects data points on a daily frequency. \\
\textbf{Initialize}: tail parameters $\nu_M=\{u_M,v_M\}$ and the Attention-GRU network parameters $\theta_{\text{AGRU}}$.
\begin{algorithmic}[1]
\For{$b=1:N_m$}
\State (TV-AGRU)
\State Fix $\nu_M$ given by FIX-OPTIM.
\For{$j=1:N_{\text{tv}}$}
    \State Compute $\Theta^t_M = \{\alpha^t_M,\beta^t_M\} = \text{AGRU}(F_{<t};\theta_{\text{AGRU}})$.
    \State Compute the NLL loss $L=\sum_{t=1}^S (-\ell_M^t)$ and its partial derivatives with respect to $\theta_{\text{AGRU}}$.
    \State Update: $\theta_{\text{AGRU}} \gets \text{RMSProp}(\theta_{\text{AGRU}},\nabla_{\theta_{\text{AGRU}}} L,l_{\text{tv}})$.
\EndFor 
\State (FIX-OPTIM)
\State Fix $\theta_{\text{AGRU}}$ given by TV-AGRU.
\State Compute $\Theta^t_M = \{\alpha^t_M,\beta^t_M\} = \text{AGRU}(F_{<t};\theta_{\text{AGRU}})$ and fix $\Theta^t_M$.
\For{$j=1:N_{\text{fix}}$}
    \State Compute the NLL loss $L=\sum_{t=1}^S (-\ell_M^t)$ and its partial derivatives with respect to $\nu_M$.
    \State Update: $\nu_M \gets \text{RMSProp}(\nu_M,\nabla_{\nu_M} L,l_{\text{fix}})$.
\EndFor 
\EndFor
\end{algorithmic}
\textbf{Output}: learnable parameters $\nu_M$ and $\theta_{\text{AGRU}}$; the time-varying model parameters $\Theta^t_M$; the realized latent market factor $\tilde{Z}_M^t$ given by Equation (\ref{latentfac}). 
\end{algorithm}

\begin{algorithm}
\caption{The market return fitting step in training GF-AGRU.} \textbf{Hyperparameters}: learning rate $l_{\text{fix}}$ of the FIX-OPTIM sub-procedure, learning rate $l_{\text{tv}}$ of the TV-AGRU sub-procedure, number of maximum iterative steps $N_m$, number of training epochs $N_{\text{fix}}$ of FIX-OPTIM, number of training epochs $N_{\text{tv}}$ of TV-AGRU, and the training set size $S$.\\
\textbf{Input}: training data including the features $F_{<t}$ and the label $Y_M^t$. $F_{<t}$ is constructed by Equation \eqref{eqn:features_Ft} using historical daily market returns, and $Y_M^t$ is the future one-month return. The training set collects data points on a daily frequency. \\
\textbf{Initialize}: tail parameters $\nu_M=\{u_M,v_M\}$ and the Attention-GRU network parameters $\theta_{\text{AGRU}}$.
\begin{algorithmic}
[1]
\For{$b=1:N_m$}
\State (TV-AGRU)
\State Fix $\nu_M$ given by FIX-OPTIM.
\For{$j=1:N_{\text{tv}}$}
\State Compute $\Theta^t_M = \{\alpha^t_M,\beta^t_M\} = \text{AGRU}(F_{<t};\theta_{\text{AGRU}})$.
\State Compute the NLL loss $L=\sum_{t=1}^S (-\ell_M^t)$ and its partial derivatives with respect to $\theta_{\text{AGRU}}$.
\State Update: $\theta_{\text{AGRU}} \gets \text{RMSProp}(\theta_{\text{AGRU}},\nabla_{\theta_{\text{AGRU}}} L,l_{\text{tv}})$.
\EndFor
\State (FIX-OPTIM)
\State Fix $\theta_{\text{AGRU}}$ given by TV-AGRU.
\State Compute $\Theta^t_M = \{\alpha^t_M,\beta^t_M\} = \text{AGRU}(F_{<t};\theta_{\text{AGRU}})$ and fix $\Theta^t_M$.
\For{$j=1:N_{\text{fix}}$}
\State Compute the NLL loss $L=\sum_{t=1}^S (-\ell_M^t)$ and its partial derivatives with respect to $\nu_M$.
\State Update: $\nu_M \gets \text{RMSProp}(\nu_M,\nabla_{\nu_M} L,l_{\text{fix}})$.
\EndFor
\EndFor
\end{algorithmic}
\textbf{Output}: learnable parameters $\nu_M$ and $\theta_{\text{AGRU}}$; the time-varying model parameters $\Theta^t_M$; the realized latent market factor $\tilde{Z}_M^t$ given by Equation (\ref{latentfac}).
\end{algorithm}
{
    "title": "dynamic cvar portfolio construction with attention-powered generative   factor learning",
    "id": "2301.07318",
    "abstract": "the dynamic portfolio construction problem requires dynamic modeling of the joint distribution of multivariate stock returns. to achieve this, we propose a dynamic generative factor model which uses random variable transformation as an implicit way of distribution modeling and relies on the attention-gru network for dynamic learning and forecasting. the proposed model captures the dynamic dependence among multivariate stock returns, especially focusing on the tail-side properties. we also propose a two-step iterative algorithm to train the model and then predict the time-varying model parameters, including the time-invariant tail parameters. at each investment date, we can easily simulate new samples from the learned generative model, and we further perform cvar portfolio optimization with the simulated samples to form a dynamic portfolio strategy. the numerical experiment on stock data shows that our model leads to wiser investments that promise higher reward-risk ratios and present lower tail risks.",
    "categories": "q-fin.pm",
    "doi": "",
    "created": "2023-01-18",
    "updated": "2024-01-16",
    "authors": [
        "chuting sun",
        "qi wu",
        "xing yan"
    ],
    "affiliation": [],
    "url": "https://arxiv.org/abs/2301.07318"
}
{
    "ToxicityFilter": {
        "text_to_toxicity_attributes": {
            "elsarticle-harv.bst": {
                "toxicity_score": 0.016838523,
                "severe_toxicity_score": 0.0013065338,
                "identity_attack_score": 0.004439743,
                "insult_score": 0.0088618845,
                "profanity_score": 0.016889455,
                "threat_score": 0.0077284453,
                "sexually_explicit_score": 0.0136827035,
                "flirtation_score": 0.44743943
            },
            "elsarticle.cls": {
                "toxicity_score": 0.011560776,
                "severe_toxicity_score": 0.0010490417,
                "identity_attack_score": 0.0031263188,
                "insult_score": 0.007493876,
                "profanity_score": 0.0138151245,
                "threat_score": 0.007068211,
                "sexually_explicit_score": 0.009613278,
                "flirtation_score": 0.44272235
            },
            "elsarticle-template-harv.tex": {
                "toxicity_score": 0.0070369947,
                "severe_toxicity_score": 0.00088214874,
                "identity_attack_score": 0.0019053896,
                "insult_score": 0.0065628705,
                "profanity_score": 0.013951761,
                "threat_score": 0.0061814263,
                "sexually_explicit_score": 0.009554301,
                "flirtation_score": 0.39370233
            },
            "elsarticle-template-harv.bbl": {
                "toxicity_score": 0.011623607,
                "severe_toxicity_score": 0.0010919571,
                "identity_attack_score": 0.0037182847,
                "insult_score": 0.007474876,
                "profanity_score": 0.01442999,
                "threat_score": 0.007365964,
                "sexually_explicit_score": 0.011087708,
                "flirtation_score": 0.20409603
            }
        },
        "reason": null
    }
}
{
    "num_done": {
        "figure": 0,
        "algorithm": 3,
        "plot": 0
    }
}
{
    "NonTrivialRenderingFilter": {
        "white_pixels_ratio": 89.1748968745042,
        "hash": "00003f9f9f9fbf3f",
        "most_frequent_color_ratio": 89.1748968745042
    }
}