Fermion boundary conditions at finite temperature In a finite temperature QFT, fermions must obey anti-periodic boundary conditions.
What is the reason for this?
 A: Partition functions are obtained by means of path integrals along closed
paths. In the case of fermions, anti-periodic boundary conditions give the
trace and periodic boundary conditions give the supertrace:
$$ \mathrm{Tr}e^{-T H} = \int_{\begin{Bmatrix}\psi(T) = -\psi(0) \\ \bar{\psi}(T) = -\bar{\psi}(0)\end{Bmatrix}} e^{\int_0^T \bar{\psi}\dot{\psi}+ H(\bar{\psi}, \psi)} \mathcal{D}\psi\mathcal{D}\bar{\psi}$$
$$ \mathrm{Str}e^{-TH} = \int_{\begin{Bmatrix}\psi(T) = \psi(0) \\ \bar{\psi}(T) = \bar{\psi}(0)\end{Bmatrix}} e^{\int_0^T \bar{\psi}\dot{\psi}+ H(\bar{\psi}, \psi)} \mathcal{D}\psi\mathcal{D}\bar{\psi}$$
Explanation:
Fermionic path integrals are based on the Grassmann symbols of
operators:
$$ A(\bar{\psi}_f, \psi_i) =  \sum_{J,K=1}^N A_{JK} \bar{\psi}_f^J, \psi_i^K$$
Where $J,K$ are subsets of $\{ 1, ....., N\}$ describing
multi-indices, and $|J|, |K|$ denotes the number of elements in the set $J$. $\psi^{J}$ is the antisymmetric product of the $|J|$ Grassmann variables.
These symbols are equivalent to $2^N \times 2^N$ matrices and can be
viewed as mapping from an initial Hilbert space denoted by the subscript
$i$ to the final Hilbert space denoted by the subscript $j$. The trace
and the supertrace of these operators are defined by:
$$ \mathrm{Tr} A = \sum_J A_{JJ}$$
$$ \mathrm{Str} A = \sum_J (-1)^{|J|} A_{JJ}$$
The traces can be obtained from Gaussian-Grassmann integration of the
operator symbol after equating the initial and the final Grassmann
variables:
$$ \mathrm{Tr} A = \int A(\bar{\psi}_f = -\bar{\psi}_i,  \psi_i)  e^{-\bar{\psi}_i \psi_i} \Pi_{i=1}^N d\bar{\psi}_i d \psi_i $$
$$ \mathrm{Str} A = \int A(\bar{\psi}_f = \bar{\psi}_i,  \psi_i)  e^{-\bar{\psi}_i \psi_i} \Pi_{i=1}^N d\bar{\psi}_i d \psi_i $$
The reason for that is that in the second case, there will be an
additional minus sign in whenever the number of Grassmann variables is
odd. Consider for example the two dimensional operator:
$ A = A_{00} + A_{11}\bar{\psi}_f \psi_i$
Then:
$\int A(-\bar{\psi}, \psi) e^{-\bar{\psi} \psi}d\bar{\psi}d\psi = (A_{00} -A_{11}\bar{\psi} \psi) (1- \bar{\psi} \psi) d\bar{\psi}d\psi = - (A_{00} + A{11}) \int  \bar{\psi} \psi d\bar{\psi}d\psi =  A_{00} + A_{11}$  
Where the sign change in the last step is due to the change in order between $\psi$ and$\bar{\psi}$, Similarly
$\int A(\bar{\psi}, \psi) e^{-\bar{\psi} \psi}d\bar{\psi}d\psi = (A_{00} +A_{11}\bar{\psi} \psi) (1- \bar{\psi} \psi) d\bar{\psi}d\psi = - (A_{00} - A{11}) \int  \bar{\psi} \psi d\bar{\psi}d\psi =  A_{00} - A_{11}$  
A: The question has been answered in John Rennie's comment to the OP (I'd comment too but I don't have enough rep. for that). 
I'd like only to call attention to the fact that you are performing the path integral over the fields with either periodic (bosons) or anti-periodic (fermions) BC is a mere consequence of the fact that you are evaluating the trace (or planning to) to obtain the partition function and, hence, this is an imposition. See Eq. (2.17) of Kapusta's Finite-Temperature Field Theory (1989's edition) for an epiphany :)
I've read many atrocities about this when I was studying the subject (things like "for simplicity we choose...")
If you want an alternative demonstration to that of the linked document in John Rennie's comment, try Appendix A of Dashen et al. PRD 12, 2443–2458 (1975) . Just pay attention to the fact that they are doing everything in Minkowski space. 
A: some other approach, maybe explaination:
Recall the thermal average $<\hat{A}>_\beta =\rm{Tr}~ e^{-\beta \hat{H}} \hat{A} $, (set $\rm{Tr}~ e^{-\beta \hat{H}}=1$).
Take
$$\hat{A}=T[\hat{\psi}(x,\tau_1)\hat{\psi}(y.\tau_2)]=\theta(\tau_1-\tau_2)\hat{\psi}(x,\tau_1)\hat{\psi}(y.\tau_2)- \theta(\tau_2-\tau_1)\hat{\psi}(y,\tau_2)\hat{\psi}(x.\tau_1)$$
put $\hat{A}$ back into the themal average formula with $\tau_2=0$ and we will have
$$ \rm{Tr} ~e^{-\beta \hat{H}} \hat{\psi}(x,\tau_1)\hat{\psi}(y.0) 
\\ = \rm{Tr} ~\hat{\psi}(y.0)e^{-\beta \hat{H}}\hat{\psi}(x,\tau_1)
\\ = \rm{Tr} ~e^{-\beta \hat{H}}e^{\beta \hat{H}}\hat{\psi}(y.0)e^{-\beta \hat{H}} \hat{\psi}(x,\tau_1)
\\ = \rm{Tr} ~e^{-\beta \hat{H}}\hat{\psi}(y.\beta) \hat{\psi}(x,\tau_1)$$
Write the above into path integral form, and remember that the insertions in path integral will be ordered automatically.
$$\int [d\psi]e^{-S} \psi(x,\tau_1)\psi(y.0)=\int [d\psi]e^{-S} \psi(y.\beta) \psi(x,\tau_1) $$
Though we do not the boundary condition of the path integral, we can conclude that $\psi(y,0)=-\psi(y,\beta)$.
A: You may think as $\beta$ proportionnal to a $2\pi$ angle $\theta$. The link between the spinor fields $\psi(0)$ and $\psi(\beta)$, then, should be analized as the link between $\psi(\theta=0)$ and $\psi(\theta=2\pi)$. The angle $\theta$ could be considered as a "space rotation" of angle $\theta$ for the field $\psi$ . Now, we know that spinors, after a rotation of $2 \pi$, get a minus sign. So, we conclude that the correct boudary condition is $\psi(\beta) = -\psi(0)$
More rigourously, but equivalently, we may think about a compact spatial coordinate, where $x=0$ is identified with $x =\beta$. A closed path from $x=0$ to $x=\beta$, is  equivalent to a $2\pi$ "space rotation". 
A: An algebraic explanation. The fermionic path integral is based on a representation of the operators
$a$ and $a^{\dagger}$ in terms of a Grassmann variable $\alpha$
according to $a\rightarrow\alpha$ and $a^{\dagger}\rightarrow\partial_{\alpha}.$
The wave function $\psi\left(\alpha\right)=c_{0}\alpha+c_{1}$ is a function of $\alpha$.
The most general linear transformation from the particle number representation to the $\alpha$ representation is $\psi\left(\alpha\right)=\sum_{n=0}^{1}U_{\alpha,n}c_{n},$
i.e., it formally can be written as a matrix $U$ with a Grassmann
variable as index and a discrete index. This seems complicated, but
$U_{\alpha,n}=\alpha x_{n}+y_{n}$ can be expanded in $\alpha$ and
is determined by the four real or complex numbers $x_{0},x_{1},y_{0},y_{1}.$
To find out how the trace of a matrix $W_{m,n}$ looks like in the
$\alpha$ representation the inverse $V_{n,\alpha}=\alpha p_{n}+q_{n}$
of the matrix $U$ is needed. We thus require
$$\sum_{n}U_{\alpha,n}V_{n,\beta}=\sum_{n}\left(\alpha\beta x_{n}p_{n}+\alpha x_{n}q_{n}+\beta y_{n}p_{n}+y_{n}q_{n}\right)=\beta-\alpha=\delta\left(\alpha-\beta\right).$$
The $O\left(\alpha\beta\right)$, $O\left(\alpha\right)$, $O\left(\beta\right)$
and $O\left(1\right)$ terms determine the four coefficients $p_{0},p_{1},q_{0},q_{1}$
of $V$. The result is $p_{n}=\left(\lambda x_{1},-\lambda x_{0}\right)$
and $q_{n}=\left(\lambda y_{1},-\lambda y_{0}\right)$ with $\lambda=1/\left(x_{1}y_{0}-x_{0}y_{1}\right).$
To get the trace one also needs the completeness relation in the particle
number representation, which takes the form
$$\int\mathrm{d}\alpha V_{m,\alpha}U_{-\alpha,n}=\int\mathrm{d}\alpha\left(\alpha p_{m}+q_{m}\right)\left(-\alpha x_{n}+y_{n}\right)=p_{m}y_{n}-q_{m}x_{n}=\delta_{m,n}.$$
This equation essentially also is purely algebraic and easy to verify
with $\int\mathrm{d}\alpha=\partial_{\alpha}$ and the the explicit
solution for $p$ and $q$. Simply check the cases $mn\in\left\{ 00,01,10,11\right\} $.
The minus sign is essential.
To get the expression for the trace insert this $\delta_{m,n}$ into
$$\sum_{m,n}\delta_{m,n}W_{n,m}=\int\mathrm{d}\alpha\sum_{mn}U_{-\alpha,n}W_{nm}V_{m,\alpha}=\int\mathrm{d}\alpha W_{-\alpha,\alpha}.$$
