1

I would like to add two things in my table: First, in the left side of the table, the results are posted for Risk aversion c = 0.5. The right side of the table shows results for c = 2. I want to write this next to 'Risk aversion c = 0.5', but don't know how. Secondly, the vertical left after the alpha is not continued, but breaks two times. Anyone know how to fix these issues?

\documentclass[a4paper]{article}
\begin{table}[!h]
\centering
\caption{Unrestricted optimisation, cumulative statistics, 2014 - 2018}
\begin{tabular}{l|l l  l  l  l  l  l  l  l  l  l } \hline 
\multicolumn{5}{c}{Risk aversion c = 0.5} \\ \hline \hline
\multicolumn{11}{c}{Portfolio one} \\
 & m & $\sum\Delta w$ & $r_t$ & $v_t$ & $u_t$ & m & $\sum\Delta w$ & $r_t$ & $v_t$ & $u_t$ \\
$\alpha$= 0 & 1.000 & 2199.877 & \textbf{0.0142} & 1.1878 & -0.2827 & 1.000 & 691.225 & \textbf{0.0048} & \textbf{0.9586} & \textbf{-0.9539} \\ 
$\alpha$= 2 & 0.401 & 899.142 & \textbf{0.0098} & 1.1868 & -0.2869 & 0.113 & 89.631 & \textbf{0.0034} & \textbf{0.9744} & \textbf{-0.9710} \\ 
$\alpha$= 5 & 0.080 & 154.177 & \textbf{0.0085} & 1.1973 & -0.2908 & 0.016 & 14.724 & \textbf{0.0020} & \textbf{0.9875} & \textbf{-0.9856}\\ 
$\alpha$= 10 & 0.009 & 14.294 & \textbf{0.0014} & 1.2244 & -0.3047 & 0.005 & 2.239 & \textbf{0.0009} & \textbf{0.9928} & \textbf{-0.9919}\\
 \multicolumn{11}{c}{Portfolio two} \\
  & m & $\sum\Delta w$ & $r_t$ & $v_t$ & $u_t$ & m & $\sum\Delta w$ & $r_t$ & $v_t$ & $u_t$ \\ 
 $\alpha$= 0 & 1.000 & 198.969 & 0.0011 & \textbf{1.1305} & \textbf{-0.2815} & 1.000 & 80.409 & 0.0000 & 1.0877 & -1.0878 \\ 
 $\alpha$= 2 & 0.522 & 108.120 & 0.0009 & \textbf{1.1307} & \textbf{-0.2818} & 0.186 & 21.504 & -0.0000 & 1.0912 & -1.0912\\ 
$\alpha$= 5 & 0.159 & 35.696 & 0.0004 & \textbf{1.1340} & \textbf{-0.2831} & 0.036 & 5.5989 & -0.0005 & 1.0950 & -1.0956\\
$\alpha$= 10 & 0.034 & 7.484 & -0.0007 & \textbf{1.1378} & \textbf{-0.2851} & 0.009 & 1.487 & -0.0008 & 1.0975 & -1.0983 \\
\hline \hline
\end{tabular}
\label{table:scenario_three}
\end{table}

\end{document}

enter image description here

As can be seen in the picture: 1. I would like to have 'risk aversion c = 2' on the right side 2. The vertical line on the left needs to be continued

  • of course! One question (I am new (obviously), but how do I make my snippet compilable? I added a picture with comments in red – user9891079 Oct 28 '18 at 21:28
  • 1
    Adding your \documentclass and the needed packages, see here: tex.meta.stackexchange.com/questions/228/… – CarLaTeX Oct 28 '18 at 21:37
  • 1
    Start the code with \documentclss{ and end it with \end{document}. Then we can see the used documentclass and used packages relevant to the given issue ... – Mensch Oct 28 '18 at 21:37
  • Yes, I inserted document class! – user9891079 Oct 28 '18 at 22:04
1

The breaks in the vertical line are caused by the \multicolumn{11} commands. If you use & \multicolumn{10}instead, the line will be continuous.

In order to add the second 'Risk aversion', you can use a similar \multicolumn{5} command as for the first one:

\documentclass[a4paper,oneside,titlepage,11pt]{article}

\begin{document}

\begin{table}[!h]
\centering
\caption{Unrestricted optimisation, cumulative statistics, 2014 - 2018}
\begin{tabular}{l|l l  l  l  l  l  l  l  l  l  l } \hline 
& \multicolumn{5}{c}{Risk aversion c = 0.5} & \multicolumn{5}{c}{Risk aversion c = 2} \\ \hline \hline
& \multicolumn{10}{c}{Portfolio one} \\
 & m & $\sum\Delta w$ & $r_t$ & $v_t$ & $u_t$ & m & $\sum\Delta w$ & $r_t$ & $v_t$ & $u_t$ \\
$\alpha$= 0 & 1.000 & 2199.877 & \textbf{0.0142} & 1.1878 & -0.2827 & 1.000 & 691.225 & \textbf{0.0048} & \textbf{0.9586} & \textbf{-0.9539} \\ 
$\alpha$= 2 & 0.401 & 899.142 & \textbf{0.0098} & 1.1868 & -0.2869 & 0.113 & 89.631 & \textbf{0.0034} & \textbf{0.9744} & \textbf{-0.9710} \\ 
$\alpha$= 5 & 0.080 & 154.177 & \textbf{0.0085} & 1.1973 & -0.2908 & 0.016 & 14.724 & \textbf{0.0020} & \textbf{0.9875} & \textbf{-0.9856}\\ 
$\alpha$= 10 & 0.009 & 14.294 & \textbf{0.0014} & 1.2244 & -0.3047 & 0.005 & 2.239 & \textbf{0.0009} & \textbf{0.9928} & \textbf{-0.9919}\\
& \multicolumn{10}{c}{Portfolio two} \\
  & m & $\sum\Delta w$ & $r_t$ & $v_t$ & $u_t$ & m & $\sum\Delta w$ & $r_t$ & $v_t$ & $u_t$ \\ 
 $\alpha$= 0 & 1.000 & 198.969 & 0.0011 & \textbf{1.1305} & \textbf{-0.2815} & 1.000 & 80.409 & 0.0000 & 1.0877 & -1.0878 \\ 
 $\alpha$= 2 & 0.522 & 108.120 & 0.0009 & \textbf{1.1307} & \textbf{-0.2818} & 0.186 & 21.504 & -0.0000 & 1.0912 & -1.0912\\ 
$\alpha$= 5 & 0.159 & 35.696 & 0.0004 & \textbf{1.1340} & \textbf{-0.2831} & 0.036 & 5.5989 & -0.0005 & 1.0950 & -1.0956\\
$\alpha$= 10 & 0.034 & 7.484 & -0.0007 & \textbf{1.1378} & \textbf{-0.2851} & 0.009 & 1.487 & -0.0008 & 1.0975 & -1.0983 \\
\hline \hline
\end{tabular}


\label{table:scenario_three}
\end{table}

\end{document}

enter image description here

However, you should keep in mind, that the table will not fit onto the page as it is currently too wide. Also, I personally would rethink the placement of 'Portfolio one' and 'Portfolie two' as they might confuse the reader.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.