For PIN estimation in SAS, see the 2 examples you will find by
searching Google with "SAS PIN estimation"
You might be able to translate to GRETL, but if you have minimal
programming experience and no experience with MLE econometrics I
suggest first learning how to run some of simple MLE examples in the
GRETL manual.
Or you could decide it is easiest to use SAS and the programs 'AS IS'
>
> Message: 1
> Date: Thu, 29 Jul 2010 04:54:58 -0700 (PDT)
> From: Josephine Sudiman <jsudiman(a)yahoo.com>
> Subject: [Gretl-users] PIN Estimation
> To: gretl-users(a)lists.wfu.edu
> Message-ID: <201575.57102.qm(a)web53603.mail.re2.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear Allin and GRETL-users,
>
> Thank you for your kind response. I have read chapter 17, Maximum Likelihood
> Estimation, but still not sure from which angle I have to start. I never did
> this before and have a very minimal exposure on programming, except for some
> Macro at Excel.?I give some description of what the PIN (Probability of Informed
> Trading)model is about and the parameter.
>
>
> This model assumed that each day can be classified into either a day with
> information (with the probability x) or a day without information (with the
> probability 1-x).
>
>
> If the day is categorized as day without information, then only uninformed
> traders will do transactions (buy and sell)?during that day; the buy arrival
> rate of is eb and the sell arrival rate is es.
>
> If it is?a day with information, there are further possibilities:
> (1)The news is bad with probability d
> (2)The news is good with probability (1-d)
>
> If the case is day with good news, then the?sell arrival rate?is es and the buy
> arrival rate is u + eb.
> If the case is day with bad news, then the buy arrival rate is eb and the sell
> arrival rate is u + es.
>
> To be brief, u is the arrival rate of informed traders. These traders only act
> to buy (sell) if the day has good (bad) news. While eb is the buy?arrival rate
> of uninformed traders and es is the sell arrival rate of uninformed traders.
>
> We want to estimate this x,u,eb,es, and d using maximum likelihood estimation.
> The data that we have to estimate them comes from the daily number of buyer
> initiated trades (B) and daily seller initiated trades (S)?over the period P
> days. In my case I have 240 days, so I have B1 till B240 and S1 till 240 as my
> data set.
>
>
> ?L(0|B,S) = (1-x)e^-eb (eb^B/B!) e^-es (es^S/S!) +
> ?????????????????????? xde^-eb (eb^B/B!)e^-(u+es) (((u+es)^S)/S!)+
> ????????????????????? x(1-d)e^-(u+eb) ((u+eb)^B!)e^-es ((es^S)/S!)
> ?
> The model also has an assumption that arrival rates of informed and uninformed
> traders follow independent Poisson processes.
> ?
> I would be glad if there are people on the list who can give me a clue on how to
> start, as I am not sure what is alpha, beta and gamma in this model. Many thanks
> in advance for your kind attention.
> ?
> Best wishes,
> Josephine
>
>
>
>