Nonlinear regressor in GLM link function Try to reproduce Robert E. McCulloch and Ruey S. Tsay’s paper Nonlinearity in High-Frequency Financial Data and Hierarchical Models with local market data.
the paper uses GLM to model high-frequency data, $D_i, N_i, \Delta t_i$, and $F_{i-1}$.
$D_i$ indicates the up jump or down jump of price movement. $N_i$ is the number of trade happened during the $\Delta t_i$ period. $\Delta t_i$ it the duration of the period in seconds. $F_{i-1}$ is the information in the $t_{i-1}$ time period. The model of $D_i$ is:
$$D_i \vert(N_i, \Delta t_i, F_{i-1})=sign(\mu_i+\sigma_i \epsilon) $$
where $\epsilon \thicksim N(0,1)$, 
$$\mu_i=\omega_0+\omega_1 D_{i-1}+\omega_2ln(\Delta t_i)$$ $$ln(\sigma_i)=\beta^* \vert \sum_{j=1}^4 D_{i-j} \vert$$
$D_i$ could be either -1 or 1 for price up-jump or down-jump. From the model definition, it is clear that:
$$ P(D_i=-1 \vert N_i, \Delta t_i, F_{i-1})=\Phi({- \mu_i \over \sigma_i})$$
$$ P(D_i=1 \vert N_i, \Delta t_i, F_{i-1})=1-\Phi({- \mu_i \over \sigma_i})$$
$$ E(D_i\vert N_i, \Delta t_i, F_{i-1})=1-2\Phi({- \mu_i \over \sigma_i})$$
if we map -1,1 to 1,0
$$ E(D_i\vert N_i, \Delta t_i, F_{i-1})=\Phi({- \mu_i \over \sigma_i})$$
Here $D_i$ follows a 0-1 distribution, definitely a distribution of exponential family. Intuitively the link function $g^{-1}(X^T \beta)$ is the CDF of normal distribution, the probit link function.
Here
$$X=[1, D_i, ln(\Delta t_i), \vert \sum_{j=1}^4 D_{i-j} \vert] $$
The perameters to estimate is:
$$\beta=[\omega_0, \omega_1, \omega_2, \beta^*] $$
My questions are:


*

*The GLM need $X^t\beta$ in the link function to be a linear form, but ${- \mu_i \over \sigma_i}$ is not. Should I choose another link function or should I reform the $ {- \mu_i \over \sigma_i}$ (since the model proposed $ln(\sigma_i)$ form)?

*For the computational reason, I mapped $D_i$ from -1,1 to 1,0. Do I need to map regressors as well? 
I guess not. Cause if I do, i. the calculation of $ \vert \sum_{j=1}^4 D_{i-j} \vert$will be different. ii. I am just using a different tag for the same 'truth'.
I have spent days searching and scratching this problem. I presume it could be a quite common modeling procedure since people normally want to model expectation and variance. It will be very appreciated if you may kindly provide me some guide.
 A: What you have seems to be a binomial regression model with probit link function, but in place of the usual linear predictor $\beta^T x$ you have some nonlinear predictor $f(\beta, x)$. 
Binomial regression is usually fitted by irls algorithm, see Can you give a simple intuitive explanation of IRLS method to find the MLE of a GLM?. It should be possible to replace the linear least squares used there with nonlinear least squares, but I do not know of implementations. But looking closer at your model, you have a linear predictor for $\mu_i$, but then you also have a linear predictor (with a log link function) for $\sigma_i$. So you are doing simultaneous modelling of two parameters, so you need an extension of the usual glm framework. I would have a look at the gamlss package for R, see http://www.gamlss.com/. It could probably be used!
A: Heteroscedasticity in binary response or Bernoulli models is not separately identified and is equivalent to a non-linear mean function.
Richard Williams has some articles that include comments on identification in discrete choic and heteroscedastic Binomial models, but I do not remember the references that I read.
Stata has hetprobit for this case
https://www.stata.com/manuals13/rhetprobit.pdf
Statsmodels in Python does not have yet non-linear GLM nor heteroscedastic GLM.
GLM now support var_weights, uses optionally gradient optimization and there is some preliminary code for nonlinear GLM. However, it will still take some time before official versions for nonlinear and heteroscedastic GLM will become available.
