With previous help I was able to find the first derivative of an equation for a work project. Now I'm after the second and third derivative, for use in a program to find the maximum (Which I must do from scratch). The following is what I believe them to be. Would someone please check my answers.
$$ f(\theta)= -\ln \left(\frac{1}{T}\sum_{t=1}^{T} e^{r_t\theta}\right) $$ $$ f(\theta)= -\ln \left( \sum_{t=1}^{T} e^{r_t\theta} \right) + \ln(T) $$ $$ f'(\theta)=-\frac{\sum_{t=1}^{T} r_te^{r_t\theta}}{\sum_{t=1}^{T} e^{r_t\theta}} $$ $$ f'(\theta)=-\frac{h(\theta)}{g(\theta)} $$ $$ f''(\theta)=-\frac{g(\theta)h'(\theta)-h(\theta)g'(\theta)}{g'(\theta)^2} $$ $$ f''(\theta)=\frac{(\sum_{t=1}^{T} r_te^{r_t\theta})^2 - \sum_{t=1}^{T} e^{r_t\theta}\sum_{t=1}^{T} r_t^2e^{r_t\theta}}{(\sum_{t=1}^{T} e^{r_t\theta})^2} $$
Many thanks!